#include <RecMucTrackCnv.h>
Inheritance diagram for RecMucTrackCnv:
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 | ~RecMucTrackCnv () |
virtual | ~RecMucTrackCnv () |
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 | |
RecMucTrackCnv (ISvcLocator *svc) | |
RecMucTrackCnv (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_recMucTrackCol |
root object to be read | |
TObjArray * | m_recMucTrackCol |
root object to be read | |
Friends | |
class | CnvFactory<RecMucTrackCnv> |
|
|
|
|
|
|
|
|
|
00025 { };
|
|
00035 : RootEventBaseCnv(classID(), svc) 00036 { 00037 00038 // Here we associate this converter with the /Event path on the TDS. 00039 MsgStream log(msgSvc(), "RecMucTrackCnv"); 00040 //log << MSG::DEBUG << "Constructor called for " << objType() << endreq; 00041 //m_rootTreename ="Rec"; 00042 //RecMucTrack *atrack = new RecMucTrack(); 00043 //RecMucTrackCol *atrackCol = new RecMucTrackCol; 00044 //cout<<"in RecMucTrackCnv "<<atrack->clID()<<" "<<atrackCol->clID()<<" "<<CLID_ObjectVector<<endl; 00045 m_rootBranchname ="m_recMucTrackCol"; 00046 //declareObject(EventModel::Recon::RecMucTrackCol, objType(), m_rootTreename, m_rootBranchname); 00047 m_adresses.push_back(&m_recMucTrackCol); 00048 m_recMucTrackCol=0; 00049 }
|
|
00025 { };
|
|
|
|
00021 {
00022 return CLID_RecMucTrackCol;
00023 }
|
|
00021 {
00022 return CLID_RecMucTrackCol;
00023 }
|
|
|
|
|
|
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. 00163 { 00164 00165 MsgStream log(msgSvc(), "RecMucTrackCnv"); 00166 log << MSG::DEBUG << "RecMucTrackCnv::DataObjectToTObject" << endreq; 00167 StatusCode sc=StatusCode::SUCCESS; 00168 00169 RecMucTrackCol * mucTrackColTds=dynamic_cast<RecMucTrackCol *> (obj); 00170 if (!mucTrackColTds) { 00171 log << MSG::ERROR << "Could not downcast to RecMucTrackCol" << endreq; 00172 return StatusCode::FAILURE; 00173 } 00174 00175 DataObject *evt; 00176 m_eds->findObject(EventModel::Recon::Event,evt); 00177 if (evt==NULL) { 00178 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq; 00179 return StatusCode::FAILURE; 00180 } 00181 ReconEvent * devtTds=dynamic_cast<ReconEvent *> (evt); 00182 if (!devtTds) { 00183 log << MSG::ERROR << "RecMucTrackCnv:Could not downcast to TDS DigiEvent" << endreq; 00184 } 00185 IOpaqueAddress *addr; 00186 00187 m_cnvSvc->getRecTrackCnv()->createRep(evt,addr); 00188 TRecTrackEvent *recEvt=m_cnvSvc->getRecTrackCnv()->getWriteObject(); 00189 00190 const TObjArray *m_recMucTrackCol = recEvt->getMucTrackCol(); 00191 if (!m_recMucTrackCol) return sc; 00192 recEvt->clearMucTrackCol(); //necessary in case there is I/O at the same time since array is static 00193 RecMucTrackCol::const_iterator mucTrackTds; 00194 00195 for (mucTrackTds = mucTrackColTds->begin(); mucTrackTds != mucTrackColTds->end(); mucTrackTds++) { 00196 Int_t trackId = (*mucTrackTds)->trackId(); 00197 Int_t id = (*mucTrackTds)-> id(); 00198 Int_t st = (*mucTrackTds)->status(); 00199 Int_t type = (*mucTrackTds)->type(); 00200 00201 Int_t startPart = (*mucTrackTds)->startPart(); 00202 Int_t endPart = (*mucTrackTds)->endPart(); 00203 Int_t brLastLayer = (*mucTrackTds)->brLastLayer(); 00204 Int_t ecLastLayer = (*mucTrackTds)->ecLastLayer(); 00205 Int_t numHits = (*mucTrackTds)->numHits(); 00206 Int_t numLayers = (*mucTrackTds)->numLayers(); 00207 Int_t maxHitsInLayer = (*mucTrackTds)->maxHitsInLayer(); 00208 00209 Double_t depth = (*mucTrackTds)->depth(); 00210 Double_t chi2 = (*mucTrackTds)->chi2(); 00211 Int_t dof = (*mucTrackTds)->dof(); 00212 Double_t rms = (*mucTrackTds)->rms(); 00213 00214 Double_t xPos = (*mucTrackTds)->xPos() ; 00215 Double_t yPos = (*mucTrackTds)->yPos() ; 00216 Double_t zPos = (*mucTrackTds)->zPos() ; 00217 00218 Double_t xPosSigma = (*mucTrackTds)->xPosSigma() ; 00219 Double_t yPosSigma = (*mucTrackTds)->yPosSigma() ; 00220 Double_t zPosSigma = (*mucTrackTds)->zPosSigma() ; 00221 00222 Double_t distance = (*mucTrackTds)->distance(); 00223 Double_t deltaphi = (*mucTrackTds)->deltaPhi(); 00224 00225 Double_t px = (*mucTrackTds)->px() ; 00226 Double_t py = (*mucTrackTds)->py() ; 00227 Double_t pz = (*mucTrackTds)->pz() ; 00228 00229 00230 vector<Int_t> vecHits = (*mucTrackTds)->getVecHits(); 00231 vector<Int_t> expHits = (*mucTrackTds)->getExpHits(); 00232 vector<Float_t> distHits = (*mucTrackTds)->getDistHits(); 00233 00234 /* 00235 cout<<"in RecMucTrackCnv "<<vecHits.size()<<endl; 00236 for(int i = 0; i < vecHits.size(); i++){ 00237 cout<<" vec i = "<<i<<" "<<vecHits[i]<<endl; 00238 } 00239 00240 for(int i = 0; i < expHits.size(); i++){ 00241 cout<<" exp i = "<<i<<" "<<expHits[i]<<endl; 00242 } 00243 00244 for(int i = 0; i < distHits.size(); i++){ 00245 cout<<" dist i = "<<i<<" "<<distHits[i]<<endl; 00246 } 00247 */ 00248 00249 TRecMucTrack *mucTrackRoot = new TRecMucTrack(); //liangyt 00250 //m_common.m_RecMucTrackMap[(*mucTrackTds)] = mucTrackRoot; 00251 00252 mucTrackRoot->setTrackId( trackId ); 00253 mucTrackRoot->setId( id ); 00254 mucTrackRoot->setStatus( st ); 00255 mucTrackRoot->setType( type ); 00256 00257 mucTrackRoot->setStartPart( startPart ); 00258 mucTrackRoot->setEndPart( endPart ); 00259 mucTrackRoot->setBrLastLayer( brLastLayer ); 00260 mucTrackRoot->setEcLastLayer( ecLastLayer ); 00261 mucTrackRoot->setNumHits( numHits ); 00262 mucTrackRoot->setNumLayers( numLayers ); 00263 mucTrackRoot->setMaxHitsInLayer( maxHitsInLayer ); 00264 00265 mucTrackRoot->setDepth( depth ); 00266 mucTrackRoot->setChi2( chi2 ); 00267 mucTrackRoot->setDof( dof ); 00268 mucTrackRoot->setRms( rms ); 00269 00270 mucTrackRoot->setXPos( xPos ); 00271 mucTrackRoot->setYPos( yPos ); 00272 mucTrackRoot->setZPos( zPos ); 00273 00274 mucTrackRoot->setXPosSigma( xPosSigma ); 00275 mucTrackRoot->setYPosSigma( yPosSigma ); 00276 mucTrackRoot->setZPosSigma( zPosSigma ); 00277 00278 mucTrackRoot->setDistance(distance); 00279 mucTrackRoot->setDeltaPhi(deltaphi); 00280 00281 //cout<<"in RecMucTrackCnv xyz = "<<xPos<<" "<<yPos<<" "<<zPos<<" depth= "<<depth<<" "<<maxHitsInLayer<<" "<<deltaphi<<endl; 00282 00283 mucTrackRoot->setPx( px ); 00284 mucTrackRoot->setPy( py ); 00285 mucTrackRoot->setPz( pz ); 00286 00287 mucTrackRoot->setVecHits(vecHits); 00288 mucTrackRoot->setExpHits(expHits); 00289 mucTrackRoot->setDistHits(distHits); 00290 00291 recEvt->addMucTrack(mucTrackRoot); 00292 } 00293 00294 return StatusCode::SUCCESS; 00295 }
|
|
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. 00051 { 00052 // creation of TDS object from root object 00053 00054 MsgStream log(msgSvc(), "RecMucTrackCnv"); 00055 log << MSG::DEBUG << "RecMucTrackCnv::TObjectToDataObject" << endreq; 00056 StatusCode sc=StatusCode::SUCCESS; 00057 00058 // create the TDS location for the MucTrack Collection 00059 RecMucTrackCol* mucTrackTdsCol = new RecMucTrackCol; 00060 refpObject=mucTrackTdsCol; 00061 00062 00063 // now convert 00064 if (!m_recMucTrackCol) return sc; 00065 TIter mucTrackIter(m_recMucTrackCol); 00066 TRecMucTrack *mucTrackRoot = 0; 00067 while ((mucTrackRoot = (TRecMucTrack*)mucTrackIter.Next())) { 00068 00069 int trackId = mucTrackRoot->trackId(); 00070 int id = mucTrackRoot-> id(); 00071 int st = mucTrackRoot->status(); 00072 int type = mucTrackRoot->type(); 00073 00074 int startPart = mucTrackRoot->startPart(); 00075 int endPart = mucTrackRoot->endPart(); 00076 int brLastLayer = mucTrackRoot->brLastLayer(); 00077 int ecLastLayer = mucTrackRoot->ecLastLayer(); 00078 int numHits = mucTrackRoot->numHits(); 00079 int numLayers = mucTrackRoot->numLayers(); 00080 int maxHitsInLayer = mucTrackRoot->maxHitsInLayer(); 00081 00082 double depth = mucTrackRoot->depth(); 00083 double chi2 = mucTrackRoot->chi2(); 00084 int dof = mucTrackRoot->dof(); 00085 double rms = mucTrackRoot->rms(); 00086 00087 00088 00089 double xPos = mucTrackRoot->xPos() ; 00090 double yPos = mucTrackRoot->yPos() ; 00091 double zPos = mucTrackRoot->zPos() ; 00092 00093 double xPosSigma = mucTrackRoot->xPosSigma() ; 00094 double yPosSigma = mucTrackRoot->yPosSigma() ; 00095 double zPosSigma = mucTrackRoot->zPosSigma() ; 00096 00097 double px = mucTrackRoot->px() ; 00098 double py = mucTrackRoot->py() ; 00099 double pz = mucTrackRoot->pz() ; 00100 00101 double distance = mucTrackRoot->distance(); 00102 double deltaphi = mucTrackRoot->deltaPhi(); 00103 //cout<<"in RecMucTrackCnv distance = "<<distance<<" xpos= "<<xPos<<endl; 00104 00105 vector<int> vecHits = mucTrackRoot->vecHits(); 00106 vector<int> expHits = mucTrackRoot->expHits(); 00107 vector<float> distHits = mucTrackRoot->distHits(); 00108 00109 //cout<<"in RecMucTrackCnv size = "<<vecHits.size()<<" "<<expHits.size()<<" "<<distHits.size()<<endl; 00110 00111 RecMucTrack *mucTrackTds = new RecMucTrack(); 00112 m_common.m_rootRecMucTrackMap[mucTrackRoot] = mucTrackTds; 00113 00114 mucTrackTds->setTrackId( trackId ); 00115 mucTrackTds->setId( id ); 00116 mucTrackTds->setStatus( st ); 00117 mucTrackTds->setType( type ); 00118 00119 mucTrackTds->setStartPart( startPart ); 00120 mucTrackTds->setEndPart( endPart ); 00121 mucTrackTds->setBrLastLayer( brLastLayer ); 00122 mucTrackTds->setEcLastLayer( ecLastLayer ); 00123 mucTrackTds->setNumHits( numHits ); 00124 mucTrackTds->setNumLayers( numLayers ); 00125 mucTrackTds->setMaxHitsInLayer( maxHitsInLayer ); 00126 00127 mucTrackTds->setDepth( depth ); 00128 mucTrackTds->setChi2( chi2 ); 00129 mucTrackTds->setDof( dof ); 00130 mucTrackTds->setRms( rms ); 00131 00132 mucTrackTds->setXPos( xPos ); 00133 mucTrackTds->setYPos( yPos ); 00134 mucTrackTds->setZPos( zPos ); 00135 00136 mucTrackTds->setXPosSigma( xPosSigma ); 00137 mucTrackTds->setYPosSigma( yPosSigma ); 00138 mucTrackTds->setZPosSigma( zPosSigma ); 00139 00140 mucTrackTds->setPx( px ); 00141 mucTrackTds->setPy( py ); 00142 mucTrackTds->setPz( pz ); 00143 00144 mucTrackTds->setDistance(distance); 00145 mucTrackTds->setDeltaPhi(deltaphi); 00146 mucTrackTds->setVecHits(vecHits); //need fix 00147 mucTrackTds->setExpHits(expHits); 00148 mucTrackTds->setDistHits(distHits); 00149 00150 //cout<<"in RecMucTrackCnv::T->D set mucpos"<<endl; 00151 00152 mucTrackTdsCol->push_back(mucTrackTds); 00153 //delete mucTrackTds; // wensp add 2005/12/31 00154 // mucTrackTds = NULL; 00155 } 00156 00157 // m_mucTrackCol->Delete(); // wensp add 2005/12/30 00158 delete m_recMucTrackCol; 00159 m_recMucTrackCol = 0; 00160 return StatusCode::SUCCESS; 00161 }
|
|
|
|
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 object to be read
|
|
root object to be read
|
|
root branchname (may be concatenated of severals)
|
|
pointer to the RootInterface
|
|
pointer to the RootInterface
|
|
each converter knows it's treename
|