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

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

#include <UseEstTof.h>

+ Inheritance diagram for UseEstTof:

Public Member Functions

 UseEstTof (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 16 of file UseEstTof.h.

Constructor & Destructor Documentation

◆ UseEstTof()

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

Definition at line 49 of file UseEstTof.cxx.

51 : Algorithm ( name, pSvcLocator ), m_pCalibDataSvc(0)
52{
53 // Declare properties here.
54
55}

Member Function Documentation

◆ execute()

StatusCode UseEstTof::execute ( )

Definition at line 97 of file UseEstTof.cxx.

97 {
98
99 MsgStream log(msgSvc(), name());
100
101 // Cheat for now since Windows is having trouble finding definition
102 // of Calibdata::Test_t
103 std::string fullPath = "/Calib/TofQElec";
104 log << MSG::INFO<<"execute() fullPath = "<<fullPath<< endreq;
105
106 SmartDataPtr<CalibData::TofElecData> btof(m_pCalibDataSvc, fullPath);
107
108 for(int i =0;i<96;i++)
109 {
110 CalibData::BarrelElec aa = btof->getBTof(i);
111 CalibData::EndcapElec bb = btof->getETof(i);
112 std::cout<<"i==========="<<i<<std::endl;
113 for(int j=0;j<4;j++){
114 std::cout<<"getNumEast=="<<aa.getNumEast(j)<<" getNumWest=="<<aa.getNumWest(j)<<std::endl;
115 std::cout<<"getEast=="<<bb.getNum(j)<<std::endl;
116 }
117 for(int j=0;j<10;j++){
118 std::cout<<"j==="<<j<<std::endl;
119 std::cout<<" getP1=="<<aa.getP1(j)<<std::endl;
120 std::cout<<" getP2=="<<aa.getP2(j)<<std::endl;
121 std::cout<<" getSimP1=="<<aa.getSimP1(j)<<std::endl;
122 std::cout<<" getSimP2=="<<aa.getSimP2(j)<<std::endl;
123 std::cout<<" getP=="<<bb.getP(j)<<std::endl;
124 std::cout<<" getSimP=="<<bb.getSimP(j)<<std::endl;
125 }
126 }
127
128
129
130
131
132 //maqm comment because cann't write
133 // m_pRootSvc->writeToRoot("./Tof_test.root", fullPath);
134
135 return StatusCode::SUCCESS;
136}

◆ finalize()

StatusCode UseEstTof::finalize ( )

Definition at line 140 of file UseEstTof.cxx.

140 {
141
142 MsgStream log(msgSvc(), name());
143 log << MSG::INFO
144 << " UseTof FINALIZE!! "
145 << endreq;
146
147 return StatusCode::SUCCESS;
148}

◆ initialize()

StatusCode UseEstTof::initialize ( )

Definition at line 58 of file UseEstTof.cxx.

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

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