BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/MdcTunningSvc/src/test/test_read.cxx
Go to the documentation of this file.
1#include "test_read.h"
2#include "BesMdcRes.hh"
3#include "ReadPara.hh"
4test_read::test_read( const std::string& name, ISvcLocator* pSvcLocator )
5 : Algorithm( name, pSvcLocator ) {
6 // Declare properties here.
7}
8
9StatusCode test_read::initialize() {
10 StatusCode sc;
11 MsgStream log( msgSvc(), name() );
12 log << MSG::INFO << "Initialize()" << endmsg;
13
14 // So far don't have any properties, but in case we do some day..
15 // setProperties();
16 sc = service( "MdcTunningSvc", m_mdc, true );
17 if ( !sc.isSuccess() )
18 {
19 log << MSG::ERROR << "Could not get ICalibRootSvc interface of CalibRootCnvSvc" << endmsg;
20 return sc;
21 }
22
23 // Get properties from the JobOptionsSvc
24
25 return StatusCode::SUCCESS;
26}
27
28StatusCode test_read::execute() {
29
30 MsgStream log( msgSvc(), name() );
31 for ( int i = 0; i < 43; i++ )
32 {
33 for ( int j = 0; j < 20; j++ )
34 {
35 double aa = m_mdc->get_docaEff( i, j );
36 double bb = m_mdc->get_thetaEff( i, j );
37 double cc = m_mdc->get_cellEff( i, j );
38 std::cout << "i: " << i << " j: " << j << std::endl;
39 std::cout << " get_docaEff: " << aa << " thetaEff:" << bb << " cellEff:" << cc
40 << std::endl;
41 }
42 }
43
44 return StatusCode::SUCCESS;
45}
46
47StatusCode test_read::finalize() { return StatusCode::SUCCESS; }
IMessageSvc * msgSvc()
test_read(const std::string &name, ISvcLocator *pSvcLocator)