BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
OfflineEvtFilterSvc Class Reference

#include <OfflineEvtFilterSvc.h>

+ Inheritance diagram for OfflineEvtFilterSvc:

Public Member Functions

 OfflineEvtFilterSvc (const std::string &name, ISvcLocator *svcloc)
 
 ~OfflineEvtFilterSvc ()
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvUnknown)
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
void handle (const Incident &)
 
int getRunFrom () const
 
int getRunTo () const
 
int getEventFrom () const
 
int getEventTo () const
 
int getNpar () const
 
int getFlag (unsigned int parId) const
 
double getTBegin (unsigned int parId) const
 
double getTEnd (unsigned int parId) const
 
virtual int getRunFrom () const =0
 
virtual int getRunTo () const =0
 
virtual int getEventFrom () const =0
 
virtual int getEventTo () const =0
 
virtual int getNpar () const =0
 
virtual int getFlag (unsigned int parId) const =0
 
virtual double getTBegin (unsigned int parId) const =0
 
virtual double getTEnd (unsigned int parId) const =0
 

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file OfflineEvtFilterSvc.h.

Constructor & Destructor Documentation

◆ OfflineEvtFilterSvc()

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

Definition at line 25 of file OfflineEvtFilterSvc.cxx.

25 :
26 Service (name, svcloc) {
27}

◆ ~OfflineEvtFilterSvc()

OfflineEvtFilterSvc::~OfflineEvtFilterSvc ( )

Definition at line 29 of file OfflineEvtFilterSvc.cxx.

29 {
30}

Member Function Documentation

◆ finalize()

StatusCode OfflineEvtFilterSvc::finalize ( )
virtual

Definition at line 65 of file OfflineEvtFilterSvc.cxx.

65 {
66 MsgStream log(messageService(), name());
67 log << MSG::INFO << "OfflineEvtFilterSvc::finalize()" << endreq;
68
69 m_npar = 0;
70 m_flag.clear();
71 m_tBegin.clear();
72 m_tEnd.clear();
73
74 return StatusCode::SUCCESS;
75}

◆ getEventFrom()

int OfflineEvtFilterSvc::getEventFrom ( ) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 32 of file OfflineEvtFilterSvc.h.

32{return m_eventFrom;}

◆ getEventTo()

int OfflineEvtFilterSvc::getEventTo ( ) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 33 of file OfflineEvtFilterSvc.h.

33{return m_eventTo;}

◆ getFlag()

int OfflineEvtFilterSvc::getFlag ( unsigned int  parId) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 35 of file OfflineEvtFilterSvc.h.

35{return m_flag[parId];}

◆ getNpar()

int OfflineEvtFilterSvc::getNpar ( ) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 34 of file OfflineEvtFilterSvc.h.

34{return m_npar;}

◆ getRunFrom()

int OfflineEvtFilterSvc::getRunFrom ( ) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 30 of file OfflineEvtFilterSvc.h.

30{return m_runFrom;}

◆ getRunTo()

int OfflineEvtFilterSvc::getRunTo ( ) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 31 of file OfflineEvtFilterSvc.h.

31{return m_runTo;}

◆ getTBegin()

double OfflineEvtFilterSvc::getTBegin ( unsigned int  parId) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 36 of file OfflineEvtFilterSvc.h.

36{return m_tBegin[parId];}

◆ getTEnd()

double OfflineEvtFilterSvc::getTEnd ( unsigned int  parId) const
inlinevirtual

Implements IOfflineEvtFilterSvc.

Definition at line 37 of file OfflineEvtFilterSvc.h.

37{return m_tEnd[parId];}

◆ handle()

void OfflineEvtFilterSvc::handle ( const Incident &  inc)

Definition at line 77 of file OfflineEvtFilterSvc.cxx.

77 {
78 MsgStream log( messageService(), name() );
79 log << MSG::DEBUG << "handle: " << inc.type() << endreq;
80
81 if ( inc.type() == "NewRun" ){
82 log << MSG::DEBUG << "NewRun" << endreq;
83
84 if( ! initCalibConst() ){
85 log << MSG::ERROR
86 << "can not initilize OffEvtFilter Constants" << endreq;
87 }
88 }
89}

◆ initialize()

StatusCode OfflineEvtFilterSvc::initialize ( )
virtual

Definition at line 41 of file OfflineEvtFilterSvc.cxx.

41 {
42 MsgStream log(messageService(), name());
43 log << MSG::INFO << "OfflineEvtFilterSvc::initialize()" << endreq;
44
45 StatusCode sc = Service::initialize();
46 if( sc.isFailure() ) return sc;
47
48 IIncidentSvc* incsvc;
49 sc = service("IncidentSvc", incsvc);
50 int priority = 100;
51 if( sc.isSuccess() ){
52 incsvc -> addListener(this, "NewRun", priority);
53 }
54
55 sc = service("CalibDataSvc", m_pCalDataSvc, true);
56 if( sc == StatusCode::SUCCESS ){
57 log << MSG::INFO << "Retrieve IDataProviderSvc" << endreq;
58 }else{
59 log << MSG::FATAL << "can not get IDataProviderSvc" << endreq;
60 }
61
62 return StatusCode::SUCCESS;
63}

◆ queryInterface()

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

Definition at line 32 of file OfflineEvtFilterSvc.cxx.

32 {
33 if( IID_IOfflineEvtFilterSvc.versionMatch(riid) ){
34 *ppvInterface = static_cast<IOfflineEvtFilterSvc*> (this);
35 } else{
36 return Service::queryInterface(riid, ppvInterface);
37 }
38 return StatusCode::SUCCESS;
39}

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