BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/src/test/test_read.cxx
Go to the documentation of this file.
1#include "test_read.h"
2#include "GaudiKernel/Bootstrap.h"
3#include "VertexFit/IVertexDbSvc.h"
4
5#include "GaudiKernel/ISvcLocator.h"
6#include "GaudiKernel/PropertyMgr.h"
7
8test_read::test_read( const std::string& name, ISvcLocator* pSvcLocator )
9 : Algorithm( name, pSvcLocator ) {
10 // Declare properties here.
11}
12
14 StatusCode sc;
15 MsgStream log( msgSvc(), name() );
16 log << MSG::INFO << "Initialize()" << endmsg;
17
18 // So far don't have any properties, but in case we do some day..
19 // setProperties();
20 /*sc = service("VertexDbSvc", m_mdc, true);
21 if ( !sc.isSuccess() ) {
22 log << MSG::ERROR
23 << "Could not get ICalibRootSvc interface of CalibRootCnvSvc"
24 << endmsg;
25 return sc;
26 }
27 */
28 // Get properties from the JobOptionsSvc
29
30 return StatusCode::SUCCESS;
31}
32
33StatusCode test_read::execute() {
34
35 MsgStream log( msgSvc(), name() );
36 // ReadPara* a1 = m_mdc->getReadPara();
37 IVertexDbSvc* vtxsvc;
38 Gaudi::svcLocator()->service( "VertexDbSvc", vtxsvc );
39 // service("VertexDbSvc", vtxsvc, true);
40 bool aa = vtxsvc->isVertexValid();
41 std::cout << " status: " << aa << std::endl;
42 double* a1 = vtxsvc->PrimaryVertex();
43 double* a2 = vtxsvc->SigmaPrimaryVertex();
44 std::cout << " vx: " << a1[0] << " vy: " << a1[1] << " vz: " << a1[2] << std::endl;
45 std::cout << " vx sigma: " << a2[0] << " vy sigma: " << a2[1] << " vz sigma: " << a2[2]
46 << std::endl;
47 return StatusCode::SUCCESS;
48}
49
50StatusCode test_read::finalize() { return StatusCode::SUCCESS; }
IMessageSvc * msgSvc()
virtual bool isVertexValid()=0
virtual double * SigmaPrimaryVertex()=0
virtual double * PrimaryVertex()=0
test_read(const std::string &name, ISvcLocator *pSvcLocator)