BOSS 8.0.0
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 17 of file UseEstTof.h.

Constructor & Destructor Documentation

◆ UseEstTof()

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

Definition at line 50 of file UseEstTof.cxx.

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

Member Function Documentation

◆ execute()

StatusCode UseEstTof::execute ( )

Definition at line 89 of file UseEstTof.cxx.

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

◆ finalize()

StatusCode UseEstTof::finalize ( )

Definition at line 131 of file UseEstTof.cxx.

131 {
132
133 MsgStream log( msgSvc(), name() );
134 log << MSG::INFO << " UseTof FINALIZE!! " << endmsg;
135
136 return StatusCode::SUCCESS;
137}

◆ initialize()

StatusCode UseEstTof::initialize ( )

Definition at line 55 of file UseEstTof.cxx.

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

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