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
8
test_read::test_read
(
const
std::string& name, ISvcLocator* pSvcLocator )
9
: Algorithm( name, pSvcLocator ) {
10
// Declare properties here.
11
}
12
13
StatusCode
test_read::initialize
() {
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
33
StatusCode
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
50
StatusCode
test_read::finalize
() {
return
StatusCode::SUCCESS; }
test_read.h
msgSvc
IMessageSvc * msgSvc()
Definition
ServiceAccessor.h:12
IVertexDbSvc
Definition
Analysis/VertexDbSvc/include/VertexDbSvc/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/src/test/test_read.cxx:13
test_read::execute
StatusCode execute()
Definition
Analysis/VertexFit/src/test/test_read.cxx:33
test_read::test_read
test_read(const std::string &name, ISvcLocator *pSvcLocator)
Definition
Analysis/VertexFit/src/test/test_read.cxx:8
test_read::finalize
StatusCode finalize()
Definition
Analysis/VertexFit/src/test/test_read.cxx:50
8.0.0
BOSS_Source
Analysis
VertexFit
src
test
test_read.cxx
Generated by
1.16.1