CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
DTag Class Reference

#include <DTag.h>

+ Inheritance diagram for DTag:

Public Member Functions

 DTag (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 

Detailed Description

Definition at line 8 of file DTag.h.

Constructor & Destructor Documentation

◆ DTag()

DTag::DTag ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 18 of file DTag.cxx.

18 :
19 Algorithm(name, pSvcLocator) {
20 //Declare the properties
21 declareProperty("NeutralDReconstruction", m_recD0 = true);
22 declareProperty("ChargedDReconstruction", m_recDp = true);
23 declareProperty("DsReconstruction", m_recDs = true);
24 // declareProperty("RawDstOnly", m_rawdstonly = true);
25}

Member Function Documentation

◆ execute()

StatusCode DTag::execute ( )

End of "evtRecDTagCol->size()>0" IF

End of "evtRecDTagCol != NULL" IF

Definition at line 118 of file DTag.cxx.

118 {
119
120
121 //check if DTagList exists
122 //if true, will exit the program
123 SmartDataPtr<EvtRecDTagCol> evtRecDTagCol(eventSvc(), EventModel::EvtRec::EvtRecDTagCol);
124 if( evtRecDTagCol != NULL ){
125 if ( evtRecDTagCol->size()>0 ) {
126 cout << "************************************************"<<endl;
127 cout << "EvtRecDTagCol already exists in this file!" << endl;
128 cout << " Please run this program on a raw dst file!" << endl;
129 cout << " *** This job is now being killed. ***" << endl;
130 cout << "************************************************"<<endl;
131 return StatusCode::FAILURE;
132 } /// End of "evtRecDTagCol->size()>0" IF
133 } /// End of "evtRecDTagCol != NULL" IF
134
135
136 MsgStream log(msgSvc(), name());
137 StatusCode sc = clearEvtRecDTagCol(log);
138 if (sc != StatusCode::SUCCESS) {
139 return sc;
140 }
141
142 DataObject* aEvtRecDTagCol;
143 eventSvc()->findObject("/Event/EvtRec/EvtRecDTagCol", aEvtRecDTagCol);
144 if (aEvtRecDTagCol == NULL) {
145 registerEvtRecDTagCol(log);
146 }
147
148 std::vector<Algorithm*>::const_iterator it = subAlgorithms()->begin();
149 std::vector<Algorithm*>::const_iterator end = subAlgorithms()->end();
150 for(; it != end; it++) {
151 sc = (*it)->execute();
152 if(sc.isFailure()) {
153 log << "Error executing selection " << (*it)->name() << endreq;
154 }
155 }
156
157
158 return StatusCode::SUCCESS;
159}
IMessageSvc * msgSvc()
_EXTERN_ std::string EvtRecDTagCol
Definition EventModel.h:140

◆ finalize()

StatusCode DTag::finalize ( )

Definition at line 162 of file DTag.cxx.

162 {
163
164 MsgStream log(msgSvc(), name());
165 log << MSG::INFO << "in finalize()" << endmsg;
166 return StatusCode::SUCCESS;
167}

◆ initialize()

StatusCode DTag::initialize ( )

Definition at line 28 of file DTag.cxx.

28 {
29
30 MsgStream log(msgSvc(), name());
31
32 log << MSG::INFO << "creating DTag sub Algorithm" << endreq;
33
34 StatusCode sc;
35
36
37
38
39 if(m_recD0) {
40 sc = createSubAlgorithm("NeutralDReconstruction", "NeutralDReconstruction", m_NeutralDReconstruction);
41 if(sc.isFailure()) {
42 log << MSG::ERROR << "Error while creating D0Reconstruction" << endreq;
43 return StatusCode::FAILURE;
44 }
45 }
46
47 if(m_recDp) {
48 sc = createSubAlgorithm("ChargedDReconstruction", "ChargedDReconstruction", m_ChargedDReconstruction);
49 if(sc.isFailure()) {
50 log << MSG::ERROR << "Error while creating D+Reconstruction" << endreq;
51 return StatusCode::FAILURE;
52 }
53 }
54
55 if(m_recDs) {
56 sc = createSubAlgorithm("DsReconstruction", "DsReconstruction", m_DsReconstruction);
57 if(sc.isFailure()) {
58 log << MSG::ERROR << "Error while creating DsReconstruction" << endreq;
59 return StatusCode::FAILURE;
60 }
61 }
62
63 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
64 return StatusCode::SUCCESS;
65
66}

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