BOSS 7.1.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
21#include <iostream>
22#include <fstream>
23
24DECLARE_COMPONENT(DataInfoSvc)
25
26DataInfoSvc::DataInfoSvc( const string& name, ISvcLocator* svcloc) :
27 base_class (name, svcloc){
28 // declare properties
29}
30
33
34/*StatusCode DataInfoSvc::queryInterface(const InterfaceID& riid, void** ppvInterface){
35 if( IID_IDataInfoSvc.versionMatch(riid) ){
36 *ppvInterface = static_cast<IDataInfoSvc*> (this);
37 } else{
38 return Service::queryInterface(riid, ppvInterface);
39 }
40 return StatusCode::SUCCESS;
41}*/
42
44 MsgStream log(messageService(), name());
45 log << MSG::INFO << "DataInfoSvc::initialize()" << endreq;
46
47 StatusCode sc = Service::initialize();
48 sc = setProperties();
49 return StatusCode::SUCCESS;
50}
51
53{
54 ifstream fin(card.c_str());
55 string tempString;
56 int i=0;
57 while(getline(fin,tempString))
58 {
59 if(tempString.size()>0)
60 {
61 m_decayOptions += tempString;
62 m_decayOptions += "\n";
63 }
64 i++;
65 }
66 if(i>100) m_decayOptions = "";
67 MsgStream log(messageService(), name());
68 log << MSG::INFO << "set decayOptions: " << endreq;
69 log << MSG::INFO << endreq
70 << m_decayOptions << endreq;
71}
72
73
75 MsgStream log(messageService(), name());
76 log << MSG::INFO << "DataInfoSvc::finalize()" << endreq;
77 return StatusCode::SUCCESS;
78}
79
80
virtual StatusCode finalize()
void setDecayCard(string card)
virtual StatusCode initialize()