#include <ArchiveTrimSvc.h>
Inheritance diagram for ArchiveTrimSvc:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
Public Member Functions | |
ArchiveTrimSvc (const std::string &name, ISvcLocator *svc) | |
Standard Service Constructor. | |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual StatusCode | trim (IDataManagerSvc *dataStore, TimeStamp latest) |
IArchiveTrimSvc methods. | |
virtual const TimeStamp & | window (const std::string &path) |
virtual StatusCode | queryInterface (const InterfaceID &id, void **interface) |
Methods required by ServiceManager. | |
void | updateWindow (Property &property) |
Callback method for window value. | |
virtual unsigned long | addRef () |
virtual unsigned long | release () |
virtual const std::string & | name () const |
virtual const InterfaceID & | type () 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 |
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 |
Protected Attributes | |
IntegerProperty | m_outputLevel |
Gaudi::StateMachine::State | m_state |
Gaudi::StateMachine::State | m_targetState |
IMessageSvc * | m_messageSvc |
Private Member Functions | |
void | _update () |
Private Attributes | |
DoubleProperty | m_defaultWindowSeconds |
The Time window used by this service in seconds (no system of units!). | |
TrimmingAgent * | m_agent |
The DataStoreAgent used to timr the contents of the store. | |
Friends | |
friend class | ServiceManager |
Definition at line 13 of file ArchiveTrimSvc.h.
ArchiveTrimSvc::ArchiveTrimSvc | ( | const std::string & | name, | |
ISvcLocator * | svc | |||
) |
Standard Service Constructor.
Definition at line 9 of file ArchiveTrimSvc.cpp.
00010 : 00011 Service(name, 00012 svc), 00013 m_agent(0) { 00014 declareProperty("DefaultWindowSeconds", 00015 m_defaultWindowSeconds=0, 00016 "The default length of the trim window in seconds."); 00017 m_defaultWindowSeconds.declareUpdateHandler(&ArchiveTrimSvc::updateWindow, 00018 this); 00019 }
StatusCode ArchiveTrimSvc::initialize | ( | ) | [virtual] |
Reimplemented from Service.
Definition at line 36 of file ArchiveTrimSvc.cpp.
00036 { 00037 StatusCode status = Service::initialize(); 00038 if (status.isFailure()) { 00039 throw GaudiException("Could not initialize super class", 00040 name(), 00041 status); 00042 } 00043 00044 m_agent = new TrimmingAgent(new MsgStream(msgSvc(), 00045 name())); 00046 this->_update(); 00047 return StatusCode::SUCCESS; 00048 }
StatusCode ArchiveTrimSvc::finalize | ( | ) | [virtual] |
Reimplemented from Service.
Definition at line 50 of file ArchiveTrimSvc.cpp.
00050 { 00051 if (0 != m_agent) { 00052 delete m_agent; 00053 } 00054 00055 return Service::finalize(); 00056 }
StatusCode ArchiveTrimSvc::trim | ( | IDataManagerSvc * | dataStore, | |
TimeStamp | latest | |||
) | [virtual] |
IArchiveTrimSvc methods.
Implements IArchiveTrimSvc.
Definition at line 77 of file ArchiveTrimSvc.cpp.
00078 { 00079 m_agent->setLatest(latest); 00080 return dataStore->traverseTree(m_agent); 00081 }
const TimeStamp & ArchiveTrimSvc::window | ( | const std::string & | path | ) | [virtual] |
Implements IArchiveTrimSvc.
Definition at line 83 of file ArchiveTrimSvc.cpp.
00083 { 00084 if ( 0 == m_agent) { 00085 throw GaudiException("Service not yet initialized", 00086 name(), 00087 StatusCode::FAILURE); 00088 } 00089 return m_agent->window(path); 00090 }
StatusCode ArchiveTrimSvc::queryInterface | ( | const InterfaceID & | id, | |
void ** | interface | |||
) | [virtual] |
Methods required by ServiceManager.
Reimplemented from Service.
Definition at line 21 of file ArchiveTrimSvc.cpp.
00022 { 00023 if (IArchiveTrimSvc::interfaceID().versionMatch(id)) { 00024 // If good enough match return this object. 00025 *interface = (IArchiveTrimSvc*)this; 00026 addRef(); 00027 } else { 00028 // Interface is not directly available: try out a base class. 00029 return Service::queryInterface(id, 00030 interface); 00031 } 00032 00033 return StatusCode::SUCCESS; 00034 }
void ArchiveTrimSvc::updateWindow | ( | Property & | property | ) |
void ArchiveTrimSvc::_update | ( | ) | [private] |
Definition at line 63 of file ArchiveTrimSvc.cpp.
00064 { 00065 MsgStream log(msgSvc(), name()); 00066 00067 TimeStamp dt(m_defaultWindowSeconds); 00068 00069 log << MSG::INFO 00070 << "Setting default AES window to " 00071 << double(dt) 00072 << " seconds" << endreq; 00073 00074 m_agent->setWindow(dt); 00075 }
The Time window used by this service in seconds (no system of units!).
Definition at line 42 of file ArchiveTrimSvc.h.
TrimmingAgent* ArchiveTrimSvc::m_agent [private] |
The DataStoreAgent used to timr the contents of the store.
Definition at line 48 of file ArchiveTrimSvc.h.