BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
VertexDbSvc Class Reference

#include <VertexDbSvc.h>

+ Inheritance diagram for VertexDbSvc:

Public Member Functions

 VertexDbSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~VertexDbSvc ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
double * PrimaryVertex ()
 
double * SigmaPrimaryVertex ()
 
bool isVertexValid ()
 
 VertexDbSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~VertexDbSvc ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
double * PrimaryVertex ()
 
double * SigmaPrimaryVertex ()
 
bool isVertexValid ()
 
virtual double * PrimaryVertex ()=0
 
virtual double * SigmaPrimaryVertex ()=0
 
virtual bool isVertexValid ()=0
 
virtual double * PrimaryVertex ()=0
 
virtual double * SigmaPrimaryVertex ()=0
 
virtual bool isVertexValid ()=0
 

Additional Inherited Members

- Static Public Member Functions inherited from IVertexDbSvc
static const InterfaceID & interfaceID ()
 
static const InterfaceID & interfaceID ()
 

Detailed Description

Constructor & Destructor Documentation

◆ VertexDbSvc() [1/2]

VertexDbSvc::VertexDbSvc ( const std::string &  name,
ISvcLocator *  svcloc 
)

◆ ~VertexDbSvc() [1/2]

VertexDbSvc::~VertexDbSvc ( )

Definition at line 60 of file VertexDbSvc.cxx.

60 {
61}

◆ VertexDbSvc() [2/2]

VertexDbSvc::VertexDbSvc ( const std::string &  name,
ISvcLocator *  svcloc 
)

◆ ~VertexDbSvc() [2/2]

VertexDbSvc::~VertexDbSvc ( )

Member Function Documentation

◆ finalize() [1/2]

StatusCode VertexDbSvc::finalize ( )
virtual

Definition at line 101 of file VertexDbSvc.cxx.

101 {
102 MsgStream log(messageService(), name());
103 log << MSG::INFO << "VertexDbSvc::finalize()" << endreq;
104 // if(m_connect_offline) delete m_connect_offline;
105 return StatusCode::SUCCESS;
106}

◆ finalize() [2/2]

virtual StatusCode VertexDbSvc::finalize ( )
virtual

◆ handle() [1/2]

void VertexDbSvc::handle ( const Incident &  inc)

Definition at line 108 of file VertexDbSvc.cxx.

108 {
109 MsgStream log( messageService(), name() );
110 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
111
112 if ( inc.type() == "NewRun" ){
113 log << MSG::DEBUG << "NewRun" << endreq;
114 getVertexTableInfo();
115 }
116}

◆ handle() [2/2]

void VertexDbSvc::handle ( const Incident &  )

◆ initialize() [1/2]

StatusCode VertexDbSvc::initialize ( )
virtual

Definition at line 72 of file VertexDbSvc.cxx.

72 {
73 MsgStream log(messageService(), name());
74 log << MSG::INFO << "VertexDbSvc::initialize()" << endreq;
75
76 StatusCode sc = Service::initialize();
77 if( sc.isFailure() ) return sc;
78
79
80 IIncidentSvc* incsvc;
81 sc = service("IncidentSvc", incsvc);
82 int priority = 100;
83 if( sc.isSuccess() ){
84 incsvc -> addListener(this, "NewRun", priority);
85 }
86
87 sc = serviceLocator()->service("DatabaseSvc",m_dbsvc,true);
88 if (sc .isFailure() ) {
89 log << MSG::ERROR << "Unable to find DatabaseSvc " << endreq;
90 return sc;
91 }
92
93 sc = serviceLocator()->service("EventDataSvc", m_eventSvc, true);
94 if (sc .isFailure() ) {
95 log << MSG::ERROR << "Unable to find EventDataSvc " << endreq;
96 return sc;
97 }
98 return StatusCode::SUCCESS;
99}

◆ initialize() [2/2]

virtual StatusCode VertexDbSvc::initialize ( )
virtual

◆ isVertexValid() [1/2]

bool VertexDbSvc::isVertexValid ( )
inlinevirtual

Implements IVertexDbSvc.

Definition at line 71 of file Analysis/VertexFit/VertexFit-00-02-80/VertexFit/VertexDbSvc.h.

71{return m_isRunNumberValid;}

◆ isVertexValid() [2/2]

bool VertexDbSvc::isVertexValid ( )
inlinevirtual

Implements IVertexDbSvc.

Definition at line 71 of file InstallArea/include/VertexFit/VertexFit/VertexDbSvc.h.

71{return m_isRunNumberValid;}

◆ PrimaryVertex() [1/2]

double * VertexDbSvc::PrimaryVertex ( )
virtual

Implements IVertexDbSvc.

Definition at line 155 of file VertexDbSvc.cxx.

156{
157 if( !m_isRunNumberValid ) {
158 cerr << "WARNING in VertexDbSvc: runNo is invalid!\n";
159 memset(m_primaryVertex,0,sizeof(m_primaryVertex));
160 }
161 return m_primaryVertex;
162}

◆ PrimaryVertex() [2/2]

double * VertexDbSvc::PrimaryVertex ( )
virtual

Implements IVertexDbSvc.

◆ queryInterface() [1/2]

StatusCode VertexDbSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvUnknown 
)
virtual

Definition at line 63 of file VertexDbSvc.cxx.

63 {
64 if( IID_IVertexDbSvc.versionMatch(riid) ){
65 *ppvInterface = static_cast<IVertexDbSvc*> (this);
66 } else{
67 return Service::queryInterface(riid, ppvInterface);
68 }
69 return StatusCode::SUCCESS;
70}

◆ queryInterface() [2/2]

virtual StatusCode VertexDbSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvUnknown 
)
virtual

◆ SigmaPrimaryVertex() [1/2]

double * VertexDbSvc::SigmaPrimaryVertex ( )
virtual

Implements IVertexDbSvc.

Definition at line 164 of file VertexDbSvc.cxx.

165{
166 if( !m_isRunNumberValid ) {
167 cerr << "WARNING in VertexDbSvc: runNo is invalid!\n";
168 memset(m_sigmaPrimaryVertex,0,sizeof(m_sigmaPrimaryVertex));
169 }
170 return m_sigmaPrimaryVertex;
171}

◆ SigmaPrimaryVertex() [2/2]

double * VertexDbSvc::SigmaPrimaryVertex ( )
virtual

Implements IVertexDbSvc.


The documentation for this class was generated from the following files: