/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #include "src/TESDemoDumpRegSeq.h" 00002 00003 #include "Event/RegistrationSequence.h" 00004 00005 using namespace DayaBay; 00006 00007 TESDemoDumpRegSeq::TESDemoDumpRegSeq( const std::string& name, 00008 ISvcLocator* pSvcLocator ) : 00009 GaudiAlgorithm(name, 00010 pSvcLocator) 00011 { 00012 declareProperty("RegSeqPath", 00013 m_regSeqPath="/Event/RegistrationSequence", 00014 "Path, in the TES, where the RegistrationSequnce object is kept"); 00015 } 00016 00017 StatusCode TESDemoDumpRegSeq::initialize() { 00018 00019 info() << "in initialize" 00020 << endreq; 00021 info() << m_regSeqPath 00022 << endreq; 00023 00024 return StatusCode::SUCCESS; 00025 } 00026 00027 StatusCode TESDemoDumpRegSeq::execute() { 00028 00029 SmartDataPtr<RegistrationSequence> regSeq(eventSvc(), 00030 "/Event/RegistrationSequence"); 00031 if (0 == regSeq) { 00032 info() << "Failed to retrieve RegistrationSequence from Event Store" 00033 << endreq; 00034 return StatusCode::SUCCESS; 00035 } 00036 00037 if (regSeq->empty()) { 00038 info() << "Retrieved RegistrationSequence is empty" 00039 << endreq; 00040 return StatusCode::SUCCESS; 00041 } 00042 00043 typedef RegistrationSequence::Registrations Registrations; 00044 00045 info() << "Dump of RegistrationSequence for this Processing cycle." 00046 << endreq; 00047 00048 const Registrations& registrations = regSeq->registrations(); 00049 const Registrations::const_iterator finished = registrations.end(); 00050 for (Registrations::const_iterator registration = registrations.begin(); 00051 finished != registration; 00052 ++registration) { 00053 std::string store = ""; 00054 if (!(*registration).store()) { 00055 store = "not "; 00056 } 00057 info() << " There was an object registered at \"" 00058 << (*registration).path() 00059 << "\" which is " 00060 << store 00061 << "marked for storage." 00062 << endreq; 00063 } 00064 00065 return StatusCode::SUCCESS; 00066 } 00067 00068 StatusCode TESDemoDumpRegSeq::finalize() { 00069 00070 info() << "in finalize" 00071 << endreq; 00072 00073 return StatusCode::SUCCESS; 00074 } 00075 00076 00077