#include <HistoryKeeper.h>
Inheritance diagram for HistoryKeeper:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
Public Member Functions | |
HistoryKeeper (const std::string &name, ISvcLocator *svcloc) | |
virtual | ~HistoryKeeper () |
virtual StatusCode | initialize () |
Initialise the service. | |
virtual StatusCode | finalize () |
Finalise the service. | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
Query the interfaces. | |
virtual const InterfaceID & | type () const |
Service type. | |
virtual StatusCode | GetCurrentHistory (DayaBay::SimParticleHistory *&outHistory) |
Used to get the current history in the simulation. Creates a new one if none yet made. | |
virtual StatusCode | ClaimCurrentHistory (DayaBay::SimParticleHistory *&outHistory) |
Used o pull this data into the TES. | |
virtual StatusCode | GetCurrentUnobservable (DayaBay::SimUnobservableStatisticsHeader *&outUnobservable) |
Used to get the current Unobservable in the simulation. Creates a new one if none yet made. | |
virtual StatusCode | ClaimCurrentUnobservable (DayaBay::SimUnobservableStatisticsHeader *&outUnobservable) |
Used o pull this data into the TES. | |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
virtual const std::string & | name () const |
virtual StatusCode | configure () |
virtual StatusCode | start () |
virtual StatusCode | stop () |
virtual StatusCode | terminate () |
virtual Gaudi::StateMachine::State | FSMState () const |
virtual Gaudi::StateMachine::State | targetFSMState () const |
virtual StatusCode | reinitialize () |
virtual StatusCode | restart () |
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 |
ISvcLocator * | serviceLocator () const |
IMessageSvc * | msgSvc () |
IMessageSvc * | msgSvc () const |
IMessageSvc * | messageService () |
IMessageSvc * | messageService () const |
StatusCode | setProperties () |
StatusCode | service (const std::string &name, T *&psvc, bool createIf=true) const |
StatusCode | service (const std::string &svcType, const std::string &svcName, T *&psvc) const |
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 |
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 void | setServiceManager (ISvcManager *)=0 |
Protected Attributes | |
IntegerProperty | m_outputLevel |
Gaudi::StateMachine::State | m_state |
Gaudi::StateMachine::State | m_targetState |
IMessageSvc * | m_messageSvc |
Private Attributes | |
DayaBay::SimParticleHistory * | mCurrentHistory |
DayaBay::SimUnobservableStatisticsHeader * | mCurrentUnobservable |
Friends | |
friend class | ServiceManager |
Definition at line 9 of file HistoryKeeper.h.
HistoryKeeper::HistoryKeeper | ( | const std::string & | name, | |
ISvcLocator * | svcloc | |||
) | [inline] |
Definition at line 12 of file HistoryKeeper.h.
00013 : Service( name, svcloc ) 00014 , mCurrentHistory(0) 00015 , mCurrentUnobservable(0) 00016 {};
virtual HistoryKeeper::~HistoryKeeper | ( | ) | [inline, virtual] |
virtual StatusCode HistoryKeeper::initialize | ( | ) | [inline, virtual] |
Initialise the service.
Reimplemented from Service.
Definition at line 21 of file HistoryKeeper.h.
00021 { mCurrentHistory = 0; return StatusCode::SUCCESS; };
virtual StatusCode HistoryKeeper::finalize | ( | ) | [inline, virtual] |
Finalise the service.
Reimplemented from Service.
Definition at line 23 of file HistoryKeeper.h.
00023 { if(mCurrentHistory) delete mCurrentHistory; mCurrentHistory = 0; return StatusCode::SUCCESS;};
StatusCode HistoryKeeper::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [virtual] |
Query the interfaces.
< IMPORTANT: increment the reference counter
Reimplemented from Service.
Definition at line 3 of file HistoryKeeper.cc.
00004 { 00005 // chech the placeholder for result 00006 if ( !ppvInterface ) { return StatusCode::FAILURE ; } 00007 // 00008 *ppvInterface = 0; 00009 // 00010 if ( riid == IHistoryKeeper::interfaceID() ) 00011 { 00012 *ppvInterface = static_cast<IHistoryKeeper*>(this); 00013 addRef(); 00014 return StatusCode::SUCCESS ; 00015 } 00016 // 00017 return Service::queryInterface( riid, ppvInterface ) ; 00018 }
virtual const InterfaceID& HistoryKeeper::type | ( | ) | const [inline, virtual] |
Service type.
Reimplemented from Service.
Definition at line 29 of file HistoryKeeper.h.
00030 { return IHistoryKeeper::interfaceID(); };
virtual StatusCode HistoryKeeper::GetCurrentHistory | ( | DayaBay::SimParticleHistory *& | outHistory | ) | [inline, virtual] |
Used to get the current history in the simulation. Creates a new one if none yet made.
Implements IHistoryKeeper.
Definition at line 33 of file HistoryKeeper.h.
00034 { 00035 if(mCurrentHistory==0) 00036 mCurrentHistory = new DayaBay::SimParticleHistory(); 00037 outHistory = mCurrentHistory; 00038 return StatusCode::SUCCESS; 00039 }
virtual StatusCode HistoryKeeper::ClaimCurrentHistory | ( | DayaBay::SimParticleHistory *& | outHistory | ) | [inline, virtual] |
Used o pull this data into the TES.
Reliquishes ownership of the current history. Returns 0 if no current history.
Implements IHistoryKeeper.
Definition at line 43 of file HistoryKeeper.h.
00044 { 00045 outHistory = mCurrentHistory; 00046 mCurrentHistory = 0; 00047 return StatusCode::SUCCESS; 00048 }
virtual StatusCode HistoryKeeper::GetCurrentUnobservable | ( | DayaBay::SimUnobservableStatisticsHeader *& | outUnobservable | ) | [inline, virtual] |
Used to get the current Unobservable in the simulation. Creates a new one if none yet made.
Implements IHistoryKeeper.
Definition at line 51 of file HistoryKeeper.h.
00052 { 00053 if(mCurrentUnobservable==0) 00054 mCurrentUnobservable = new DayaBay::SimUnobservableStatisticsHeader(); 00055 outUnobservable = mCurrentUnobservable; 00056 return StatusCode::SUCCESS; 00057 }
virtual StatusCode HistoryKeeper::ClaimCurrentUnobservable | ( | DayaBay::SimUnobservableStatisticsHeader *& | outUnobservable | ) | [inline, virtual] |
Used o pull this data into the TES.
Reliquishes ownership of the current Unobservable. Returns 0 if no current Unobservable.
Implements IHistoryKeeper.
Definition at line 61 of file HistoryKeeper.h.
00062 { 00063 outUnobservable = mCurrentUnobservable; 00064 mCurrentUnobservable = 0; 00065 return StatusCode::SUCCESS; 00066 }
const InterfaceID & IHistoryKeeper::interfaceID | ( | ) | [static, inherited] |
Reimplemented from IService.
Definition at line 8 of file IHistoryKeeper.cc.
00009 { 00010 return IID_IHistoryKeeper; 00011 }
Definition at line 69 of file HistoryKeeper.h.
Definition at line 70 of file HistoryKeeper.h.