BOSS 7.1.1
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("LambdaCReconstruction", m_recLc = true);
25 // declareProperty("RawDstOnly", m_rawdstonly = true);
26}

Member Function Documentation

◆ execute()

StatusCode DTag::execute ( )

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

End of "evtRecDTagCol != NULL" IF

Definition at line 128 of file DTag.cxx.

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

◆ finalize()

StatusCode DTag::finalize ( )

Definition at line 171 of file DTag.cxx.

171 {
172
173 MsgStream log(msgSvc(), name());
174 log << MSG::INFO << "in finalize()" << endmsg;
175 return StatusCode::SUCCESS;
176}

◆ initialize()

StatusCode DTag::initialize ( )

Definition at line 29 of file DTag.cxx.

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

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