StoreExplorerAlg Class Reference

Small algorith, which traverses the data store and prints generic information about all leaves, which can be loaded/accessed. More...

Inheritance diagram for StoreExplorerAlg:
Collaboration diagram for StoreExplorerAlg:

Public Member Functions

 StoreExplorerAlg (const std::string &name, ISvcLocator *pSvcLocator)
 Standard algorithm constructor. More...
 
 ~StoreExplorerAlg () override=default
 Standard Destructor. More...
 
template<class T >
std::string access (T *p)
 
void printObj (IRegistry *pReg, std::vector< bool > &flg)
 Print datastore leaf. More...
 
void explore (IRegistry *pObj, std::vector< bool > &flg)
 
StatusCode initialize () override
 Initialize. More...
 
StatusCode finalize () override
 Finalize. More...
 
StatusCode execute () override
 Execute procedure. More...
 
- Public Member Functions inherited from Algorithm
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor. More...
 
 ~Algorithm () override=default
 Destructor. More...
 
StatusCode sysStart () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysInitialize () override
 Initialization method invoked by the framework. More...
 
StatusCode sysReinitialize () override
 Reinitialization method invoked by the framework. More...
 
StatusCode sysRestart () override
 Restart method invoked by the framework. More...
 
StatusCode sysExecute () override
 The actions to be performed by the algorithm on an event. More...
 
StatusCode sysStop () override
 System stop. More...
 
StatusCode sysFinalize () override
 System finalization. More...
 
StatusCode sysBeginRun () override
 beginRun method invoked by the framework. More...
 
StatusCode sysEndRun () override
 endRun method invoked by the framework. More...
 
const std::stringname () const override
 The identifying name of the algorithm object. More...
 
const Gaudi::StringKeynameKey () const override
 
const std::stringtype () const override
 The type of the algorithm object. More...
 
void setType (const std::string &type) override
 
const std::stringversion () const override
 
unsigned int index () const override
 
StatusCode configure () override
 Dummy implementation of IStateful::configure() method. More...
 
StatusCode terminate () override
 Dummy implementation of IStateful::terminate() method. More...
 
StatusCode initialize () override
 the default (empty) implementation of IStateful::initialize() method More...
 
StatusCode start () override
 the default (empty) implementation of IStateful::start() method More...
 
StatusCode stop () override
 the default (empty) implementation of IStateful::stop() method More...
 
StatusCode finalize () override
 the default (empty) implementation of IStateful::finalize() method More...
 
StatusCode reinitialize () override
 the default (empty) implementation of IStateful::reinitialize() method More...
 
StatusCode restart () override
 the default (empty) implementation of IStateful::restart() method More...
 
Gaudi::StateMachine::State FSMState () const override
 returns the current state of the algorithm More...
 
Gaudi::StateMachine::State targetFSMState () const override
 returns the state the algorithm will be in after the ongoing transition More...
 
bool isExecuted () const override
 Has this algorithm been executed since the last reset? More...
 
void setExecuted (bool state) override
 Set the executed flag to the specified state. More...
 
void resetExecuted () override
 Reset the executed state of the Algorithm for the duration of the current event. More...
 
StatusCode beginRun () override
 Algorithm begin run. More...
 
StatusCode endRun () override
 Algorithm end run. This method is called at the end of the event loop. More...
 
bool isEnabled () const override
 Is this algorithm enabled or disabled? More...
 
bool filterPassed () const override
 Did this algorithm pass or fail its filter criterion for the last event? More...
 
void setFilterPassed (bool state) override
 Set the filter passed flag to the specified state. More...
 
int errorCount () const
 Get the number of failures of the algorithm. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 Access a service by name, creating it if it doesn't already exist. More...
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
SmartIF< IServiceservice (const std::string &name, const bool createIf=true, const bool quiet=false) const
 Return a pointer to the service identified by name (or "type/name") More...
 
template<class T >
SmartIF< T > service (const std::string &name, bool createIf=true, bool quiet=false) const
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present. More...
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service. More...
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service. More...
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service. More...
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc More...
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service. More...
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service. More...
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service. More...
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility. More...
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present. More...
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service. More...
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service More...
 
SmartIF< ITimelineSvc > & timelineSvc () const
 
SmartIF< ISvcLocator > & serviceLocator () const override
 The standard service locator. More...
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator More...
 
SmartIF< IHiveWhiteBoard > & whiteboard () const
 
bool registerContext () const
 register for Algorithm Context Service? More...
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm. More...
 
const std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
std::vector< Algorithm * > * subAlgorithms ()
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms. More...
 
StatusCode setProperty (const Property &p) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &s) override
 Implementation of IProperty::setProperty. More...
 
StatusCode setProperty (const std::string &n, const std::string &v) override
 Implementation of IProperty::setProperty. More...
 
StatusCode getProperty (Property *p) const override
 Implementation of IProperty::getProperty. More...
 
const PropertygetProperty (const std::string &name) const override
 Implementation of IProperty::getProperty. More...
 
StatusCode getProperty (const std::string &n, std::string &v) const override
 Implementation of IProperty::getProperty. More...
 
const std::vector< Property * > & getProperties () const override
 Implementation of IProperty::getProperties. More...
 
bool hasProperty (const std::string &name) const override
 Implementation of IProperty::hasProperty. More...
 
PropertyMgrgetPropertyMgr ()
 
StatusCode setProperties ()
 Set the algorithm's properties. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none") const
 
template<class T >
PropertydeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none") const
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service. More...
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information. More...
 
void declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const
 Declare monitoring information (special case) More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
EventContextgetContext () const
 get the context More...
 
void setContext (EventContext *context)
 set the context More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 
virtual const DataObjIDCollextraInputDeps () const override
 
virtual const DataObjIDCollextraOutputDeps () const override
 
virtual void acceptDHVisitor (IDataHandleVisitor *) const override
 
const DataObjIDCollinputDataObjs () const
 
const DataObjIDColloutputDataObjs () const
 
void commitHandles () override
 
void registerTool (IAlgTool *tool) const
 
void deregisterTool (IAlgTool *tool) const
 
template<class T >
StatusCode declareTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
 
const std::vector< IAlgTool * > & tools () const
 
bool isClonable () const override
 Specifies the clonability of the algorithm. More...
 
unsigned int cardinality () const override
 Return the cardinality. More...
 
const std::vector< std::string > & neededResources () const override
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
MSG::Level outputLevel () const __attribute__((deprecated))
 Backward compatibility function for getting the output level. More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 

Private Attributes

long m_print
 Job option to limit printout to first nnn events. More...
 
double m_frequency
 Job option to set the printout frequency. More...
 
bool m_exploreRelations
 Flag to check if relations should be followed. More...
 
long m_printMissing
 Flag to indicate if missing entities should be printed. More...
 
long m_total = 0
 Internal counter to trigger printouts. More...
 
long m_frqPrint = 0
 Internal counter to adjust printout frequency. More...
 
bool m_load
 Flag to load non existing items. More...
 
bool m_testAccess
 Flag to test access to objects (DataObject and ContainedObject) More...
 
bool m_accessForeign
 Flag to indicate if foreign files should be opened. More...
 
SmartIF< IDataProviderSvcm_dataSvc
 Reference to data provider service. More...
 
std::string m_dataSvcName
 Name of the data provider service. More...
 
std::string m_rootName
 Name of the root leaf (obtained at initialize) More...
 

Additional Inherited Members

- Public Types inherited from Algorithm
typedef Gaudi::PluginService::Factory< IAlgorithm *, const std::string &, ISvcLocator * > Factory
 
- Public Types inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
using base_class = CommonMessaging
 
- Protected Member Functions inherited from Algorithm
virtual void declareInput (Gaudi::DataHandle *im) override
 
virtual void declareOutput (Gaudi::DataHandle *im) override
 
std::vector< IAlgTool * > & tools ()
 
bool isInitialized () const override
 Has the Algorithm already been initialized? More...
 
bool isFinalized () const override
 Has the Algorithm already been finalized? More...
 
void setIndex (const unsigned int &idx) override
 set instantiation index of Alg More...
 
- Protected Member Functions inherited from CommonMessaging< implements< IAlgorithm, IDataHandleHolder, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Algorithm
EventContextm_event_context
 Event specific data for multiple event processing. More...
 
SmartIF< PropertyMgrm_propertyMgr
 For management of properties. More...
 
std::unique_ptr< IDataHandleVisitorm_updateDataHandles
 Hook for for derived classes to provide a custom visitor for data handles. More...
 

Detailed Description

Small algorith, which traverses the data store and prints generic information about all leaves, which can be loaded/accessed.

Author
: M.Frank
Version
: 1.0

Definition at line 30 of file StoreExplorerAlg.cpp.

Constructor & Destructor Documentation

StoreExplorerAlg::StoreExplorerAlg ( const std::string name,
ISvcLocator pSvcLocator 
)
inline

Standard algorithm constructor.

Definition at line 58 of file StoreExplorerAlg.cpp.

59  : Algorithm(name, pSvcLocator)
60  {
61  declareProperty("Load", m_load = false);
62  declareProperty("PrintEvt", m_print = 1);
63  declareProperty("PrintMissing", m_printMissing = 0);
64  declareProperty("PrintFreq", m_frequency = 0.0);
65  declareProperty("ExploreRelations", m_exploreRelations = false);
66  declareProperty("DataSvc", m_dataSvcName="EventDataSvc");
67  declareProperty("TestAccess", m_testAccess = false);
68  declareProperty("AccessForeign", m_accessForeign = false);
69  }
long m_printMissing
Flag to indicate if missing entities should be printed.
bool m_accessForeign
Flag to indicate if foreign files should be opened.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Algorithm.h:426
bool m_load
Flag to load non existing items.
double m_frequency
Job option to set the printout frequency.
long m_print
Job option to limit printout to first nnn events.
Algorithm(const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.cpp:43
std::string m_dataSvcName
Name of the data provider service.
bool m_exploreRelations
Flag to check if relations should be followed.
bool m_testAccess
Flag to test access to objects (DataObject and ContainedObject)
StoreExplorerAlg::~StoreExplorerAlg ( )
overridedefault

Standard Destructor.

Member Function Documentation

template<class T >
std::string StoreExplorerAlg::access ( T *  p)
inline

Definition at line 74 of file StoreExplorerAlg.cpp.

74  {
75  if ( !p ) return "Access FAILED.";
77  [&](std::string s,typename T::const_reference i) {
78  return s+std::to_string(p->index(i)) + ":" + std::to_string(i->clID()) + ",";
79  });
80  return result.substr(0, result.length()-2);
81  }
T to_string(T...args)
T end(T...args)
STL class.
T length(T...args)
T begin(T...args)
string s
Definition: gaudirun.py:245
T substr(T...args)
T accumulate(T...args)
list i
Definition: ana.py:128
StatusCode StoreExplorerAlg::execute ( )
inlineoverride

Execute procedure.

Definition at line 215 of file StoreExplorerAlg.cpp.

215  {
217  if ( ((m_print > m_total++) || (m_frequency*m_total > m_frqPrint)) && root ) {
219  std::string store_name = "Unknown";
220  IRegistry* pReg = root->registry();
221  if ( pReg ) {
222  auto isvc = SmartIF<IService>{pReg->dataSvc()};
223  if ( isvc ) store_name = isvc->name();
224  }
225  info() << "========= " << m_rootName << "["
226  << std::showbase << std::hex << (unsigned long) root.ptr() << std::dec
227  << "@" << store_name << "]:" << endmsg;
228  std::vector<bool> flg(1,true);
229  explore(root->registry(), flg);
230  return StatusCode::SUCCESS;
231  } else if ( root ) {
232  return StatusCode::SUCCESS;
233  }
234  error() << "Cannot retrieve \"/Event\"!" << endmsg;
235  return StatusCode::FAILURE;
236  }
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
SmartIF< IDataProviderSvc > m_dataSvc
Reference to data provider service.
T showbase(T...args)
long m_total
Internal counter to trigger printouts.
double m_frequency
Job option to set the printout frequency.
STL class.
long m_print
Job option to limit printout to first nnn events.
TYPE * get() const
Get interface pointer.
Definition: SmartIF.h:76
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
std::string m_rootName
Name of the root leaf (obtained at initialize)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:22
void explore(IRegistry *pObj, std::vector< bool > &flg)
A small class used to access easily (and efficiently) data items residing in data stores...
Definition: SmartDataPtr.h:46
T hex(T...args)
tuple root
Definition: IOTest.py:42
virtual IDataProviderSvc * dataSvc() const =0
Retrieve pointer to Transient Store.
long m_frqPrint
Internal counter to adjust printout frequency.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void StoreExplorerAlg::explore ( IRegistry pObj,
std::vector< bool > &  flg 
)
inline

Definition at line 149 of file StoreExplorerAlg.cpp.

149  {
150  printObj(pObj, flg);
151  if ( pObj ) {
152  auto mgr = eventSvc().as<IDataManagerSvc>();
153  if ( mgr ) {
155  StatusCode sc = mgr->objectLeaves(pObj, leaves);
156  const std::string* par0 = nullptr;
157  if ( pObj->address() ) par0 = pObj->address()->par();
158  if ( sc.isSuccess() ) {
159  for ( auto i=leaves.begin(); i != leaves.end(); i++ ) {
160  const std::string& id = (*i)->identifier();
161  DataObject* p = nullptr;
162  if ( !m_accessForeign && (*i)->address() ) {
163  if ( par0 ) {
164  const std::string* par1 = (*i)->address()->par();
165  if ( par1 && par0[0] != par1[0] ) continue;
166  }
167  }
168  if ( m_load ) {
169  sc = eventSvc()->retrieveObject(id, p);
170  } else {
171  sc = eventSvc()->findObject(id, p);
172  }
173  if ( sc.isSuccess() ) {
174  if ( id != "/Event/Rec/Relations" || m_exploreRelations ) {
175  flg.push_back(i+1 == leaves.end());
176  explore(*i, flg);
177  flg.pop_back();
178  }
179  } else {
180  flg.push_back(i+1 == leaves.end());
181  printObj(*i, flg);
182  flg.pop_back();
183  }
184  }
185  }
186  }
187  }
188  }
virtual const std::string * par() const =0
Retrieve String parameters.
bool m_accessForeign
Flag to indicate if foreign files should be opened.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
bool m_load
Flag to load non existing items.
T end(T...args)
STL class.
T push_back(T...args)
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:110
virtual StatusCode findObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Find object identified by its directory entry.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
T pop_back(T...args)
void printObj(IRegistry *pReg, std::vector< bool > &flg)
Print datastore leaf.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
void explore(IRegistry *pObj, std::vector< bool > &flg)
SmartIF< IDataProviderSvc > & eventSvc() const
The standard event data service.
T begin(T...args)
bool m_exploreRelations
Flag to check if relations should be followed.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
list i
Definition: ana.py:128
virtual StatusCode retrieveObject(IRegistry *pDirectory, const std::string &path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode StoreExplorerAlg::finalize ( )
inlineoverride

Finalize.

Definition at line 209 of file StoreExplorerAlg.cpp.

209  {
210  m_dataSvc.reset();
211  return StatusCode::SUCCESS;
212  }
SmartIF< IDataProviderSvc > m_dataSvc
Reference to data provider service.
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
StatusCode StoreExplorerAlg::initialize ( )
inlineoverride

Initialize.

Definition at line 191 of file StoreExplorerAlg.cpp.

191  {
192  m_rootName.clear();
194  if ( !m_dataSvc ) {
195  error() << "Failed to access service \""
196  << m_dataSvcName << "\"." << endmsg;
197  return StatusCode::FAILURE;
198  }
199  auto mgr = m_dataSvc.as<IDataManagerSvc>();
200  if ( !mgr ) {
201  error() << "Failed to retrieve IDataManagerSvc interface." << endmsg;
202  return StatusCode::FAILURE;
203  }
204  m_rootName = mgr->rootName();
205  return StatusCode::SUCCESS;
206  }
SmartIF< IDataProviderSvc > m_dataSvc
Reference to data provider service.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Definition: SmartIF.h:110
std::string m_rootName
Name of the root leaf (obtained at initialize)
T clear(T...args)
std::string m_dataSvcName
Name of the data provider service.
StatusCode service(const std::string &name, T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
Definition: Algorithm.h:232
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void StoreExplorerAlg::printObj ( IRegistry pReg,
std::vector< bool > &  flg 
)
inline

Print datastore leaf.

Definition at line 85 of file StoreExplorerAlg.cpp.

85  {
86  auto& log = info();
87  for (size_t j = 1; j < flg.size(); j++ ) {
88  if ( !flg[j-1] && flg[j] ) log << "| ";
89  else if ( flg[j] ) log << " ";
90  else log << "| ";
91  }
92  log << "+--> " << pReg->name();
93  if ( pReg->address() ) {
94  log << " [Address: CLID="
95  << std::showbase << std::hex << pReg->address()->clID()
96  << " Type=" << (void*)pReg->address()->svcType() << "]";
97  }
98  else {
99  log << " [No Address]";
100  }
101  DataObject* p = pReg->object();
102  if ( p ) {
103  try {
104  std::string typ = System::typeinfoName(typeid(*p));
105  if ( m_testAccess ) p->clID();
106  log << " " << typ.substr(0,32);
107  }
108  catch (...) {
109  log << "Access test FAILED";
110  }
111  }
112  else {
113  log << " (Unloaded) ";
114  }
115  ObjectContainerBase* base = dynamic_cast<ObjectContainerBase*>(p);
116  if ( base ) {
117  try {
118  int numObj = base->numberOfObjects();
119  const CLID id = p->clID();
120  log << " [" << numObj << "]";
121  if ( m_testAccess ) {
122  CLID idd = id>>16;
123  switch(idd) {
124  case CLID_ObjectList>>16: /* ObjectList */
126  break;
127  case CLID_ObjectVector>>16: /* ObjectVector */
129  break;
130  case (CLID_ObjectVector+0x00030000)>>16: /* Keyed Map */
132  break;
133  case (CLID_ObjectVector+0x00040000)>>16: /* Keyed Hashmap */
135  break;
136  case (CLID_ObjectVector+0x00050000)>>16: /* Keyed array */
138  break;
139  }
140  }
141  }
142  catch (...) {
143  log << "Access test FAILED";
144  }
145  }
146  log << endmsg;
147  }
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
virtual size_type numberOfObjects() const =0
Number of objects in the container.
ObjectVector is one of the basic Gaudi container classes capable of being registered in Data Stores...
template class KeyedContainer, KeyedContainer.h
virtual const name_type & name() const =0
Name of the directory (or key)
T showbase(T...args)
virtual long svcType() const =0
Retrieve service type.
ObjectList is one of the basic Gaudi container classes capable of being registered in Data Stores...
STL class.
virtual const CLID & clID() const
Retrieve reference to class definition structure.
Definition: DataObject.cpp:68
virtual const CLID & clID() const =0
Retrieve class information from link.
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual DataObject * object() const =0
Retrieve object behind the link.
T size(T...args)
KeyedObjectManager Class to manage keyed objects.
T hex(T...args)
T substr(T...args)
ObjectContainerBase is the base class for Gaudi container classes.
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:30
bool m_testAccess
Flag to test access to objects (DataObject and ContainedObject)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
std::string access(T *p)

Member Data Documentation

bool StoreExplorerAlg::m_accessForeign
private

Flag to indicate if foreign files should be opened.

Definition at line 48 of file StoreExplorerAlg.cpp.

SmartIF<IDataProviderSvc> StoreExplorerAlg::m_dataSvc
private

Reference to data provider service.

Definition at line 50 of file StoreExplorerAlg.cpp.

std::string StoreExplorerAlg::m_dataSvcName
private

Name of the data provider service.

Definition at line 52 of file StoreExplorerAlg.cpp.

bool StoreExplorerAlg::m_exploreRelations
private

Flag to check if relations should be followed.

Definition at line 36 of file StoreExplorerAlg.cpp.

double StoreExplorerAlg::m_frequency
private

Job option to set the printout frequency.

Definition at line 34 of file StoreExplorerAlg.cpp.

long StoreExplorerAlg::m_frqPrint = 0
private

Internal counter to adjust printout frequency.

Definition at line 42 of file StoreExplorerAlg.cpp.

bool StoreExplorerAlg::m_load
private

Flag to load non existing items.

Definition at line 44 of file StoreExplorerAlg.cpp.

long StoreExplorerAlg::m_print
private

Job option to limit printout to first nnn events.

Definition at line 32 of file StoreExplorerAlg.cpp.

long StoreExplorerAlg::m_printMissing
private

Flag to indicate if missing entities should be printed.

Definition at line 38 of file StoreExplorerAlg.cpp.

std::string StoreExplorerAlg::m_rootName
private

Name of the root leaf (obtained at initialize)

Definition at line 54 of file StoreExplorerAlg.cpp.

bool StoreExplorerAlg::m_testAccess
private

Flag to test access to objects (DataObject and ContainedObject)

Definition at line 46 of file StoreExplorerAlg.cpp.

long StoreExplorerAlg::m_total = 0
private

Internal counter to trigger printouts.

Definition at line 40 of file StoreExplorerAlg.cpp.


The documentation for this class was generated from the following file: