#include <FakeEventTime.h>
Inheritance diagram for FakeEventTime:
Public Types | |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
| enum | Status |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
| enum | Status |
Public Member Functions | |
| FakeEventTime (const std::string &type, const std::string &name, const IInterface *parent) | |
| Standard constructor. | |
| virtual | ~FakeEventTime () |
| Destructor. | |
| virtual StatusCode | initialize () |
| Initialization. | |
| virtual StatusCode | finalize () |
| Finalization. | |
| Gaudi::Time | getTime () const |
| Return the time of current event. | |
| virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
| virtual unsigned long | addRef () |
| virtual unsigned long | release () |
| virtual const std::string & | name () const |
| virtual const std::string & | type () const |
| virtual const IInterface * | parent () const |
| virtual StatusCode | configure () |
| virtual StatusCode | start () |
| virtual StatusCode | stop () |
| virtual StatusCode | terminate () |
| virtual StatusCode | reinitialize () |
| virtual StatusCode | restart () |
| virtual Gaudi::StateMachine::State | FSMState () const |
| virtual Gaudi::StateMachine::State | targetFSMState () const |
| virtual StatusCode | sysInitialize () |
| virtual StatusCode | sysStart () |
| virtual StatusCode | sysStop () |
| virtual StatusCode | sysFinalize () |
| virtual StatusCode | sysReinitialize () |
| virtual StatusCode | sysRestart () |
| virtual StatusCode | setProperty (const Property &p) |
| virtual StatusCode | setProperty (const std::string &s) |
| virtual StatusCode | setProperty (const std::string &n, const std::string &v) |
| StatusCode | setProperty (const std::string &name, const TYPE &value) |
| virtual StatusCode | getProperty (Property *p) const |
| virtual const Property & | getProperty (const std::string &name) const |
| virtual StatusCode | getProperty (const std::string &n, std::string &v) const |
| virtual const std::vector< Property * > & | getProperties () const |
| PropertyMgr * | getPropertyMgr () |
| ISvcLocator * | serviceLocator () const |
| ISvcLocator * | svcLoc () const |
| IMessageSvc * | msgSvc () const |
| IToolSvc * | toolSvc () const |
| StatusCode | setProperties () |
| StatusCode | service (const std::string &name, T *&svc, bool createIf=true) const |
| StatusCode | service (const std::string &type, const std::string &name, T *&svc) const |
| void | declInterface (const InterfaceID &, void *) |
| Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const |
| Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const |
| IAuditorSvc * | auditorSvc () const |
| IMonitorSvc * | monitorSvc () const |
| void | declareInfo (const std::string &name, const T &var, const std::string &desc) const |
| void | declareInfo (const std::string &name, const std::string &format, const void *var, int size, const std::string &desc) const |
| virtual const std::string & | type () const =0 |
| virtual const IInterface * | parent () const =0 |
| virtual StatusCode | configure ()=0 |
| virtual StatusCode | start ()=0 |
| virtual StatusCode | stop ()=0 |
| virtual StatusCode | terminate ()=0 |
| virtual StatusCode | reinitialize ()=0 |
| virtual StatusCode | restart ()=0 |
| virtual Gaudi::StateMachine::State | FSMState () const =0 |
| virtual StatusCode | sysInitialize ()=0 |
| virtual StatusCode | sysStart ()=0 |
| virtual StatusCode | sysStop ()=0 |
| virtual StatusCode | sysFinalize ()=0 |
| virtual StatusCode | sysReinitialize ()=0 |
| virtual StatusCode | sysRestart ()=0 |
| virtual unsigned long | refCount () const =0 |
| virtual const std::string & | name () const =0 |
| virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface)=0 |
| virtual unsigned long | addRef ()=0 |
| virtual unsigned long | release ()=0 |
Static Public Member Functions | |
| static const InterfaceID & | interfaceID () |
| static const InterfaceID & | interfaceID () |
| static const InterfaceID & | interfaceID () |
| static const InterfaceID & | interfaceID () |
Public Attributes | |
| SUCCESS | |
| NO_INTERFACE | |
| VERSMISMATCH | |
| LAST_ERROR | |
Protected Member Functions | |
| int | outputLevel () const |
| virtual unsigned long | refCount () const |
| IntegerProperty & | outputLevelProperty () |
| void | initOutputLevel (Property &prop) |
Private Attributes | |
| std::string | m_evtDataProviderName |
| Name of the Data Provider (set by the option EvtDataSvc, by default "EventDataSvc"). | |
| IDataProviderSvc * | m_evtDataProvider |
| Handle to the Data Provider interface of EventDataSvc (where to find the time... in the future). | |
| long long | m_startTime |
| First event time (when simluating them). | |
| long long | m_timeStep |
| Event time increment (when simluating event times). | |
It just provides fake event times.
Definition at line 20 of file FakeEventTime.h.
| FakeEventTime::FakeEventTime | ( | const std::string & | type, | |
| const std::string & | name, | |||
| const IInterface * | parent | |||
| ) |
Standard constructor.
Definition at line 25 of file FakeEventTime.cpp.
00028 : AlgTool ( type, name , parent ) 00029 { 00030 declareInterface<IEventTimeDecoder>(this); 00031 00032 declareProperty("EventDataSvc", m_evtDataProviderName = "EventDataSvc" ); 00033 00034 // properties used to generate fake times 00035 declareProperty("StartTime", m_startTime = 0); 00036 declareProperty("TimeStep", m_timeStep = 0); 00037 }
| FakeEventTime::~FakeEventTime | ( | ) | [virtual] |
| StatusCode FakeEventTime::initialize | ( | ) | [virtual] |
Initialization.
Reimplemented from AlgTool.
Definition at line 46 of file FakeEventTime.cpp.
00046 { 00047 // base class initialization 00048 StatusCode sc = AlgTool::initialize(); 00049 if (!sc.isSuccess()) return sc; 00050 00051 // local initialization 00052 MsgStream log(msgSvc(),name()); 00053 log << MSG::DEBUG << "--- initialize ---" << endmsg; 00054 00055 // Not really needed, just an example. 00056 sc = service(m_evtDataProviderName,m_evtDataProvider,true); 00057 if (!sc.isSuccess()) { 00058 log << MSG::ERROR << "Unable to get a handle to the event data service" << endmsg; 00059 return sc; 00060 } else { 00061 log << MSG::DEBUG << "Got pointer to IDataProviderSvc \"" << m_evtDataProviderName << '"' << endmsg; 00062 } 00063 00064 log << MSG::INFO << "Event times generated from " << m_startTime << " with steps of " << m_timeStep << endmsg; 00065 00066 return StatusCode::SUCCESS; 00067 }
| StatusCode FakeEventTime::finalize | ( | ) | [virtual] |
Finalization.
Reimplemented from AlgTool.
Definition at line 72 of file FakeEventTime.cpp.
00072 { 00073 // local finalization 00074 MsgStream log(msgSvc(),name()); 00075 log << MSG::DEBUG << "--- finalize ---" << endmsg; 00076 00077 // release the interfaces used 00078 if (m_evtDataProvider != NULL) m_evtDataProvider->release(); 00079 00080 return AlgTool::finalize(); 00081 }
| Gaudi::Time FakeEventTime::getTime | ( | ) | const [virtual] |
Return the time of current event.
Implements IEventTimeDecoder.
Definition at line 87 of file FakeEventTime.cpp.
00087 { 00088 00089 // Here we should get the time from the EventDataSvc 00090 Gaudi::Time currentTime(m_startTime); 00091 00092 // increment for the next event 00093 FakeEventTime *myPtr = const_cast<FakeEventTime *>(this); 00094 myPtr->m_startTime += m_timeStep; 00095 00096 return currentTime; 00097 }
std::string FakeEventTime::m_evtDataProviderName [private] |
Name of the Data Provider (set by the option EvtDataSvc, by default "EventDataSvc").
Definition at line 45 of file FakeEventTime.h.
IDataProviderSvc* FakeEventTime::m_evtDataProvider [private] |
Handle to the Data Provider interface of EventDataSvc (where to find the time... in the future).
Definition at line 49 of file FakeEventTime.h.
long long FakeEventTime::m_startTime [private] |
First event time (when simluating them).
Set by the option StartTime (default = 0)
Definition at line 54 of file FakeEventTime.h.
long long FakeEventTime::m_timeStep [private] |
Event time increment (when simluating event times).
Set by the option TimeStep (default = 0, which means no simulation)
Definition at line 57 of file FakeEventTime.h.
1.4.7