00001 #include "test_read.h"
00002 #include "VertexFit/IVertexDbSvc.h"
00003 #include "GaudiKernel/Bootstrap.h"
00004
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "GaudiKernel/PropertyMgr.h"
00007
00008 test_read::test_read( const std::string& name,
00009 ISvcLocator* pSvcLocator )
00010 : Algorithm ( name, pSvcLocator )
00011 {
00012
00013
00014 }
00015
00016
00017 StatusCode test_read::initialize() {
00018 StatusCode sc;
00019 MsgStream log(msgSvc(), name());
00020 log << MSG::INFO << "Initialize()" << endreq;
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 return StatusCode::SUCCESS;
00035
00036 }
00037
00038
00039 StatusCode test_read::execute( ) {
00040
00041 MsgStream log(msgSvc(), name());
00042
00043 IVertexDbSvc* vtxsvc;
00044 Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
00045
00046 bool aa = vtxsvc->isVertexValid();
00047 std::cout<<" status: "<< aa <<std::endl;
00048 double* a1 = vtxsvc->PrimaryVertex();
00049 double* a2 = vtxsvc->SigmaPrimaryVertex();
00050 std::cout<<" vx: "<<a1[0]<<" vy: "<<a1[1] <<" vz: " << a1[2] <<std::endl;
00051 std::cout<<" vx sigma: "<<a2[0]<<" vy sigma: "<<a2[1] <<" vz sigma: " << a2[2] <<std::endl;
00052 return StatusCode::SUCCESS;
00053 }
00054
00055 StatusCode test_read::finalize() {
00056 return StatusCode::SUCCESS;
00057 }