Gaudi Framework, version v24r2

Home   Generated: Wed Dec 4 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Friends | List of all members
EvtCollectionStream Class Reference

A small to stream Data I/O. More...

#include <EvtCollectionStream.h>

Inheritance diagram for EvtCollectionStream:
Inheritance graph
[legend]
Collaboration diagram for EvtCollectionStream:
Collaboration graph
[legend]

Public Member Functions

virtual StatusCode initialize ()
 Initialize EvtCollectionStream.
 
virtual StatusCode finalize ()
 Terminate EvtCollectionStream.
 
virtual StatusCode execute ()
 Working entry point.
 
- Public Member Functions inherited from Algorithm
 Algorithm (const std::string &name, ISvcLocator *svcloc, const std::string &version=PACKAGE_VERSION)
 Constructor.
 
virtual ~Algorithm ()
 Destructor.
 
virtual StatusCode sysStart ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysInitialize ()
 Initialization method invoked by the framework.
 
virtual StatusCode sysReinitialize ()
 Reinitialization method invoked by the framework.
 
virtual StatusCode sysRestart ()
 Restart method invoked by the framework.
 
virtual StatusCode sysExecute ()
 The actions to be performed by the algorithm on an event.
 
virtual StatusCode sysStop ()
 System stop.
 
virtual StatusCode sysFinalize ()
 System finalization.
 
virtual StatusCode sysBeginRun ()
 beginRun method invoked by the framework.
 
virtual StatusCode sysEndRun ()
 endRun method invoked by the framework.
 
virtual const std::stringname () const
 The identifying name of the algorithm object.
 
virtual const std::stringversion () const
 
virtual StatusCode configure ()
 Dummy implementation of IStateful::configure() method.
 
virtual StatusCode terminate ()
 Dummy implementation of IStateful::terminate() method.
 
virtual StatusCode start ()
 the default (empty) implementation of IStateful::start() method
 
virtual StatusCode stop ()
 the default (empty) implementation of IStateful::stop() method
 
virtual StatusCode reinitialize ()
 the default (empty) implementation of IStateful::reinitialize() method
 
virtual StatusCode restart ()
 the default (empty) implementation of IStateful::restart() method
 
virtual bool isExecuted () const
 Has this algorithm been executed since the last reset?
 
virtual void setExecuted (bool state)
 Set the executed flag to the specified state.
 
virtual void resetExecuted ()
 Reset the executed state of the Algorithm for the duration of the current event.
 
virtual StatusCode beginRun ()
 Algorithm begin run.
 
virtual StatusCode endRun ()
 Algorithm end run. This method is called at the end of the event loop.
 
virtual Gaudi::StateMachine::State FSMState () const
 returns the current state of the algorithm
 
virtual Gaudi::StateMachine::State targetFSMState () const
 returns the state the algorithm will be in after the ongoing transition
 
virtual bool isEnabled () const
 Is this algorithm enabled or disabled?
 
virtual bool filterPassed () const
 Did this algorithm pass or fail its filter criterion for the last event?
 
virtual void setFilterPassed (bool state)
 Set the filter passed flag to the specified state.
 
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.
 
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.
 
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")
 
void setOutputLevel (int level)
 Set the output level for current algorithm.
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
SmartIF< IChronoStatSvc > & chronoSvc () const
 The standard Chrono & Stat service, Return a pointer to the service if present.
 
SmartIF< IChronoStatSvc > & chronoStatService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & detSvc () const
 The standard detector data service.
 
SmartIF< IDataProviderSvc > & detDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & detCnvSvc () const
 The standard detector data persistency conversion service.
 
SmartIF< IConversionSvc > & detDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IDataProviderSvc > & eventSvc () const
 The standard event data service.
 
SmartIF< IDataProviderSvc > & evtSvc () const
 shortcut for method eventSvc
 
SmartIF< IDataProviderSvc > & eventDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IConversionSvc > & eventCnvSvc () const
 The standard event data persistency conversion service.
 
SmartIF< IConversionSvc > & eventDataCnvService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IHistogramSvc > & histoSvc () const
 The standard histogram service.
 
SmartIF< IHistogramSvc > & histogramDataService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
SmartIF< IMessageSvc > & messageService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< INTupleSvc > & ntupleSvc () const
 The standard N tuple service.
 
SmartIF< INTupleSvc > & ntupleService () const
 Obsoleted name, kept due to the backwards compatibility.
 
SmartIF< IRndmGenSvc > & randSvc () const
 AIDA-based NTuple service Returns a pointer to the AIDATuple service if present.
 
SmartIF< IToolSvc > & toolSvc () const
 The standard ToolSvc service, Return a pointer to the service if present.
 
SmartIF< IExceptionSvc > & exceptionSvc () const
 Get the exception Service.
 
SmartIF< IAlgContextSvc > & contextSvc () const
 get Algorithm Context Service
 
SmartIF< ISvcLocator > & serviceLocator () const
 The standard service locator.
 
SmartIF< ISvcLocator > & svcLoc () const
 shortcut for method serviceLocator
 
bool registerContext () const
 register for Algorithm Context Service?
 
StatusCode createSubAlgorithm (const std::string &type, const std::string &name, Algorithm *&pSubAlg)
 Create a sub algorithm.
 
std::vector< Algorithm * > * subAlgorithms () const
 List of sub-algorithms. Returns a pointer to a vector of (sub) Algorithms.
 
virtual StatusCode setProperty (const Property &p)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &s)
 Implementation of IProperty::setProperty.
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Implementation of IProperty::setProperty.
 
virtual StatusCode getProperty (Property *p) const
 Implementation of IProperty::getProperty.
 
virtual const PropertygetProperty (const std::string &name) const
 Implementation of IProperty::getProperty.
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Implementation of IProperty::getProperty.
 
virtual const std::vector
< Property * > & 
getProperties () const
 Implementation of IProperty::getProperties.
 
StatusCode setProperties ()
 Set the algorithm's properties.
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property.
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties.
 
SmartIF< IMonitorSvc > & monitorSvc () const
 Access the monitor service.
 
template<class T >
void declareInfo (const std::string &name, const T &var, const std::string &desc) const
 Declare monitoring information.
 
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)
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 

Protected Member Functions

 EvtCollectionStream (const std::string &name, ISvcLocator *pSvcLocator)
 Standard algorithm Constructor.
 
virtual ~EvtCollectionStream ()
 Standard Destructor.
 
void clearItems ()
 Clear item list.
 
void addItem (const std::string &descriptor)
 Add item to output stramer list.
 
- Protected Member Functions inherited from Algorithm
bool isInitialized () const
 Has the Algorithm already been initialized?
 
bool isFinalized () const
 Has the Algorithm already been finalized?
 
int outputLevel () const
 retrieve the Algorithm output level
 
IntegerPropertyoutputLevelProperty ()
 Accessor for the Message level property.
 
void initOutputLevel (Property &prop)
 callback for output level property
 

Protected Attributes

SmartIF< INTupleSvcm_pTupleSvc
 Reference to Tuple service for event collection (may or may not be NTuple service)
 
std::string m_storeName
 Name of the service managing the data store.
 
ItemNames m_itemNames
 Vector of item names.
 
Items m_itemList
 Vector of items to be saved to this stream.
 

Private Types

typedef std::vector< std::stringItemNames
 
typedef std::vector
< DataStoreItem * > 
Items
 

Friends

class AlgFactory< EvtCollectionStream >
 
class Factory< EvtCollectionStream, IAlgorithm *(std::string, ISvcLocator *)>
 

Additional Inherited Members

- Public Types inherited from implements3< IAlgorithm, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class.
 
typedef extend_interfaces3
< IAlgorithm, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class.
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces.
 

Detailed Description

A small to stream Data I/O.

Author: M.Frank Version: 1.0

Definition at line 29 of file EvtCollectionStream.h.

Member Typedef Documentation

Definition at line 33 of file EvtCollectionStream.h.

Definition at line 34 of file EvtCollectionStream.h.

Constructor & Destructor Documentation

EvtCollectionStream::EvtCollectionStream ( const std::string name,
ISvcLocator pSvcLocator 
)
protected

Standard algorithm Constructor.

Definition at line 25 of file EvtCollectionStream.cpp.

: Algorithm(name, pSvcLocator)
{
m_storeName = "TagCollectionSvc";
declareProperty("EvtDataSvc", m_storeName);
}
EvtCollectionStream::~EvtCollectionStream ( )
protectedvirtual

Standard Destructor.

Definition at line 34 of file EvtCollectionStream.cpp.

{
}

Member Function Documentation

void EvtCollectionStream::addItem ( const std::string descriptor)
protected

Add item to output stramer list.

Definition at line 88 of file EvtCollectionStream.cpp.

{
int sep = descriptor.rfind("#");
int level = 0;
std::string obj_path (descriptor,0,sep);
std::string slevel (descriptor,sep+1,descriptor.length());
if ( slevel == "*" ) {
level = 9999999;
}
else {
level = ::atoi(slevel.c_str());
}
DataStoreItem* item = new DataStoreItem(obj_path, level);
log << MSG::INFO << "Adding OutputStream item " << item->path()
<< " with " << item->depth()
<< " level(s)." << endmsg;
}
void EvtCollectionStream::clearItems ( )
protected

Clear item list.

Definition at line 80 of file EvtCollectionStream.cpp.

{
for ( Items::iterator i = m_itemList.begin(); i != m_itemList.end(); i++ ) {
delete (*i);
}
}
StatusCode EvtCollectionStream::execute ( )
virtual

Working entry point.

Definition at line 66 of file EvtCollectionStream.cpp.

{
if ( status.isSuccess() ) {
for ( Items::iterator i = m_itemList.begin(); i != m_itemList.end(); i++ ) {
StatusCode iret = m_pTupleSvc->writeRecord((*i)->path());
if ( !iret.isSuccess() ) {
status = iret;
}
}
}
return status;
}
StatusCode EvtCollectionStream::finalize ( )
virtual

Terminate EvtCollectionStream.

Reimplemented from Algorithm.

Definition at line 59 of file EvtCollectionStream.cpp.

{
m_pTupleSvc = 0; // release
}
StatusCode EvtCollectionStream::initialize ( )
virtual

Initialize EvtCollectionStream.

Reimplemented from Algorithm.

Definition at line 38 of file EvtCollectionStream.cpp.

{
// Use the Job options service to set the Algorithm's parameters
// Get access to the DataManagerSvc
if( !m_pTupleSvc.isValid() ) {
log << MSG::FATAL << "Unable to locate IDataManagerSvc interface" << endmsg;
}
// Clear the item list
// Take the new item list from the properties.
addItem( *i );
}
log << MSG::INFO << "Data source: " << m_storeName << endmsg;
}

Friends And Related Function Documentation

Definition at line 30 of file EvtCollectionStream.h.

Definition at line 31 of file EvtCollectionStream.h.

Member Data Documentation

Items EvtCollectionStream::m_itemList
protected

Vector of items to be saved to this stream.

Definition at line 43 of file EvtCollectionStream.h.

ItemNames EvtCollectionStream::m_itemNames
protected

Vector of item names.

Definition at line 41 of file EvtCollectionStream.h.

SmartIF<INTupleSvc> EvtCollectionStream::m_pTupleSvc
protected

Reference to Tuple service for event collection (may or may not be NTuple service)

Definition at line 37 of file EvtCollectionStream.h.

std::string EvtCollectionStream::m_storeName
protected

Name of the service managing the data store.

Definition at line 39 of file EvtCollectionStream.h.


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

Generated at Wed Dec 4 2013 14:33:15 for Gaudi Framework, version v24r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004