BOSS
7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/VertexFit-00-03-06/src/test/test_read.cxx
Go to the documentation of this file.
1
#include "
test_read.h
"
2
#include "
VertexFit/IVertexDbSvc.h
"
3
#include "GaudiKernel/Bootstrap.h"
4
5
#include "GaudiKernel/ISvcLocator.h"
6
#include "GaudiKernel/PropertyMgr.h"
7
8
test_read::test_read
(
const
std::string& name,
9
ISvcLocator* pSvcLocator )
10
: Algorithm ( name, pSvcLocator )
11
{
12
// Declare properties here.
13
14
}
15
16
17
StatusCode
test_read::initialize
() {
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
39
StatusCode
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
55
StatusCode
test_read::finalize
() {
56
return
StatusCode::SUCCESS;
57
}
test_read.h
IVertexDbSvc.h
msgSvc
IMessageSvc * msgSvc()
Definition
ServiceAccessor.h:13
IVertexDbSvc
Definition
IVertexDbSvc.h:14
IVertexDbSvc::isVertexValid
virtual bool isVertexValid()=0
IVertexDbSvc::SigmaPrimaryVertex
virtual double * SigmaPrimaryVertex()=0
IVertexDbSvc::PrimaryVertex
virtual double * PrimaryVertex()=0
test_read::initialize
StatusCode initialize()
Definition
Analysis/VertexFit/VertexFit-00-03-06/src/test/test_read.cxx:17
test_read::execute
StatusCode execute()
Definition
Analysis/VertexFit/VertexFit-00-03-06/src/test/test_read.cxx:39
test_read::test_read
test_read(const std::string &name, ISvcLocator *pSvcLocator)
Definition
Analysis/VertexFit/VertexFit-00-03-06/src/test/test_read.cxx:8
test_read::finalize
StatusCode finalize()
Definition
Analysis/VertexFit/VertexFit-00-03-06/src/test/test_read.cxx:55
7.1.2
Analysis
VertexFit
VertexFit-00-03-06
src
test
test_read.cxx
Generated by
1.12.0