| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

PreloadGeometryTool.cpp

Go to the documentation of this file.
00001 // $Id: PreloadGeometryTool.cpp,v 1.1 2006/07/27 20:39:15 cattanem Exp $
00002 // Include files 
00003 
00004 // from Gaudi
00005 #include "GaudiKernel/ToolFactory.h" 
00006 #include "GaudiKernel/IDataManagerSvc.h" 
00007 
00008 // from DetDesc
00009 #include "DetDesc/DataStoreLoadAgent.h"
00010 
00011 // local
00012 #include "PreloadGeometryTool.h"
00013 
00014 //-----------------------------------------------------------------------------
00015 // Implementation file for class : PreloadGeometryTool
00016 //
00017 // 2006-07-26 : Marco Cattaneo
00018 //-----------------------------------------------------------------------------
00019 
00020 // Declaration of the Tool Factory
00021 DECLARE_TOOL_FACTORY( PreloadGeometryTool );
00022 
00023 
00024 //=============================================================================
00025 // Standard constructor, initializes variables
00026 //=============================================================================
00027 PreloadGeometryTool::PreloadGeometryTool( const std::string& type,
00028                                           const std::string& name,
00029                                           const IInterface* parent )
00030   : GaudiTool ( type, name , parent )
00031 {
00032   declareInterface<IGenericTool>(this);
00033 
00034 }
00035 //=============================================================================
00036 // Destructor
00037 //=============================================================================
00038 PreloadGeometryTool::~PreloadGeometryTool() {} 
00039 
00040 //=============================================================================
00041 // Excution method
00042 //=============================================================================
00043 void PreloadGeometryTool::execute() 
00044 {
00045   DataStoreLoadAgent *loadAgent = new DataStoreLoadAgent();
00046   IDataManagerSvc *dataMgr = svc<IDataManagerSvc>("DetectorDataSvc", true);
00047   info() << "Preloading detector geometry..." << endmsg;
00048   dataMgr->traverseTree(loadAgent);
00049   info() << "Loaded " << loadAgent->loadedObjects() << " objects to depth of "
00050          << loadAgent->maxDepth() << " levels" << endmsg;
00051   delete loadAgent;
00052   return;
00053 }
00054 
00055 //=============================================================================
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:02:42 2011 for DetDescSvc by doxygen 1.4.7