BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
DataInfoSvc.cxx
Go to the documentation of this file.
1#include "GaudiKernel/IInterface.h"
2#include "GaudiKernel/StatusCode.h"
3#include "GaudiKernel/SvcFactory.h"
4#include "GaudiKernel/MsgStream.h"
5#include "GaudiKernel/ISvcLocator.h"
6#include "GaudiKernel/SmartDataPtr.h"
7#include "GaudiKernel/IDataProviderSvc.h"
8#include "GaudiKernel/PropertyMgr.h"
9#include "GaudiKernel/SmartIF.h"
10#include "GaudiKernel/IAppMgrUI.h"
11#include "GaudiKernel/IProperty.h"
12
13
14#include "GaudiKernel/IIncidentSvc.h"
15#include "GaudiKernel/Incident.h"
16#include "GaudiKernel/IIncidentListener.h"
17#include "GaudiKernel/ISvcLocator.h"
18#include "GaudiKernel/Bootstrap.h"
19
20#include "DataInfoSvc/DataInfoSvc.h"
21#include <iostream>
22#include <fstream>
23
24DataInfoSvc::DataInfoSvc( const string& name, ISvcLocator* svcloc) :
25 Service (name, svcloc){
26 // declare properties
27}
28
30}
31
32StatusCode DataInfoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
33 if( IID_IDataInfoSvc.versionMatch(riid) ){
34 *ppvInterface = static_cast<IDataInfoSvc*> (this);
35 } else{
36 return Service::queryInterface(riid, ppvInterface);
37 }
38 return StatusCode::SUCCESS;
39}
40
42 MsgStream log(messageService(), name());
43 log << MSG::INFO << "DataInfoSvc::initialize()" << endreq;
44
45 StatusCode sc = Service::initialize();
46 sc = setProperties();
47 return StatusCode::SUCCESS;
48}
49
51{
52 ifstream fin(card.c_str());
53 string tempString;
54 int i=0;
55 while(getline(fin,tempString))
56 {
57 if(tempString.size()>0)
58 {
59 m_decayOptions += tempString;
60 m_decayOptions += "\n";
61 }
62 i++;
63 }
64 if(i>100) m_decayOptions = "";
65 MsgStream log(messageService(), name());
66 log << MSG::INFO << "set decayOptions: " << endreq;
67 log << MSG::INFO << endreq
68 << m_decayOptions << endreq;
69}
70
71
73 MsgStream log(messageService(), name());
74 log << MSG::INFO << "DataInfoSvc::finalize()" << endreq;
75 return StatusCode::SUCCESS;
76}
77
78
DataInfoSvc(const std::string &name, ISvcLocator *svcloc)
virtual StatusCode finalize()
Definition: DataInfoSvc.cxx:72
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
Definition: DataInfoSvc.cxx:32
void setDecayCard(string card)
Definition: DataInfoSvc.cxx:50
virtual StatusCode initialize()
Definition: DataInfoSvc.cxx:41