#include <DTag.h>
Public Member Functions | |
DTag (const std::string &name, ISvcLocator *pSvcLocator) | |
DTag (const std::string &name, ISvcLocator *pSvcLocator) | |
StatusCode | execute () |
StatusCode | execute () |
StatusCode | finalize () |
StatusCode | finalize () |
StatusCode | initialize () |
StatusCode | initialize () |
Private Member Functions | |
StatusCode | clearEvtRecDTagCol (MsgStream &log) |
StatusCode | clearEvtRecDTagCol (MsgStream &log) |
void | registerEvtRecDTagCol (MsgStream &log) |
void | registerEvtRecDTagCol (MsgStream &log) |
StatusCode | registerParent (MsgStream &log) |
StatusCode | registerParent (MsgStream &log) |
Private Attributes | |
Algorithm * | m_ChargedDReconstruction |
Algorithm * | m_ChargedDReconstruction |
Algorithm * | m_DsReconstruction |
Algorithm * | m_DsReconstruction |
Algorithm * | m_NeutralDReconstruction |
Algorithm * | m_NeutralDReconstruction |
bool | m_rawdstonly |
bool | m_recD0 |
bool | m_recDp |
bool | m_recDs |
|
00017 : 00018 Algorithm(name, pSvcLocator) { 00019 //Declare the properties 00020 declareProperty("NeutralDReconstruction", m_recD0 = true); 00021 declareProperty("ChargedDReconstruction", m_recDp = true); 00022 declareProperty("DsReconstruction", m_recDs = true); 00023 // declareProperty("RawDstOnly", m_rawdstonly = true); 00024 }
|
|
|
|
|
|
00081 { 00082 StatusCode sc = registerParent(log); 00083 if (sc != StatusCode::SUCCESS) { 00084 return sc; 00085 } 00086 00087 DataObject* aEvtRecDTagCol; 00088 eventSvc()->findObject("/Event/EvtRec/EvtRecDTagCol",aEvtRecDTagCol); 00089 if (aEvtRecDTagCol != NULL) { 00090 IDataManagerSvc* dataManSvc = dynamic_cast<IDataManagerSvc*>(eventSvc()); 00091 dataManSvc->clearSubTree("/Event/EvtRec/EvtRecDTagCol"); 00092 eventSvc()->unregisterObject("/Event/EvtRec/EvtRecDTagCol"); 00093 } 00094 00095 SmartDataPtr<EvtRecDTagCol> evtRecDTagCol(eventSvc(), EventModel::EvtRec::EvtRecDTagCol); 00096 if( evtRecDTagCol != NULL){ 00097 IDataManagerSvc* dataManSvc = dynamic_cast<IDataManagerSvc*>(eventSvc()); 00098 dataManSvc->clearSubTree("/Event/EvtRec/EvtRecDTagCol"); 00099 eventSvc()->unregisterObject("/Event/EvtRec/EvtRecDTagCol"); 00100 } 00101 00102 return StatusCode::SUCCESS; 00103 }
|
|
|
|
End of "evtRecDTagCol->size()>0" IF End of "evtRecDTagCol != NULL" IF 00115 { 00116 00117 00118 //check if DTagList exists 00119 //if true, will exit the program 00120 SmartDataPtr<EvtRecDTagCol> evtRecDTagCol(eventSvc(), EventModel::EvtRec::EvtRecDTagCol); 00121 if( evtRecDTagCol != NULL ){ 00122 if ( evtRecDTagCol->size()>0 ) { 00123 cout << "************************************************"<<endl; 00124 cout << "EvtRecDTagCol already exists in this file!" << endl; 00125 cout << " Please run this program on a raw dst file!" << endl; 00126 cout << " *** This job is now being killed. ***" << endl; 00127 cout << "************************************************"<<endl; 00128 return StatusCode::FAILURE; 00129 } 00130 } 00131 00132 00133 MsgStream log(msgSvc(), name()); 00134 StatusCode sc = clearEvtRecDTagCol(log); 00135 if (sc != StatusCode::SUCCESS) { 00136 return sc; 00137 } 00138 00139 DataObject* aEvtRecDTagCol; 00140 eventSvc()->findObject("/Event/EvtRec/EvtRecDTagCol", aEvtRecDTagCol); 00141 if (aEvtRecDTagCol == NULL) { 00142 registerEvtRecDTagCol(log); 00143 } 00144 00145 std::vector<Algorithm*>::const_iterator it = subAlgorithms()->begin(); 00146 std::vector<Algorithm*>::const_iterator end = subAlgorithms()->end(); 00147 for(; it != end; it++) { 00148 sc = (*it)->execute(); 00149 if(sc.isFailure()) { 00150 log << "Error executing selection " << (*it)->name() << endreq; 00151 } 00152 } 00153 00154 00155 return StatusCode::SUCCESS; 00156 }
|
|
|
|
00159 { 00160 00161 MsgStream log(msgSvc(), name()); 00162 log << MSG::INFO << "in finalize()" << endmsg; 00163 return StatusCode::SUCCESS; 00164 }
|
|
|
|
00027 { 00028 00029 MsgStream log(msgSvc(), name()); 00030 00031 log << MSG::INFO << "creating DTag sub Algorithm" << endreq; 00032 00033 StatusCode sc; 00034 00035 00036 00037 00038 if(m_recD0) { 00039 sc = createSubAlgorithm("NeutralDReconstruction", "NeutralDReconstruction", m_NeutralDReconstruction); 00040 if(sc.isFailure()) { 00041 log << MSG::ERROR << "Error while creating D0Reconstruction" << endreq; 00042 return StatusCode::FAILURE; 00043 } 00044 } 00045 00046 if(m_recDp) { 00047 sc = createSubAlgorithm("ChargedDReconstruction", "ChargedDReconstruction", m_ChargedDReconstruction); 00048 if(sc.isFailure()) { 00049 log << MSG::ERROR << "Error while creating D+Reconstruction" << endreq; 00050 return StatusCode::FAILURE; 00051 } 00052 } 00053 00054 if(m_recDs) { 00055 sc = createSubAlgorithm("DsReconstruction", "DsReconstruction", m_DsReconstruction); 00056 if(sc.isFailure()) { 00057 log << MSG::ERROR << "Error while creating DsReconstruction" << endreq; 00058 return StatusCode::FAILURE; 00059 } 00060 } 00061 00062 log << MSG::INFO << "successfully return from initialize()" <<endmsg; 00063 return StatusCode::SUCCESS; 00064 00065 }
|
|
|
|
00105 { 00106 EvtRecDTagCol* aNewEvtRecDTagCol = new EvtRecDTagCol; 00107 StatusCode sc = eventSvc()->registerObject("/Event/EvtRec/EvtRecDTagCol", 00108 aNewEvtRecDTagCol); 00109 if (sc != StatusCode::SUCCESS) { 00110 log << MSG::FATAL << "Could not register EvtRecDTagCol in TDS!" << endreq; 00111 } 00112 }
|
|
|
|
00067 { 00068 DataObject *aEvtRecEvent; 00069 eventSvc()->findObject("/Event/EvtRec",aEvtRecEvent); 00070 if (aEvtRecEvent == NULL) { 00071 aEvtRecEvent = new EvtRecEvent(); 00072 StatusCode sc = eventSvc()->registerObject("/Event/EvtRec",aEvtRecEvent); 00073 if (sc != StatusCode::SUCCESS) { 00074 log << MSG::FATAL << "Could not register EvtRecEvent" <<endreq; 00075 return StatusCode::FAILURE; 00076 } 00077 } 00078 return StatusCode::SUCCESS; 00079 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|