CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemAliEvent Class Reference

#include <CgemAliEvent.h>

Public Member Functions

void setParam (CgemAliParams &param)
 
StatusCode setRecEvent ()
 
StatusCode setKalEvent ()
 
int getEsFlag () const
 
bool getEsCutFlag () const
 
double getTes () const
 
int getNTrk () const
 
CgemAliRecTrkgetRecTrk (int index) const
 
void clear ()
 

Detailed Description

Definition at line 15 of file CgemAliEvent.h.

Member Function Documentation

◆ clear()

void CgemAliEvent::clear ( )

Definition at line 97 of file CgemAliEvent.cxx.

97 {
98 unsigned int i;
99 for(i=0; i<m_rectrk.size(); i++){
100 delete m_rectrk[i];
101 }
102 m_rectrk.clear();
103}

Referenced by CgemAlignAlg::execute().

◆ getEsCutFlag()

bool CgemAliEvent::getEsCutFlag ( ) const
inline

Definition at line 22 of file CgemAliEvent.h.

22{ return m_esCutFg; }

◆ getEsFlag()

int CgemAliEvent::getEsFlag ( ) const
inline

Definition at line 21 of file CgemAliEvent.h.

21{ return m_esFlag; }

◆ getNTrk()

int CgemAliEvent::getNTrk ( ) const
inline

Definition at line 25 of file CgemAliEvent.h.

25{ return m_rectrk.size(); }

◆ getRecTrk()

CgemAliRecTrk * CgemAliEvent::getRecTrk ( int  index) const
inline

Definition at line 26 of file CgemAliEvent.h.

26{ return m_rectrk[index]; }

◆ getTes()

double CgemAliEvent::getTes ( ) const
inline

Definition at line 23 of file CgemAliEvent.h.

23{ return m_tes; }

◆ setKalEvent()

StatusCode CgemAliEvent::setKalEvent ( )

Definition at line 66 of file CgemAliEvent.cxx.

66 {
67 IMessageSvc *msgSvc;
68 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
69 MsgStream log(msgSvc, "CgemAliEvent");
70 log << MSG::INFO << "CgemAliEvent::setKalEvent" << endreq;
71
72 IDataProviderSvc* eventSvc = NULL;
73 Gaudi::svcLocator()->service("EventDataSvc", eventSvc);
74
75
76 SmartDataPtr<RecMdcKalTrackCol> kaltrkCol(eventSvc,"/Event/Recon/RecMdcKalTrackCol");
77 if (!kaltrkCol) {
78 log << MSG::FATAL << "Could not find RecMdcKalTrackCol" << endreq;
79 return StatusCode::FAILURE;
80 }
81
82 int i = 0;
83 CgemAliRecTrk* rectrk;
84 RecMdcKalTrackCol::iterator iter_trk = kaltrkCol->begin();
85 for(; iter_trk != kaltrkCol->end(); iter_trk++) {
86 rectrk = new CgemAliRecTrk();
87 rectrk -> setKalTrk(iter_trk);
88 m_rectrk.push_back(rectrk);
89
90 i++;
91 }
92 log << MSG::INFO << "KalTrack ntrk = " << i << endreq;
93
94 return StatusCode::SUCCESS;
95}
IMessageSvc * msgSvc()

◆ setParam()

void CgemAliEvent::setParam ( CgemAliParams param)
inline

Definition at line 17 of file CgemAliEvent.h.

17{ m_param = param; }

◆ setRecEvent()

StatusCode CgemAliEvent::setRecEvent ( )

Definition at line 36 of file CgemAliEvent.cxx.

36 {
37 IMessageSvc *msgSvc;
38 Gaudi::svcLocator()->service("MessageSvc", msgSvc);
39 MsgStream log(msgSvc, "CgemAliEvent");
40 log << MSG::INFO << "CgemAliEvent::setRecEvent" << endreq;
41
42 IDataProviderSvc* eventSvc = NULL;
43 Gaudi::svcLocator()->service("EventDataSvc", eventSvc);
44
45 SmartDataPtr<RecMdcTrackCol> newtrkCol(eventSvc, "/Event/Recon/RecMdcTrackCol");
46 if(!newtrkCol){
47 //log << MSG::ERROR << "Could not find RecMdcTrackCol" << endreq;
48 return ( StatusCode::FAILURE );
49 }
50
51 int i = 0;
52 CgemAliRecTrk* rectrk;
53 RecMdcTrackCol::iterator it_trk = newtrkCol->begin();
54 for(; it_trk != newtrkCol->end(); it_trk++){
55 rectrk = new CgemAliRecTrk();
56 rectrk -> setRecTrk(it_trk);
57 m_rectrk.push_back(rectrk);
58
59 i++;
60 }
61 log << MSG::WARNING << "RecTrack ntrk = " << i << endreq;
62
63 return StatusCode::SUCCESS;
64}

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