/search.css" rel="stylesheet" type="text/css"/> /search.js">
00001 #include "MockEvtStorageSvc.h" 00002 00003 #include "DybKernel/IRegistrationSequence.h" 00004 00005 #include "GaudiKernel/MsgStream.h" 00006 00007 MockEvtStorageSvc::MockEvtStorageSvc(const std::string& name, 00008 ISvcLocator* svc) : 00009 Service(name, 00010 svc) { 00011 } 00012 00013 MockEvtStorageSvc::~MockEvtStorageSvc() { 00014 } 00015 00016 StatusCode MockEvtStorageSvc::store(const IRegistrationSequence& regSeq) { 00017 00018 typedef IRegistrationSequence::Registrations Registrations; 00019 00020 MsgStream log(msgSvc(), 00021 name()); 00022 log << MSG::INFO 00023 << "The following item are to be stored." 00024 << endreq; 00025 00026 const Registrations& registrations = regSeq.registrations(); 00027 const Registrations::const_iterator finished = registrations.end(); 00028 for (Registrations::const_iterator registration = registrations.begin(); 00029 finished != registration; 00030 ++registration) { 00031 std::string store = ""; 00032 if ((*registration).store()) { 00033 log << MSG::INFO 00034 << " An object registered at \"" 00035 << (*registration).path() 00036 << "\"." 00037 << endreq; 00038 } 00039 } 00040 00041 return StatusCode::SUCCESS; 00042 } 00043 00044 StatusCode MockEvtStorageSvc::queryInterface(const InterfaceID& id, 00045 void** interface) { 00046 if (IDybStorageSvc::interfaceID().versionMatch(id)) { 00047 // If good enough match return this object. 00048 *interface = (IDybStorageSvc*)this; 00049 addRef(); 00050 } else { 00051 // Interface is not directly available: try out a base class. 00052 return Service::queryInterface(id, 00053 interface); 00054 } 00055 00056 return StatusCode::SUCCESS; 00057 }