#include <EvtRecDTagCnv.h>
Inheritance diagram for EvtRecDTagCnv:
Public Types | |
typedef Ty2 | destination |
typedef Ty2 | destination |
typedef Ty1 | source |
typedef Ty1 | source |
Public Member Functions | |
virtual StatusCode | createObj (IOpaqueAddress *addr, DataObject *&dat) |
Convert the persistent object to transient. | |
virtual StatusCode | createObj (IOpaqueAddress *addr, DataObject *&dat) |
Convert the persistent object to transient. | |
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
Convert the transient object to the requested representation. | |
virtual StatusCode | createRep (DataObject *pObject, IOpaqueAddress *&refpAddress) |
Convert the transient object to the requested representation. | |
void | declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname) |
Store TDS path to link a particular converter to an object on the TDS. | |
void | declareObject (const std::string &fullPath, const CLID &clid, const std::string &treename, const std::string &branchname) |
Store TDS path to link a particular converter to an object on the TDS. | |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Resolve the references of the converted object. | |
virtual StatusCode | fillObjRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Resolve the references of the converted object. | |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Resolve the references of the converted object. | |
virtual StatusCode | fillRepRefs (IOpaqueAddress *pAddress, DataObject *pObject) |
Resolve the references of the converted object. | |
virtual StatusCode | finalize () |
virtual StatusCode | finalize () |
TObject * | getReadObject () const |
get the object to be read | |
TObject * | getReadObject () const |
get the object to be read | |
virtual StatusCode | initialize () |
virtual StatusCode | initialize () |
destination * | operator (const source &) const |
destination * | operator (const source &) const |
virtual long | repSvcType () const |
virtual long | repSvcType () const |
virtual | ~EvtRecDTagCnv () |
virtual | ~EvtRecDTagCnv () |
Static Public Member Functions | |
const CLID & | classID () |
const CLID & | classID () |
const unsigned char | storageType () |
Storage type and class ID. | |
const unsigned char | storageType () |
Storage type and class ID. | |
Protected Member Functions | |
virtual destination * | convert (const source &) const =0 |
virtual destination * | convert (const source &) const =0 |
virtual StatusCode | DataObjectToTObject (DataObject *obj, RootAddress *addr) |
transformation to root | |
virtual StatusCode | DataObjectToTObject (DataObject *obj, RootAddress *addr) |
transformation to root | |
EvtRecDTagCnv (ISvcLocator *svc) | |
EvtRecDTagCnv (ISvcLocator *svc) | |
virtual StatusCode | TObjectToDataObject (DataObject *&obj) |
transformation from root | |
virtual StatusCode | TObjectToDataObject (DataObject *&obj) |
transformation from root | |
Protected Attributes | |
CLID | CLID_top |
the CLID of the upper converter if any | |
std::vector< void * > | m_adresses |
each converter knows the corresponding adresses | |
std::vector< void * > | m_adresses |
each converter knows the corresponding adresses | |
int | m_branchNr |
the branchNr of this converter for writing | |
int | m_branchNrDst |
int | m_branchNrEvtHeader |
int | m_branchNrEvtRec |
int | m_branchNrMc |
int | m_branchNrRecon |
TArrayS * | m_branchNumbers |
array with number of branches for reading | |
TArrayS * | m_branchNumbers |
array with number of branches for reading | |
RootCnvSvc * | m_cnvSvc |
RootCnvSvc * | m_cnvSvc |
std::string | m_currentFileName |
IDataProviderSvc * | m_eds |
pointer to eventdataservice | |
IDataProviderSvc * | m_eds |
pointer to eventdataservice | |
RootEvtSelector * | m_evtsel |
RootEvtSelector * | m_evtsel |
std::vector< RootCnvSvc::Leaf > | m_leaves |
std::vector< RootCnvSvc::Leaf > | m_leaves |
TObject * | m_objRead |
the object that was read | |
TObject * | m_objRead |
the object that was read | |
std::string | m_rootBranchname |
root branchname (may be concatenated of severals) | |
RootInterface * | m_rootInterface |
pointer to the RootInterface | |
RootInterface * | m_rootInterface |
pointer to the RootInterface | |
std::string | m_rootTreename |
each converter knows it's treename | |
Private Attributes | |
commonData | m_common |
relational maps | |
TObjArray * | m_evtRecDTagCol |
TObjArray * | m_evtRecDTagCol |
Friends | |
class | CnvFactory<EvtRecDTagCnv> |
|
|
|
|
|
|
|
|
|
00021 {}
|
|
00025 : RootEventBaseCnv(classID(), svc) 00026 { 00027 m_rootBranchname = "m_evtRecDTagCol"; 00028 m_adresses.push_back(&m_evtRecDTagCol); 00029 m_evtRecDTagCol = 0; 00030 }
|
|
00021 {}
|
|
|
|
00019 { return CLID_EvtRecDTagCol; }
|
|
00019 { return CLID_EvtRecDTagCol; }
|
|
|
|
|
|
Convert the persistent object to transient.
|
|
Convert the persistent object to transient.
Reimplemented in EventCnv, and EventCnv. 00157 { 00158 // transform ROOT object to TDS object 00159 MsgStream log(msgSvc(), "RootEventBaseCnv"); 00160 log << MSG::DEBUG << "RootEventBaseCnv::createObj with clid " <<addr->clID()<< endreq; 00161 StatusCode sc; 00162 00163 // add 2005-11-29 00164 // log<<MSG::INFO<<"######### RootEventBaseCnv ::createObj begin of createObj: m_branchNumbers "<<m_branchNumbers->GetSize()<<"###############"<<endreq; 00165 00166 RootAddress *raddr=dynamic_cast<RootAddress *>(addr); 00167 if (!raddr) { 00168 log << MSG::ERROR << "Could not downcast to Root address" << endreq; 00169 return StatusCode::FAILURE; 00170 } 00171 00172 static int temp =0; //control the begin of each files 2005-12-01 00173 static int entryN =0; //control the event number of each files 2005-21-01 00174 static int brN =0; //control munber of branch of the tree; 00175 int lastBrn = brN; 00176 //lastBrn = brN; 00177 static int branchN=0; 00178 static bool isSet=true; 00179 00180 static int entryBefore = 0; 00181 static bool addEntryEachFile = true; 00182 00183 00184 if(m_rootInterface->getENDFILE() || (temp >0 && temp < branchN)){ // if the file has get the end:y the go to next file to create a new tree 00185 00186 if(m_rootInterface->getENDFILE() ) { 00187 entryN = 0; 00188 } 00189 00190 temp++; 00191 00192 delete m_branchNumbers; 00193 m_branchNumbers = new TArrayS(0); 00194 00195 if(temp == branchN) { 00196 temp =0; 00197 } 00198 } 00199 00200 if(m_rootInterface->getENDFILE()) addEntryEachFile = true; 00201 // the 2nd method 00202 if(m_evtsel->getRecId() - entryBefore == 0) { // first event in this file 00203 delete m_branchNumbers; 00204 m_branchNumbers = new TArrayS(0); 00205 } 00206 00207 //new method to initialize the branchNumber 00208 if(m_currentFileName=="") m_currentFileName = m_rootInterface->getCurrentFileName(); 00209 if(!(m_currentFileName == m_rootInterface->getCurrentFileName())){ 00210 m_currentFileName = m_rootInterface->getCurrentFileName(); 00211 delete m_branchNumbers; 00212 m_branchNumbers = new TArrayS(0); 00213 } 00214 //---------------------------------------- 00215 00216 00217 if (m_branchNumbers->GetSize()<=0) { 00218 if(isSet) brN++; 00219 int branchNumber; 00220 for (int nb=0;nb<raddr->getNrBranches();nb++) { 00221 sc=m_rootInterface->setBranchAddress(raddr->getTreename().c_str(),raddr->getBranchname(nb).c_str(),m_adresses[nb],branchNumber); 00222 if (!sc.isSuccess()) 00223 { 00224 if(isSet) brN--; //liangyt: if fail to retrieve this branch, this will be not a effective branch. 00225 //entryN++; //liangyt: this is the second method 00226 if(temp>0) temp--; //temp > 0 means recording effective branch number. 00227 return sc; 00228 } 00229 m_branchNumbers->Set(nb+1); 00230 m_branchNumbers->AddAt(branchNumber,nb); 00231 00232 } 00233 } 00234 00236 if(addEntryEachFile&&(m_evtsel->getRecId()>entryBefore)){ // for a new file, add entry for ONLY one time. 00237 entryBefore += m_rootInterface->getEntries(); 00238 addEntryEachFile = false; 00239 } 00240 00241 if(lastBrn == brN && isSet ){ 00242 branchN = brN; 00243 isSet=false; 00244 } 00245 00246 if(isSet==false) log << MSG::INFO <<" 1st method set event as : "<<int(entryN/branchN)<<endreq; 00247 if(isSet==false) raddr->setEntryNr(int(entryN/branchN));//former method, keep it to be backup. 00248 if(m_evtsel) log << MSG::INFO <<" event id = "<<m_evtsel->getRecId()<<endreq; 00249 00250 int eventID = 0; 00251 if(entryBefore > m_evtsel->getRecId()) 00252 eventID = m_evtsel->getRecId() + m_rootInterface->getEntries() - entryBefore; 00253 else if(entryBefore == m_evtsel->getRecId()) eventID = 0; 00254 else log << MSG::ERROR <<"eventId error!!!"<<endreq; 00255 00256 log << MSG::INFO <<" 2nd method set event as : "<<eventID<<endreq; 00257 if(m_evtsel) raddr->setEntryNr(eventID); 00258 // read branch 00259 00260 if (m_branchNumbers->GetSize()>0) { 00261 int nbtot=0,nb; 00262 for (int ib=0;ib<m_branchNumbers->GetSize();ib++) { 00263 //sc=m_rootInterface->getBranchEntry(m_branchNumbers->At(ib),raddr->getEntryNr(),nb); 00264 //change to get branch entry with addr(set address for each entry) liangyt 00265 sc=m_rootInterface->getBranchEntry(m_branchNumbers->At(ib),raddr->getEntryNr(),m_adresses[ib],nb); 00266 if (sc.isFailure()) { 00267 log << MSG::ERROR << "Could not read branch " << raddr->getBranchname(nb) << endreq; 00268 return sc; 00269 } 00270 nbtot+=nb; 00271 } 00272 } 00273 00274 else { // get ROOT object 00275 if (CLID_top) { 00276 IConverter *p=conversionSvc()->converter(CLID_top); 00277 RootEventBaseCnv *cnv=dynamic_cast<RootEventBaseCnv *>(p); 00278 if (!cnv) { 00279 log << MSG::ERROR << "Could not downcast to RootEventBaseCnv " << endreq; 00280 return StatusCode::FAILURE; 00281 } 00282 m_objRead=cnv->getReadObject(); 00283 } 00284 } 00285 00286 //do concrete transformation in derived converter 00287 sc = TObjectToDataObject(refpObject); 00288 if (sc.isFailure()) { 00289 log << MSG::ERROR << "Could not transform object" << endreq; 00290 return sc; 00291 } 00292 00293 // verify if we have to register 00294 IRegistry* ent = addr->registry(); 00295 if ( ent == 0) { 00296 sc=m_eds->registerObject(raddr->getPath(),refpObject); 00297 if (sc.isFailure()) { 00298 log << MSG::ERROR << "Could not register object " << raddr->getPath()<<" status "<<sc.getCode()<<endreq; 00299 } 00300 // } 00301 } 00302 00303 entryN++; 00304 return StatusCode::SUCCESS; 00305 }
|
|
Convert the transient object to the requested representation.
|
|
Convert the transient object to the requested representation.
00078 { 00079 // Purpose and Method: Convert the transient object to ROOT 00080 00081 MsgStream log(msgSvc(), "RootEventBaseCnv"); 00082 00083 StatusCode sc= StatusCode::SUCCESS; 00084 // get the corresponding address 00085 RootAddress *rootaddr; 00086 sc=m_cnvSvc->createAddress(obj,addr); 00087 00088 rootaddr = dynamic_cast<RootAddress *>(addr); 00089 00090 if (sc.isFailure() || !rootaddr ) { 00091 log << MSG::ERROR << "Could not create address for clid " <<obj->clID()<<", objname "<<obj->name()<<endreq; 00092 return StatusCode::FAILURE; 00093 } 00094 00095 // do the real conversion in the derived converter 00096 sc = DataObjectToTObject(obj,rootaddr); 00097 00098 delete addr; 00099 addr = NULL; 00100 00101 if (sc.isFailure()) { 00102 log << MSG::ERROR << "Could not transform object" << endreq; 00103 return sc; 00104 } 00105 00106 return StatusCode::SUCCESS; 00107 }
|
|
transformation to root
Implements RootEventBaseCnv. |
|
transformation to root
Implements RootEventBaseCnv. 00127 { 00128 MsgStream log(msgSvc(), "EvtRecDTagCnv"); 00129 log << MSG::DEBUG << "EvtRecDTagCnv::DataObjectToTObject" << endreq; 00130 00131 EvtRecDTagCol* evtRecDTagCol = dynamic_cast<EvtRecDTagCol*> (obj); 00132 if ( ! evtRecDTagCol ) { 00133 log << MSG::ERROR << "Could not downcast to EvtRecDTagCol" << endreq; 00134 return StatusCode::FAILURE; 00135 } 00136 00137 DataObject* evt; 00138 m_eds->findObject(EventModel::EvtRec::Event, evt); 00139 if ( evt == NULL ) { 00140 log << MSG::ERROR << "Could not get EvtRecObject in TDS" << endreq; 00141 return StatusCode::FAILURE; 00142 } 00143 EvtRecObject* devtTds = dynamic_cast<EvtRecObject*> (evt); 00144 if ( ! devtTds ) { 00145 log << MSG::ERROR << "EvtRecDTagCnv: Could not downcast to TDS EvtRecObject" << endreq; 00146 } 00147 00148 IOpaqueAddress *addr; 00149 m_cnvSvc->getEvtRecCnv()->createRep(evt, addr); 00150 TEvtRecObject* recEvt = m_cnvSvc->getEvtRecCnv()->getWriteObject(); 00151 00152 const TObjArray* m_evtRecDTagCol = recEvt->getEvtRecDTagCol(); 00153 if ( ! m_evtRecDTagCol ) return StatusCode::SUCCESS; 00154 00155 IDataProviderSvc* dataSvc = 0; 00156 StatusCode sc = serviceLocator()->getService("EventDataSvc", 00157 IID_IDataProviderSvc, (IInterface*&)dataSvc); 00158 if ( sc.isFailure() ) { 00159 log << MSG::FATAL << "Could not get EventDataSvc in EvtRecDTagCnv" << endreq; 00160 return sc; 00161 } 00162 00163 EvtRecTrackCol::iterator evtRecTrackColbegin, evtRecTrackColend; 00164 00165 SmartDataPtr<EvtRecTrackCol> evtRecTrackCol(dataSvc, EventModel::EvtRec::EvtRecTrackCol); 00166 if ( ! evtRecTrackCol) { 00167 log << MSG::INFO << "Could not find EvtRecTrackCol" << endreq; 00168 } 00169 else { 00170 evtRecTrackColbegin = evtRecTrackCol->begin(); 00171 evtRecTrackColend = evtRecTrackCol->end(); 00172 } 00173 00174 // convert 00175 recEvt->clearEvtRecDTagCol(); 00176 EvtRecDTagCol::const_iterator evtRecDTag = evtRecDTagCol->begin(); 00177 00178 for ( ; evtRecDTag != evtRecDTagCol->end(); evtRecDTag++) { 00179 EvtRecDTag* ptr = *evtRecDTag; 00180 TEvtRecDTag* evtRecDTagRoot = new TEvtRecDTag(); 00181 00182 // set ... 00183 evtRecDTagRoot->setdecayMode( ptr->decayMode() ); 00184 evtRecDTagRoot->settype( ptr->type() ); 00185 evtRecDTagRoot->setbeamE( ptr->beamE() ); 00186 evtRecDTagRoot->setmass( ptr->mass() ); 00187 evtRecDTagRoot->setmBC( ptr->mBC() ); 00188 evtRecDTagRoot->setdeltaE( ptr->deltaE() ); 00189 evtRecDTagRoot->setcharge( ptr->charge() ); 00190 evtRecDTagRoot->setcharm( ptr->charm() ); 00191 evtRecDTagRoot->setnumOfChildren( ptr->numOfChildren() ); 00192 00193 HepLorentzVector p4=ptr->p4(); 00194 evtRecDTagRoot->setpx(p4.x()); 00195 evtRecDTagRoot->setpy(p4.y()); 00196 evtRecDTagRoot->setpz(p4.z()); 00197 evtRecDTagRoot->setpe(p4.t()); 00198 00199 00200 00201 SmartRefVector<EvtRecTrack> tracks=ptr->tracks(); 00202 // assert(evtRecTrackColbegin != evtRecTrackColend); 00203 for(unsigned int i=0; i<tracks.size();i++){ 00204 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00205 evtRecTrackColend, tracks[i]); 00206 //assert(it != evtRecTrackColend); 00207 evtRecDTagRoot->addTrack(it - evtRecTrackColbegin ); 00208 } 00209 00210 00211 SmartRefVector<EvtRecTrack> showers=ptr->showers(); 00212 // assert(evtRecTrackColbegin != evtRecTrackColend); 00213 for(unsigned int i=0; i<showers.size();i++){ 00214 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00215 evtRecTrackColend, showers[i]); 00216 //assert(it != evtRecTrackColend); 00217 evtRecDTagRoot->addShower(it - evtRecTrackColbegin ); 00218 } 00219 00220 00221 SmartRefVector<EvtRecTrack> otherTracks=ptr->otherTracks(); 00222 // assert(evtRecTrackColbegin != evtRecTrackColend); 00223 for(unsigned int i=0; i<otherTracks.size();i++){ 00224 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00225 evtRecTrackColend, otherTracks[i]); 00226 //assert(it != evtRecTrackColend); 00227 evtRecDTagRoot->addOtherTrack(it - evtRecTrackColbegin ); 00228 } 00229 00230 SmartRefVector<EvtRecTrack> otherShowers=ptr->otherShowers(); 00231 // assert(evtRecTrackColbegin != evtRecTrackColend); 00232 for(unsigned int i=0; i<otherShowers.size();i++){ 00233 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00234 evtRecTrackColend, otherShowers[i]); 00235 //assert(it != evtRecTrackColend); 00236 evtRecDTagRoot->addOtherShower(it - evtRecTrackColbegin ); 00237 } 00238 00239 SmartRefVector<EvtRecTrack> pionId=ptr->pionId(); 00240 // assert(evtRecTrackColbegin != evtRecTrackColend); 00241 for(unsigned int i=0; i<pionId.size();i++){ 00242 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00243 evtRecTrackColend, pionId[i]); 00244 //assert(it != evtRecTrackColend); 00245 evtRecDTagRoot->addPionId(it - evtRecTrackColbegin ); 00246 } 00247 00248 SmartRefVector<EvtRecTrack> kaonId=ptr->kaonId(); 00249 // assert(evtRecTrackColbegin != evtRecTrackColend); 00250 for(unsigned int i=0; i<kaonId.size();i++){ 00251 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin, 00252 evtRecTrackColend, kaonId[i]); 00253 //assert(it != evtRecTrackColend); 00254 evtRecDTagRoot->addKaonId(it - evtRecTrackColbegin ); 00255 } 00256 00257 00258 recEvt->addEvtRecDTag(evtRecDTagRoot); 00259 } 00260 00261 return StatusCode::SUCCESS; 00262 }
|
|
Store TDS path to link a particular converter to an object on the TDS.
|
|
Store TDS path to link a particular converter to an object on the TDS.
00150 { 00151 // Purpose and Method: Save the path on the TDS, treename, pathname in the m_leaves vector, 00152 // corresponding to the DataObject that the converter handles. 00153 m_leaves.push_back(RootCnvSvc::Leaf(path, cl,treename,branchname)); 00154 }
|
|
Resolve the references of the converted object.
|
|
Resolve the references of the converted object.
00117 { 00118 // Purpose and Method: Resolve the references of the converted object. 00119 // It is expected that derived classes will override this method. 00120 MsgStream log(msgSvc(), "RootEventBaseCnv"); 00121 return StatusCode::SUCCESS; 00122 }
|
|
Resolve the references of the converted object.
|
|
Resolve the references of the converted object.
00109 { 00110 // Purpose and Method: Resolve the references of the converted object. 00111 // It is expected that derived classes will override this method. 00112 MsgStream log(msgSvc(), "RootEventBaseCnv"); 00113 return StatusCode::SUCCESS; 00114 }
|
|
|
|
00141 { 00142 if ( m_cnvSvc ) { 00143 m_cnvSvc->release(); 00144 m_cnvSvc=0; 00145 } 00146 return Converter::finalize(); 00147 }
|
|
get the object to be read
00124 { return m_objRead;}
|
|
get the object to be read
00124 { return m_objRead;}
|
|
Reimplemented in DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, TrigCnv, DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, and TrigCnv. |
|
Reimplemented in DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, TrigCnv, DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, and TrigCnv. 00125 { 00126 00127 StatusCode status = Converter::initialize(); 00128 00129 if ( status.isSuccess() ) { 00130 IService* isvc = 0; 00131 status = serviceLocator()->service("RootCnvSvc", isvc, false); 00132 if ( !status.isSuccess() ) status = serviceLocator()->service("EventCnvSvc", isvc, true); 00133 if ( status.isSuccess() ) { 00134 status = isvc->queryInterface(IID_IRootCnvSvc, (void**)&m_cnvSvc); 00135 } 00136 } 00137 00138 return status; 00139 }
|
|
|
|
|
|
00087 {
00088 return ROOT_StorageType;
00089 }
|
|
00087 {
00088 return ROOT_StorageType;
00089 }
|
|
Storage type and class ID.
00083 {
00084 return ROOT_StorageType;
00085 }
|
|
Storage type and class ID.
00083 {
00084 return ROOT_StorageType;
00085 }
|
|
transformation from root
Implements RootEventBaseCnv. |
|
transformation from root
Implements RootEventBaseCnv. 00032 { 00033 // creation of TDS object from root object 00034 MsgStream log(msgSvc(), "EvtRecDTagCnv"); 00035 log << MSG::DEBUG << "EvtRecDTagCnv::TObjectToDataObject" << endreq; 00036 00037 // create the TDS location for the EvtRecDTag Collection 00038 EvtRecDTagCol* evtRecDTagCol = new EvtRecDTagCol; 00039 refpObject = evtRecDTagCol; 00040 00041 if ( ! m_evtRecDTagCol ) return StatusCode::SUCCESS; 00042 00043 IDataProviderSvc* dataSvc = 0; 00044 StatusCode sc = serviceLocator()->getService("EventDataSvc", 00045 IID_IDataProviderSvc, (IInterface*&)dataSvc); 00046 if ( sc.isFailure() ) { 00047 log << MSG::FATAL << "Could not get EventDataSvc in EvtRecDTagCnv" << endreq; 00048 return sc; 00049 } 00050 00051 SmartDataPtr<EvtRecTrackCol> evtRecTrackCol(dataSvc, EventModel::EvtRec::EvtRecTrackCol); 00052 if ( ! evtRecTrackCol) { 00053 log << MSG::INFO << "Could not find EvtRecTrackCol" << endreq; 00054 } 00055 00056 // convert 00057 TIter evtRecDTagIter(m_evtRecDTagCol); 00058 TEvtRecDTag* evtRecDTagRoot = 0; 00059 while ( (evtRecDTagRoot = (TEvtRecDTag*)evtRecDTagIter.Next() ) ) { 00060 EvtRecDTag* evtRecDTag = new EvtRecDTag(); 00061 m_common.m_rootEvtRecDTagMap[evtRecDTagRoot] = evtRecDTag; 00062 00063 // set .... 00064 evtRecDTag->setdecayMode( (EvtRecDTag::DecayMode)evtRecDTagRoot->decayMode() ); 00065 evtRecDTag->settype( (EvtRecDTag::SelType)evtRecDTagRoot->type() ); 00066 evtRecDTag->setbeamE( evtRecDTagRoot->beamE() ); 00067 evtRecDTag->setmass( evtRecDTagRoot->mass() ); 00068 evtRecDTag->setmBC( evtRecDTagRoot->mBC() ); 00069 evtRecDTag->setdeltaE( evtRecDTagRoot->deltaE() ); 00070 evtRecDTag->setcharge( evtRecDTagRoot->charge() ); 00071 evtRecDTag->setcharm( evtRecDTagRoot->charm() ); 00072 evtRecDTag->setnumOfChildren( evtRecDTagRoot->numOfChildren() ); 00073 00074 HepLorentzVector p4(evtRecDTagRoot->px(),evtRecDTagRoot->py(),evtRecDTagRoot->pz(),evtRecDTagRoot->pe()); 00075 evtRecDTag->setp4(p4); 00076 00077 00078 const std::vector<int>& tracks=evtRecDTagRoot->tracks(); 00079 const std::vector<int>& showers=evtRecDTagRoot->showers(); 00080 const std::vector<int>& otherTracks=evtRecDTagRoot->otherTracks(); 00081 const std::vector<int>& otherShowers=evtRecDTagRoot->otherShowers(); 00082 const std::vector<int>& pionId=evtRecDTagRoot->pionId(); 00083 const std::vector<int>& kaonId=evtRecDTagRoot->kaonId(); 00084 00085 for(unsigned int i=0; i<tracks.size();i++) 00086 evtRecDTag->addTrack( 00087 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(tracks[i])) 00088 ); 00089 00090 for(unsigned int i=0; i<showers.size();i++) 00091 evtRecDTag->addShower( 00092 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(showers[i])) 00093 ); 00094 00095 00096 for(unsigned int i=0; i<otherTracks.size();i++) 00097 evtRecDTag->addOtherTrack( 00098 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(otherTracks[i])) 00099 ); 00100 00101 00102 for(unsigned int i=0; i<otherShowers.size();i++) 00103 evtRecDTag->addOtherShower( 00104 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(otherShowers[i])) 00105 ); 00106 00107 for(unsigned int i=0; i<pionId.size();i++) 00108 evtRecDTag->addPionId( 00109 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(pionId[i])) 00110 ); 00111 00112 for(unsigned int i=0; i<kaonId.size();i++) 00113 evtRecDTag->addKaonId( 00114 dynamic_cast<EvtRecTrack*>(evtRecTrackCol->containedObject(kaonId[i])) 00115 ); 00116 00117 00118 00119 evtRecDTagCol->push_back(evtRecDTag); 00120 } 00121 00122 delete m_evtRecDTagCol; 00123 m_evtRecDTagCol = 0; 00124 return StatusCode::SUCCESS; 00125 }
|
|
|
|
the CLID of the upper converter if any
|
|
each converter knows the corresponding adresses
|
|
each converter knows the corresponding adresses
|
|
the branchNr of this converter for writing
|
|
|
|
|
|
|
|
|
|
|
|
array with number of branches for reading
|
|
array with number of branches for reading
|
|
|
|
|
|
relational maps
|
|
|
|
pointer to eventdataservice
|
|
pointer to eventdataservice
|
|
|
|
|
|
|
|
|
|
|
|
|
|
the object that was read
|
|
the object that was read
|
|
root branchname (may be concatenated of severals)
|
|
pointer to the RootInterface
|
|
pointer to the RootInterface
|
|
each converter knows it's treename
|