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