All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DataSvcFileEntriesTool Class Reference

Tool to scan a transient store branch that collects all the objects that belong to the same source (file). More...

Inheritance diagram for DataSvcFileEntriesTool:
Collaboration diagram for DataSvcFileEntriesTool:

Public Member Functions

 DataSvcFileEntriesTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~DataSvcFileEntriesTool ()
 Destructor. More...
 
virtual StatusCode initialize ()
 Initialize the tool. More...
 
virtual StatusCode finalize ()
 Finalize the tool. More...
 
virtual const LeavesListleaves () const
 Return the list of collected objects. More...
 
virtual void handle (const Incident &incident)
 Call-back function for the BeginEvent incident. More...
 
- Public Member Functions inherited from extends2< AlgTool, IDataStoreLeaves, IIncidentListener >
 extends2 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends2 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends2 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends2 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from AlgTool
virtual const std::string & name () const
 Retrieve full identifying name of the concrete tool object. More...
 
virtual const std::string & type () const
 Retrieve type (concrete class) of the sub-algtool. More...
 
virtual const IInterfaceparent () const
 Retrieve parent of the sub-algtool. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode sysInitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysStart ()
 Start AlgTool. More...
 
virtual StatusCode sysStop ()
 Stop AlgTool. More...
 
virtual StatusCode sysFinalize ()
 Finalize AlgTool. More...
 
virtual StatusCode sysReinitialize ()
 Initialize AlgTool. More...
 
virtual StatusCode sysRestart ()
 Start AlgTool. More...
 
virtual StatusCode setProperty (const Property &p)
 Default implementations for IProperty interface. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
PropertyMgrgetPropertyMgr ()
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 AlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor. More...
 
ISvcLocatorserviceLocator () const
 Retrieve pointer to service locator. More...
 
ISvcLocatorsvcLoc () const
 shortcut for the method service locator More...
 
IMessageSvcmsgSvc () const
 Retrieve pointer to message service. More...
 
IToolSvctoolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified in the jobOptions via the job option service. More...
 
template<class T >
StatusCode service (const std::string &name, T *&svc, 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 &type, const std::string &name, T *&svc) const
 Access a service by name, 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...
 
void declInterface (const InterfaceID &, void *)
 declare interface 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...
 
IAuditorSvcauditorSvc () const
 Access the auditor service. More...
 
IMonitorSvcmonitorSvc () 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...
 
- Public Member Functions inherited from extend_interfaces3< IAlgTool, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IAlgTool
 DeclareInterfaceID (IAlgTool, 3, 0)
 InterfaceID. More...
 
virtual ~IAlgTool ()
 Virtual destructor. More...
 
virtual unsigned long refCount () const =0
 Current number of reference counts. More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long release ()=0
 Release Interface instance. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces2< IDataStoreLeaves, IIncidentListener >
virtual ~extend_interfaces2 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IDataStoreLeaves
 DeclareInterfaceID (IDataStoreLeaves, 1, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IIncidentListener
 DeclareInterfaceID (IIncidentListener, 2, 0)
 InterfaceID. More...
 

Private Member Functions

void i_collectLeaves ()
 Scan the data service starting from the node specified as Root. More...
 
void i_collectLeaves (IRegistry *reg)
 Scan the data service starting from the specified node. More...
 
IRegistryi_getRootNode ()
 Return the pointer to the IRegistry object associated to the node specified as Root. More...
 

Private Attributes

std::string m_dataSvcName
 Variable for the property DataService. More...
 
std::string m_rootNode
 Variable for the property Root. More...
 
bool m_scanOnBeginEvent
 Variable for the property ScanOnBeginEvent. More...
 
SmartIF< IIncidentSvcm_incidentSvc
 Pointer to the incident service. More...
 
SmartIF< IDataManagerSvcm_dataMgrSvc
 Pointer to the IDataManagerSvc interface of the data service. More...
 
SmartIF< IDataProviderSvcm_dataSvc
 Pointer to the IDataProviderSvc interface of the data service. More...
 
LeavesList m_leaves
 Internal cache for the list of objects found during the scan. More...
 
std::string m_initialBase
 File ID of the Root node. More...
 
bool m_ignoreOriginChange
 Variable for the property ScanOnBeginEvent. More...
 

Additional Inherited Members

- Public Types inherited from extends2< AlgTool, IDataStoreLeaves, IIncidentListener >
typedef extends2 base_class
 Typedef to this class. More...
 
typedef extend_interfaces2
< IDataStoreLeaves,
IIncidentListener
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from AlgTool
typedef
Gaudi::PluginService::Factory
< IAlgTool *, const
std::string &, const
std::string &, const
IInterface * > 
Factory
 
- Public Types inherited from implements3< IAlgTool, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IAlgTool, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IAlgTool, IProperty, IStateful >
typedef mpl::fold< typename
IAlgTool::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces2< IDataStoreLeaves, IIncidentListener >
typedef mpl::fold< typename
IDataStoreLeaves::iid::iids::type,
typename
IIncidentListener::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IDataStoreLeaves
typedef std::vector< DataObject * > LeavesList
 Returned type. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from AlgTool
int outputLevel () const
 get tool's output level More...
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property. More...
 
void initOutputLevel (Property &prop)
 callback for output level property More...
 
virtual ~AlgTool ()
 

Detailed Description

Tool to scan a transient store branch that collects all the objects that belong to the same source (file).

By default, the list of entries is cached and the cache is cleared at every BeginEvent incident.

Properties:
DataService (string): Name of the data service to use [EventDataSvc]
Root (string): Path to the element from which to start the scan [root of the data service]
ScanOnBeginEvent (bool): If the scan has to be started during the BeginEvent incident (true) or on demand (false, default)

Definition at line 26 of file DataSvcFileEntriesTool.cpp.

Constructor & Destructor Documentation

DataSvcFileEntriesTool::DataSvcFileEntriesTool ( const std::string &  type,
const std::string &  name,
const IInterface parent 
)

Standard constructor.

Definition at line 102 of file DataSvcFileEntriesTool.cpp.

104  :
105  base_class(type, name, parent) {
106 
107  declareProperty("DataService", m_dataSvcName = "EventDataSvc",
108  "Name of the data service to use");
109 
110  declareProperty("Root", m_rootNode,
111  "Path to the element from which to start the scan");
112 
113  declareProperty("ScanOnBeginEvent", m_scanOnBeginEvent = false,
114  "If the scan has to be started during the BeginEvent incident (true) or on demand (false, default)");
115 
116  declareProperty("IgnoreOriginChange", m_ignoreOriginChange = false,
117  "Disable the detection of the change in the origin of object between the BeginEvent and the scan");
118 }
bool m_ignoreOriginChange
Variable for the property ScanOnBeginEvent.
virtual const std::string & type() const
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:58
extends2 base_class
Typedef to this class.
Definition: extends.h:77
bool m_scanOnBeginEvent
Variable for the property ScanOnBeginEvent.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: AlgTool.h:234
std::string m_dataSvcName
Variable for the property DataService.
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
std::string m_rootNode
Variable for the property Root.
DataSvcFileEntriesTool::~DataSvcFileEntriesTool ( )
virtual

Destructor.

Definition at line 120 of file DataSvcFileEntriesTool.cpp.

120 {}

Member Function Documentation

StatusCode DataSvcFileEntriesTool::finalize ( )
virtual

Finalize the tool.

Reimplemented from AlgTool.

Definition at line 155 of file DataSvcFileEntriesTool.cpp.

155  {
156  // unregister from the incident service
157  if (m_incidentSvc) {
158  m_incidentSvc->removeListener(this, IncidentType::BeginEvent);
159  }
160  // Release the services
163  m_dataSvc.reset();
164 
165  return AlgTool::finalize();
166 }
const std::string BeginEvent
Processing of a new event has started.
Definition: Incident.h:60
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: AlgTool.cpp:434
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to the incident service.
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to the IDataProviderSvc interface of the data service.
SmartIF< IDataManagerSvc > m_dataMgrSvc
Pointer to the IDataManagerSvc interface of the data service.
void reset(TYPE *ptr=0)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:74
void DataSvcFileEntriesTool::handle ( const Incident incident)
virtual

Call-back function for the BeginEvent incident.

Clears the internal cache, cache the file ID of the Root node and, if the property ScanOnBeginEvent is set to true, scans the data service.

Implements IIncidentListener.

Definition at line 168 of file DataSvcFileEntriesTool.cpp.

168  {
169  // Get the file id of the root node at every event
170  IOpaqueAddress *addr = i_getRootNode()->address();
171  if (addr)
172  m_initialBase = addr->par()[0];
173  else
174  m_initialBase.clear(); // use empty file id if there is no address
175 
176  m_leaves.clear();
177  if (m_scanOnBeginEvent) {
178  MsgStream log(msgSvc(), name());
179  log << MSG::VERBOSE << "::handle scanning on " << incident.type() << endmsg;
180  i_collectLeaves();
181  }
182 }
virtual const std::string * par() const =0
Retrieve String parameters.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
const std::string & type() const
Access to the incident type.
Definition: Incident.h:34
bool m_scanOnBeginEvent
Variable for the property ScanOnBeginEvent.
std::string m_initialBase
File ID of the Root node.
IMessageSvc * msgSvc() const
Retrieve pointer to message service.
Definition: AlgTool.cpp:79
void i_collectLeaves()
Scan the data service starting from the node specified as Root.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
Opaque address interface definition.
LeavesList m_leaves
Internal cache for the list of objects found during the scan.
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
IRegistry * i_getRootNode()
Return the pointer to the IRegistry object associated to the node specified as Root.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
void DataSvcFileEntriesTool::i_collectLeaves ( )
private

Scan the data service starting from the node specified as Root.

Definition at line 201 of file DataSvcFileEntriesTool.cpp.

201  {
203 }
void i_collectLeaves()
Scan the data service starting from the node specified as Root.
IRegistry * i_getRootNode()
Return the pointer to the IRegistry object associated to the node specified as Root.
void DataSvcFileEntriesTool::i_collectLeaves ( IRegistry reg)
private

Scan the data service starting from the specified node.

todo: implement the scanning as an IDataStoreAgent

Definition at line 206 of file DataSvcFileEntriesTool.cpp.

206  {
207  MsgStream log(msgSvc(), name());
208  // I do not put sanity checks on the pointers because I know how I'm calling the function
209  IOpaqueAddress *addr = reg->address();
210  if (addr) { // we consider only objects that are in a file
211  if (outputLevel() <= MSG::VERBOSE)
212  log << MSG::VERBOSE << "::i_collectLeaves added " << reg->identifier() << endmsg;
213  m_leaves.push_back(reg->object()); // add this object
214  // Origin of the current object
215  const std::string& base = addr->par()[0];
216  // Compare with the origin seen during BeginEvent
217  if ( !m_ignoreOriginChange && (m_initialBase != base) )
218  throw GaudiException("Origin of data has changed ('"
219  + m_initialBase + "' != '" + base
220  + "'), probably OutputStream was called before "
221  "InputCopyStream: check options",
223 
224  std::vector<IRegistry*> lfs; // leaves of the current object
225  StatusCode sc = m_dataMgrSvc->objectLeaves(reg, lfs);
226  if (sc.isSuccess()) {
227  for(std::vector<IRegistry*>::iterator i = lfs.begin(); i != lfs.end(); ++i) {
228  // Continue if the leaf has the same database as the parent
229  if ( (*i)->address() && (*i)->address()->par()[0] == base ) {
230  DataObject* obj = 0;
231  sc = m_dataSvc->retrieveObject(reg, (*i)->name(), obj);
232  if (sc.isSuccess()) {
233  i_collectLeaves(*i);
234  } else {
235  throw GaudiException("Cannot get " + (*i)->identifier() + " from " + m_dataSvcName, name(), StatusCode::FAILURE);
236  }
237  }
238  }
239  }
240  }
241 }
virtual const std::string * par() const =0
Retrieve String parameters.
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
bool m_ignoreOriginChange
Variable for the property ScanOnBeginEvent.
Define general base for Gaudi exception.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
virtual const name_type & name() const =0
Name of the directory (or key)
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to the IDataProviderSvc interface of the data service.
std::string m_initialBase
File ID of the Root node.
SmartIF< IDataManagerSvc > m_dataMgrSvc
Pointer to the IDataManagerSvc interface of the data service.
IMessageSvc * msgSvc() const
Retrieve pointer to message service.
Definition: AlgTool.cpp:79
void i_collectLeaves()
Scan the data service starting from the node specified as Root.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
virtual DataObject * object() const =0
Retrieve object behind the link.
std::string m_dataSvcName
Variable for the property DataService.
int outputLevel() const
get tool's output level
Definition: AlgTool.h:305
virtual const id_type & identifier() const =0
Full identifier (or key)
Opaque address interface definition.
LeavesList m_leaves
Internal cache for the list of objects found during the scan.
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
list i
Definition: ana.py:128
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
IRegistry * DataSvcFileEntriesTool::i_getRootNode ( )
private

Return the pointer to the IRegistry object associated to the node specified as Root.

Definition at line 191 of file DataSvcFileEntriesTool.cpp.

191  {
192  DataObject * obj = 0;
193  StatusCode sc = m_dataSvc->retrieveObject(m_rootNode, obj);
194  if (sc.isFailure()) {
195  throw GaudiException("Cannot get " + m_rootNode + " from " + m_dataSvcName, name(), StatusCode::FAILURE);
196  }
197  return obj->registry();
198 }
Define general base for Gaudi exception.
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to the IDataProviderSvc interface of the data service.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:69
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std::string m_dataSvcName
Variable for the property DataService.
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
std::string m_rootNode
Variable for the property Root.
StatusCode DataSvcFileEntriesTool::initialize ( )
virtual

Initialize the tool.

Reimplemented from AlgTool.

Definition at line 122 of file DataSvcFileEntriesTool.cpp.

122  {
124  if (sc.isFailure()) return sc;
125 
126  // Retrieve the pointer to the needed services.
127 
128  m_incidentSvc = serviceLocator()->service("IncidentSvc");
129  if ( ! m_incidentSvc ) {
130  MsgStream log(msgSvc(), name());
131  log << MSG::ERROR << "Cannot get IncidentSvc" << endmsg;
132  return StatusCode::FAILURE;
133  }
134 
136  if ( ! m_dataSvc || ! m_dataMgrSvc ) {
137  MsgStream log(msgSvc(), name());
138  log << MSG::ERROR << "Cannot get IDataProviderSvc+IDataManagerSvc " << m_dataSvcName << endmsg;
139  return StatusCode::FAILURE;
140  }
141 
142  // Register ourself to the incident service as listener for BeginEvent
143  m_incidentSvc->addListener(this, IncidentType::BeginEvent);
144 
145  // If the Root node is not specified, take the name from the data service itself.
146  if (m_rootNode.empty()) {
147  m_rootNode = m_dataMgrSvc->rootName();
148  }
149 
150  // Clear the cache (in case the instance is re-initilized).
151  m_leaves.clear();
152  return StatusCode::SUCCESS;
153 }
const std::string BeginEvent
Processing of a new event has started.
Definition: Incident.h:60
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IIncidentSvc > m_incidentSvc
Pointer to the incident service.
SmartIF< IDataProviderSvc > m_dataSvc
Pointer to the IDataProviderSvc interface of the data service.
bool isFailure() const
Test for a status code of FAILURE.
Definition: StatusCode.h:85
ISvcLocator * serviceLocator() const
Retrieve pointer to service locator.
Definition: AlgTool.cpp:72
SmartIF< IDataManagerSvc > m_dataMgrSvc
Pointer to the IDataManagerSvc interface of the data service.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
Definition: ISvcLocator.h:82
IMessageSvc * msgSvc() const
Retrieve pointer to message service.
Definition: AlgTool.cpp:79
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
std::string m_dataSvcName
Variable for the property DataService.
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: AlgTool.cpp:307
LeavesList m_leaves
Internal cache for the list of objects found during the scan.
virtual const std::string & name() const
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:51
std::string m_rootNode
Variable for the property Root.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
const IDataStoreLeaves::LeavesList & DataSvcFileEntriesTool::leaves ( ) const
virtual

Return the list of collected objects.

If the scan was not yet done since the last BeginEvent incident, it is done when calling this function. The result of the scan is cached.

Implements IDataStoreLeaves.

Definition at line 184 of file DataSvcFileEntriesTool.cpp.

184  {
185  if (m_leaves.empty()) {
186  const_cast<DataSvcFileEntriesTool*>(this)->i_collectLeaves();
187  }
188  return m_leaves;
189 }
Tool to scan a transient store branch that collects all the objects that belong to the same source (f...
void i_collectLeaves()
Scan the data service starting from the node specified as Root.
LeavesList m_leaves
Internal cache for the list of objects found during the scan.

Member Data Documentation

SmartIF<IDataManagerSvc> DataSvcFileEntriesTool::m_dataMgrSvc
private

Pointer to the IDataManagerSvc interface of the data service.

Definition at line 65 of file DataSvcFileEntriesTool.cpp.

SmartIF<IDataProviderSvc> DataSvcFileEntriesTool::m_dataSvc
private

Pointer to the IDataProviderSvc interface of the data service.

Definition at line 67 of file DataSvcFileEntriesTool.cpp.

std::string DataSvcFileEntriesTool::m_dataSvcName
private

Variable for the property DataService.

Definition at line 56 of file DataSvcFileEntriesTool.cpp.

bool DataSvcFileEntriesTool::m_ignoreOriginChange
private

Variable for the property ScanOnBeginEvent.

Definition at line 88 of file DataSvcFileEntriesTool.cpp.

SmartIF<IIncidentSvc> DataSvcFileEntriesTool::m_incidentSvc
private

Pointer to the incident service.

Definition at line 63 of file DataSvcFileEntriesTool.cpp.

std::string DataSvcFileEntriesTool::m_initialBase
private

File ID of the Root node.

It is cached every BeginEvent to be compared with the one seen during the collection of the leaves, to avoid that the collection is altered by previous calls to an OutputStream.

Definition at line 85 of file DataSvcFileEntriesTool.cpp.

LeavesList DataSvcFileEntriesTool::m_leaves
private

Internal cache for the list of objects found during the scan.

Definition at line 70 of file DataSvcFileEntriesTool.cpp.

std::string DataSvcFileEntriesTool::m_rootNode
private

Variable for the property Root.

Definition at line 58 of file DataSvcFileEntriesTool.cpp.

bool DataSvcFileEntriesTool::m_scanOnBeginEvent
private

Variable for the property ScanOnBeginEvent.

Definition at line 60 of file DataSvcFileEntriesTool.cpp.


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