#include <DybEvtSelector.h>
Inheritance diagram for DybEvtSelector:
Public Types | |
SUCCESS | |
NO_INTERFACE | |
VERSMISMATCH | |
LAST_ERROR | |
enum | Status |
enum | Status |
Public Member Functions | |
DybEvtSelector (const std::string &name, ISvcLocator *svcloc) | |
virtual | ~DybEvtSelector () |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual StatusCode | setEntry (RootIOEvtSelector::Context &rc, int entry) const |
This will be called from the IEvtSelector navigation methods with the context prior to navigation (old entry) and the new entry. | |
virtual StatusCode | createContext (IEvtSelector::Context *&c) const |
virtual StatusCode | next (IEvtSelector::Context &c) const |
virtual StatusCode | next (IEvtSelector::Context &c, int jump) const |
virtual StatusCode | previous (IEvtSelector::Context &c) const |
virtual StatusCode | previous (IEvtSelector::Context &c, int jump) const |
virtual StatusCode | last (IEvtSelector::Context &refContext) const |
virtual StatusCode | rewind (IEvtSelector::Context &c) const |
virtual StatusCode | createAddress (const IEvtSelector::Context &c, IOpaqueAddress *&iop) const |
virtual StatusCode | releaseContext (IEvtSelector::Context *&c) const |
virtual StatusCode | resetCriteria (const std::string &cr, IEvtSelector::Context &c) const |
StatusCode | queryInterface (const InterfaceID &riid, void **ppif) |
virtual unsigned long | addRef () |
virtual unsigned long | addRef ()=0 |
virtual unsigned long | release () |
virtual unsigned long | release ()=0 |
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 |
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 | |
IRootIOSvc * | m_rioSvc |
IntegerProperty | m_outputLevel |
Gaudi::StateMachine::State | m_state |
Gaudi::StateMachine::State | m_targetState |
IMessageSvc * | m_messageSvc |
Private Attributes | |
std::string | m_reqSeqName |
Property: RegSeq. | |
IDybIODaqSvc * | m_daqSvc |
RootInputStream * | m_controlStream |
Friends | |
friend friend class | ServiceManager |
Know about RegistrationSequence in order to implement Daya Bay I/O policy.
bv@bnl.gov Thu Jul 10 16:43:18 2008
Definition at line 28 of file DybEvtSelector.h.
DybEvtSelector::DybEvtSelector | ( | const std::string & | name, | |
ISvcLocator * | svcloc | |||
) |
Definition at line 16 of file DybEvtSelector.cc.
00017 : Service(name,svcloc) 00018 , RootIOEvtSelector(name,svcloc) 00019 , m_reqSeqName("") 00020 , m_daqSvc(0) 00021 , m_controlStream(0)/*, m_regCnv(0)*/ 00022 { 00023 m_reqSeqName = DayaBay::RegistrationSequenceLocation::Default; 00024 declareProperty("ReqSeq",m_reqSeqName, 00025 "TES/TFile path where to find the RegistrationSequence"); 00026 00027 }
DybEvtSelector::~DybEvtSelector | ( | ) | [virtual] |
StatusCode DybEvtSelector::initialize | ( | ) | [virtual] |
Reimplemented from RootIOEvtSelector.
Definition at line 33 of file DybEvtSelector.cc.
00034 { 00035 StatusCode sc = RootIOEvtSelector::initialize(); 00036 if (sc.isFailure()) { 00037 return sc; 00038 } 00039 00040 IService* isvc=0; 00041 sc = serviceLocator()->service("DybIODaqSvc","DybIODaqSvc", isvc); 00042 if (sc.isFailure()) { 00043 m_daqSvc = 0; 00044 } else { 00045 sc = isvc->queryInterface(IDybIODaqSvc::interfaceID(), (void**)&m_daqSvc); 00046 if (sc.isFailure()) { 00047 m_daqSvc = 0; 00048 } 00049 } 00050 return StatusCode::SUCCESS; 00051 }
StatusCode DybEvtSelector::finalize | ( | ) | [virtual] |
Reimplemented from RootIOEvtSelector.
Definition at line 53 of file DybEvtSelector.cc.
00054 { 00055 if (0 != m_daqSvc) { 00056 m_daqSvc->release(); 00057 } 00058 return RootIOEvtSelector::finalize(); 00059 }
StatusCode DybEvtSelector::setEntry | ( | RootIOEvtSelector::Context & | rc, | |
int | entry | |||
) | const [virtual] |
This will be called from the IEvtSelector navigation methods with the context prior to navigation (old entry) and the new entry.
By default this sets the context to the new entry and then loads all possible input streams to that entry.
Subclasses may override this method to enforce some other input policy.
Reimplemented from RootIOEvtSelector.
Definition at line 61 of file DybEvtSelector.cc.
00062 { 00063 MsgStream log(msgSvc(), "DybEvtSelector"); 00064 00065 if (!m_controlStream) { 00066 IRootIOSvc::InputStreamMap& ism = m_rioSvc->inputStreams(); 00067 m_controlStream = ism[m_reqSeqName]; 00068 if (!m_controlStream) { 00069 log << MSG::WARNING << "failed to get control stream at " 00070 << m_reqSeqName << endreq; 00071 return StatusCode::FAILURE; 00072 } 00073 } 00074 00075 log << MSG::DEBUG << "Loading control stream (RegistrationSequence) entry " << entry << endreq; 00076 00077 // Set entry to the RegistrationSequence 00078 if (0 != m_daqSvc) { 00079 StatusCode sc = m_daqSvc->setEventEntry(entry); 00080 if (sc.isFailure()) { 00081 log << MSG::INFO 00082 << "No more DAQ blocks are available" 00083 << endreq; 00084 } 00085 } 00086 00087 bool okay = m_controlStream->setEntry(entry,false); // false == do not read TObject 00088 if (!okay) { 00089 log << MSG::WARNING << "Failed to set entry " << 00090 entry << " for control input stream " << m_reqSeqName << endreq; 00091 log << MSG::WARNING << "End of the input stream?" << endreq; 00092 return StatusCode::FAILURE; 00093 } 00094 00095 //IRootIOSvc::InputStreamMap& ism = m_rioSvc->inputStreams(); 00096 00097 rc.m_entry = entry; 00098 return StatusCode::SUCCESS; 00099 }
std::string DybEvtSelector::m_reqSeqName [private] |
Property: RegSeq.
Name of TES/TFile path where the RegistrationSequence is to be found.
Definition at line 51 of file DybEvtSelector.h.
IDybIODaqSvc* DybEvtSelector::m_daqSvc [private] |
Definition at line 53 of file DybEvtSelector.h.
RootInputStream* DybEvtSelector::m_controlStream [mutable, private] |
Definition at line 54 of file DybEvtSelector.h.