2#include "GaudiKernel/SmartIF.h"
3#include "GaudiKernel/IJobOptionsSvc.h"
4#include "GaudiKernel/MsgStream.h"
11 int (*pf_helper)(ISvcLocator*);
15 : base_class(name, svcloc)
17 declareProperty(
"Config", m_conf = std::string(getenv(
"DETVERSVCROOT")) +
"/share/config.txt");
39 Service::initialize();
41 MsgStream log(messageService(), name());
42 log << MSG::INFO << name() <<
": Start of run initialisation" << endreq;
45 if ( access( m_conf.c_str(), F_OK ) < 0 ) {
46 log << MSG::FATAL <<
"Cann't find config file: " << m_conf << endreq;
47 return StatusCode::FAILURE;
50 return StatusCode::SUCCESS;
54 MsgStream log(messageService(), name());
55 log << MSG::INFO << name() <<
": End of Run finalize" << endreq;
57 return StatusCode::SUCCESS;
63 SmartIF<IJobOptionsSvc> iSvc(serviceLocator()->service(
"JobOptionsSvc"));
64 if ( iSvc.isValid() ) {
66 const std::vector<const Property*>* ps = 0;
67 if ( (ps = iSvc->getProperties(
"RawDataInputSvc")) != 0 ) {
68 dll =
"libDetVerSvc_IRaw.so";
70 else if ( (ps = iSvc->getProperties(
"EventCnvSvc")) != 0 ) {
71 dll =
"libDetVerSvc_IRoot.so";
73 else if ( (ps = iSvc->getProperties(
"RealizationSvc")) != 0 ) {
74 dll =
"libDetVerSvc_Sim.so";
78 void *dl_handler = dlopen(dll.c_str(), RTLD_LAZY|RTLD_GLOBAL);
79 if ( dl_handler != 0 ) {
90 std::vector<int> runList;
93 std::ifstream fs(m_conf.c_str());
95 while ( ! fs.eof() ) {
96 runList.push_back(iTmp);
102 for ( std::vector<int>::iterator it = runList.begin(); it != runList.end(); ++it ) {
virtual StatusCode finalize()
int fromRun(unsigned int run)
DetVerSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode initialize()
int(* pf_helper)(ISvcLocator *)