CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
UseMdcCalibData Class Reference

Simple algorithm to test functioning of "the other" TDS. More...

#include <UseMdcCalibData.h>

+ Inheritance diagram for UseMdcCalibData:

Public Member Functions

 UseMdcCalibData (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Simple algorithm to test functioning of "the other" TDS.

Definition at line 15 of file UseMdcCalibData.h.

Constructor & Destructor Documentation

◆ UseMdcCalibData()

UseMdcCalibData::UseMdcCalibData ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 39 of file UseMdcCalibData.cxx.

41 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
42{
43 // Declare properties here.
44
45}

Member Function Documentation

◆ execute()

StatusCode UseMdcCalibData::execute ( )

Definition at line 86 of file UseMdcCalibData.cxx.

86 {
87
88 MsgStream log(msgSvc(), name());
89
90 // Cheat for now since Windows is having trouble finding definition
91
92 std::string fullPath = "/Calib/MdcCal";
93 std::string file =m_pRootSvc->getrootfile();
94 std::cout<<"file="<<file<<"\n";
95// return StatusCode::SUCCESS;
96 log << MSG::INFO<<"execute() fullPath = "<<fullPath<< endreq;
97
98 SmartDataPtr<CalibData::MdcCalibData> test1Copy(m_pCalibDataSvc, fullPath);
99 if(!test1Copy);
100 // CalibData::MdcCalibData test;
101
102 // m_pCalibDataSvc->registerObject(FullPath,test);
103 m_pRootSvc->writeToRoot("Mdc_test.root", fullPath);
104// SmartDataPtr<CalibData::MdcCalibData> test1Copy(m_pCalibDataSvc, fullPath);
105 // if(!test1Copy);
106 return StatusCode::SUCCESS;
107}
virtual StatusCode writeToRoot(const std::string &outputFile, const std::string &tdsPath)=0
virtual std::string getrootfile()=0

◆ finalize()

StatusCode UseMdcCalibData::finalize ( )

Definition at line 111 of file UseMdcCalibData.cxx.

111 {
112
113 MsgStream log(msgSvc(), name());
114 log << MSG::INFO
115 << " UseMdcCalibData1 FINALIZE!! "
116 << endreq;
117
118 return StatusCode::SUCCESS;
119}

◆ initialize()

StatusCode UseMdcCalibData::initialize ( )

Definition at line 48 of file UseMdcCalibData.cxx.

48 {
49 StatusCode sc;
50 MsgStream log(msgSvc(), name());
51 log << MSG::INFO << "Initialize()" << endreq;
52
53 // So far don't have any properties, but in case we do some day..
54// setProperties();
55
56 log<<MSG::INFO << "setProperties()" << endreq;
57
58 sc = service("CalibDataSvc", m_pCalibDataSvc, true);
59
60 if ( !sc.isSuccess() ) {
61 log << MSG::ERROR
62 << "Could not get IDataProviderSvc interface of CalibXmlCnvSvc"
63 << endreq;
64 return sc;
65 } else {
66 log << MSG::DEBUG
67 << "Retrieved IDataProviderSvc interface of CalibXmlCnvSvc"
68 << endreq;
69 }
70
71 sc = service("CalibRootCnvSvc", m_pRootSvc, true);
72 if ( !sc.isSuccess() ) {
73 log << MSG::ERROR
74 << "Could not get ICalibRootSvc interface of CalibRootCnvSvc"
75 << endreq;
76 return sc;
77 }
78 // Get properties from the JobOptionsSvc
79
80 sc = setProperties();
81 return StatusCode::SUCCESS;
82
83}

The documentation for this class was generated from the following files: