/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Analysis/VertexFit/VertexFit-00-02-78/src/test/test_read.cxx

Go to the documentation of this file.
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   // Declare properties here.
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   // So far don't have any properties, but in case we do some day..
00023 //  setProperties();
00024 /*sc = service("VertexDbSvc", m_mdc, true);
00025   if ( !sc.isSuccess() ) {
00026     log << MSG::ERROR 
00027         << "Could not get ICalibRootSvc interface of CalibRootCnvSvc" 
00028         << endreq;
00029     return sc;
00030   }
00031 */
00032   // Get properties from the JobOptionsSvc
00033   
00034  return StatusCode::SUCCESS;
00035 
00036 }
00037 
00038 
00039 StatusCode test_read::execute( ) {
00040    
00041   MsgStream log(msgSvc(), name());
00042 //  ReadPara* a1 = m_mdc->getReadPara();
00043    IVertexDbSvc*  vtxsvc;
00044   Gaudi::svcLocator()->service("VertexDbSvc", vtxsvc);
00045  //  service("VertexDbSvc", vtxsvc, true);
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 }

Generated on Tue Nov 29 22:57:39 2016 for BOSS_7.0.2 by  doxygen 1.4.7