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