#include <RecMdcDedxCnv.h>
Inheritance diagram for RecMdcDedxCnv:
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 | ~RecMdcDedxCnv () |
virtual | ~RecMdcDedxCnv () |
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 | |
RecMdcDedxCnv (ISvcLocator *svc) | |
RecMdcDedxCnv (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_recMdcDedxCol |
root object to be read | |
TObjArray * | m_recMdcDedxCol |
root object to be read | |
Friends | |
class | CnvFactory<RecMdcDedxCnv> |
|
|
|
|
|
|
|
|
|
00025 { };
|
|
00028 : RootEventBaseCnv(classID(), svc) 00029 { 00030 00031 // Here we associate this converter with the /Event path on the TDS. 00032 MsgStream log(msgSvc(), "RecMdcDedxCnv"); 00033 //log << MSG::DEBUG << "Constructor called for " << objType() << endreq; 00034 //m_rootTreename ="Rec"; 00035 m_rootBranchname ="m_recMdcDedxCol"; 00036 // declareObject(EventModel::Recon::RecMdcDedxCol, objType(), m_rootTreename, m_rootBranchname); 00037 m_adresses.push_back(&m_recMdcDedxCol); 00038 m_recMdcDedxCol=0; 00039 }
|
|
00025 { };
|
|
|
|
00021 {
00022 return CLID_RecMdcDedxCol;
00023 }
|
|
00021 {
00022 return CLID_RecMdcDedxCol;
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. 00141 { 00142 MsgStream log(msgSvc(), "RecMdcDedxCnv"); 00143 log << MSG::DEBUG << "RecMdcDedxCnv::DataObjectToTObject" << endreq; 00144 StatusCode sc=StatusCode::SUCCESS; 00145 00146 RecMdcDedxCol * recMdcDedxCol=dynamic_cast<RecMdcDedxCol *> (obj); 00147 if (!recMdcDedxCol) { 00148 log << MSG::ERROR << "Could not downcast to RecMdcDedxCol" << endreq; 00149 return StatusCode::FAILURE; 00150 } 00151 00152 DataObject *evt; 00153 m_eds->findObject(EventModel::Recon::Event,evt); 00154 if (evt==NULL) { 00155 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq; 00156 return StatusCode::FAILURE; 00157 } 00158 ReconEvent * devtTds=dynamic_cast<ReconEvent *> (evt); 00159 if (!devtTds) { 00160 log << MSG::ERROR << "RecMdcDedxCnv:Could not downcast to TDS RecEvent" << endreq; 00161 } 00162 IOpaqueAddress *addr; 00163 00164 m_cnvSvc->getRecTrackCnv()->createRep(evt,addr); 00165 TRecTrackEvent *recEvt=m_cnvSvc->getRecTrackCnv()->getWriteObject(); 00166 00167 const TObjArray *m_recMdcDedxCol = recEvt->getRecMdcDedxCol(); 00168 if (!m_recMdcDedxCol) return sc; 00169 recEvt->clearRecMdcDedxCol(); //necessary in case there is I/O at the same time since array is static 00170 RecMdcDedxCol::const_iterator recMdcDedx; 00171 00172 for (recMdcDedx = recMdcDedxCol->begin(); recMdcDedx != recMdcDedxCol->end(); recMdcDedx++) { 00173 Int_t trackId = (*recMdcDedx)->trackId(); 00174 Int_t particleId = (*recMdcDedx)->particleId(); 00175 Int_t status = (*recMdcDedx)->status(); 00176 Int_t truncAlg = (*recMdcDedx)->truncAlg(); 00177 // Double_t pb[5]; 00178 // for (Int_t i = 0; i < 5; i++) 00179 // pb[i] = (*dedxTds)->prob(i); 00180 Double_t dedxHit = (*recMdcDedx)->getDedxHit(); 00181 Double_t dedxEsat = (*recMdcDedx)->getDedxEsat(); 00182 Double_t dedxNoRun = (*recMdcDedx)->getDedxNoRun(); 00183 Double_t dedxMoment = (*recMdcDedx)->getDedxMoment(); 00184 00185 00186 Double_t chiE = (*recMdcDedx)->chi(0); 00187 Double_t chiMu = (*recMdcDedx)->chi(1); 00188 Double_t chiPi = (*recMdcDedx)->chi(2); 00189 Double_t chiK = (*recMdcDedx)->chi(3); 00190 Double_t chiP = (*recMdcDedx)->chi(4); 00191 00192 Int_t numGoodHits = (*recMdcDedx)->numGoodHits(); 00193 Int_t numTotalHits = (*recMdcDedx)->numTotalHits(); 00194 00195 Double_t probPH = (*recMdcDedx)->probPH(); 00196 Double_t normPH = (*recMdcDedx)->normPH(); 00197 Double_t errorPH = (*recMdcDedx)->errorPH(); 00198 Double_t twentyPH = (*recMdcDedx)->twentyPH(); 00199 //Double_t fracErrPH = (*dedxTds)-> fracErrPH(); 00200 //Double_t minIronPH = (*dedxTds)->minIronPH(); 00201 //Double_t corrPH = (*dedxTds)->corrPH(); 00202 double dedxExpect[5],sigmaDedx[5],pidProb[5],chi[5]; 00203 for (int i=0; i<5; i++){ 00204 chi[i] = (*recMdcDedx)->chi(i); 00205 dedxExpect[i] = (*recMdcDedx)->getDedxExpect(i); 00206 sigmaDedx[i] = (*recMdcDedx)->getSigmaDedx(i); 00207 pidProb[i] = (*recMdcDedx)->getPidProb(i); 00208 } 00209 00210 00211 TRecMdcDedx *recMdcDedxRoot = new TRecMdcDedx(); 00212 //m_common.m_recMdcDedxMap[(*recMdcDedx)] = recMdcDedxRoot; 00213 //std::cout<<"check write to Reconstrunction root particle Id is "<<dedxRoot->particleId()<<endl; 00214 recMdcDedxRoot->setTrackId(trackId); 00215 recMdcDedxRoot->setParticleId(particleId); 00216 recMdcDedxRoot->setStatus (status); 00217 recMdcDedxRoot->setTruncAlg(truncAlg); 00218 log << MSG::INFO<<"check Reconstrunction root"<<" particle Id is : "<<particleId 00219 <<"track id is : "<<trackId 00220 <<" and status is : "<<status<<endreq; 00221 //dedxRoot->setProb(pb); 00222 recMdcDedxRoot->setChiE(chiE); 00223 recMdcDedxRoot->setChiMu(chiMu); 00224 recMdcDedxRoot->setChiPi(chiPi); 00225 recMdcDedxRoot->setChiK(chiK); 00226 recMdcDedxRoot->setChiP(chiP); 00227 00228 recMdcDedxRoot->setNumGoodHits( numGoodHits); 00229 recMdcDedxRoot->setNumTotalHits( numTotalHits); 00230 00231 recMdcDedxRoot->setProbPH(probPH); 00232 recMdcDedxRoot->setNormPH(normPH); 00233 recMdcDedxRoot->setErrorPH(errorPH); 00234 recMdcDedxRoot->setTwentyPH(twentyPH); 00235 // for (int i=0; i<5; i++){ 00236 recMdcDedxRoot->setChi(chi); 00237 recMdcDedxRoot->setDedxExpect(dedxExpect); 00238 recMdcDedxRoot->setSigmaDedx(sigmaDedx); 00239 recMdcDedxRoot->setPidProb(pidProb); 00240 00241 recMdcDedxRoot->setDedxHit(dedxHit); 00242 recMdcDedxRoot->setDedxEsat(dedxEsat); 00243 recMdcDedxRoot->setDedxNoRun(dedxNoRun); 00244 recMdcDedxRoot->setDedxMoment(dedxMoment); 00245 00246 //} 00247 log << MSG::INFO<<"check Reconstrunction root"<<" particle Id is : "<<particleId 00248 <<"track id is : "<<trackId 00249 <<" and status is : "<<status<<endreq; 00250 00251 // dedxRoot->setFracErrPH(fracErrPH); 00252 //dedxRoot->setMinIronPH(minIronPH); 00253 //dedxRoot->setCorrPH(corrPH); 00254 recEvt->addRecMdcDedx(recMdcDedxRoot); 00255 } 00256 00257 return StatusCode::SUCCESS; 00258 }
|
|
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. 00041 { 00042 // creation of TDS object from root object 00043 MsgStream log(msgSvc(), "RecMdcDedxCnv"); 00044 log << MSG::DEBUG << "RecMdcDedxCnv::TObjectToDataObject" << endreq; 00045 StatusCode sc=StatusCode::SUCCESS; 00046 00047 // create the TDS location for the Dedx Collection 00048 RecMdcDedxCol* recMdcDedxCol = new RecMdcDedxCol; 00049 refpObject=recMdcDedxCol; 00050 00051 00052 // now convert 00053 if (!m_recMdcDedxCol) return sc; 00054 TIter dedxIter(m_recMdcDedxCol); 00055 TRecMdcDedx *recMdcDedxRoot = 0; 00056 while ((recMdcDedxRoot = (TRecMdcDedx*)dedxIter.Next())) { 00057 double dedxHit = recMdcDedxRoot->dedxHit(); 00058 double dedxEsat = recMdcDedxRoot->dedxEsat(); 00059 double dedxNoRun = recMdcDedxRoot->dedxNoRun(); 00060 double dedxMoment = recMdcDedxRoot->dedxMoment(); 00061 00062 int trackId = recMdcDedxRoot->trackId(); 00063 int particleId = recMdcDedxRoot->particleId(); 00064 int status = recMdcDedxRoot->status(); 00065 int truncAlg = recMdcDedxRoot->truncAlg(); 00066 // double pb[5]; 00067 // for ( int i = 0; i < 5; i++) 00068 // pb[i] = dedxRoot->prob(i); 00069 00070 // double numSigmaE = dedxRoot->numSigmaE(); 00071 // double numSigmaMu = dedxRoot->numSigmaMu(); 00072 // double numSigmaPi = dedxRoot->numSigmaPi(); 00073 // double numSigmaK = dedxRoot->numSigmaK(); 00074 // double numSigmaP = dedxRoot->numSigmaP(); 00075 double chi[5]; 00076 chi[0] = recMdcDedxRoot->chiE(); 00077 chi[1] = recMdcDedxRoot->chiMu(); 00078 chi[2] = recMdcDedxRoot->chiPi(); 00079 chi[3] = recMdcDedxRoot->chiK(); 00080 chi[4] = recMdcDedxRoot->chiP(); 00081 int numGoodHits = recMdcDedxRoot->numGoodHits(); 00082 int numTotalHits = recMdcDedxRoot->numTotalHits(); 00083 00084 double probPH = recMdcDedxRoot->probPH(); 00085 double normPH = recMdcDedxRoot->normPH(); 00086 double errorPH = recMdcDedxRoot->errorPH(); 00087 double twentyPH = recMdcDedxRoot->twentyPH(); 00088 double dedxExpect[5],sigmaDedx[5],pidProb[5]; 00089 for (int i=0; i<5; i++){ 00090 dedxExpect[i] = recMdcDedxRoot->dedxExpect(i); 00091 sigmaDedx[i] = recMdcDedxRoot->sigmaDedx(i); 00092 pidProb[i] = recMdcDedxRoot->pidProb(i);} 00093 00094 RecMdcDedx *recMdcDedx = new RecMdcDedx(); 00095 m_common.m_rootRecMdcDedxMap[recMdcDedxRoot] = recMdcDedx; 00096 00097 recMdcDedx->setTrackId(trackId); 00098 recMdcDedx->setParticleId(particleId); 00099 recMdcDedx->setStatus (status); 00100 recMdcDedx->setTruncAlg(truncAlg); 00101 // dedxTds->setProb(pb); 00102 // dedxTds->setNumSigmaE(numSigmaE); 00103 // dedxTds->setNumSigmaMu(numSigmaMu); 00104 // dedxTds->setNumSigmaPi(numSigmaPi); 00105 // dedxTds->setNumSigmaK(numSigmaK); 00106 // dedxTds->setNumSigmaP(numSigmaP); 00107 recMdcDedx->setChi(chi); 00108 recMdcDedx->setNumGoodHits( numGoodHits); 00109 recMdcDedx->setNumTotalHits( numTotalHits); 00110 00111 recMdcDedx->setProbPH(probPH); 00112 recMdcDedx->setNormPH(normPH); 00113 recMdcDedx->setErrorPH(errorPH); 00114 recMdcDedx->setTwentyPH(twentyPH); 00115 //for (int i=0; i<5; i++){ 00116 recMdcDedx->setDedxExpect(dedxExpect); 00117 recMdcDedx->setSigmaDedx(sigmaDedx); 00118 recMdcDedx->setPidProb(pidProb); 00119 00120 recMdcDedx->setDedxHit(dedxHit); 00121 recMdcDedx->setDedxEsat(dedxEsat); 00122 recMdcDedx->setDedxNoRun(dedxNoRun); 00123 recMdcDedx->setDedxMoment(dedxMoment); 00124 00125 //} 00126 00127 00128 00129 recMdcDedxCol->push_back(recMdcDedx); 00130 //delete dedxTds; 00131 // dedxTds = NULL; 00132 } 00133 //m_dedxCol->Delete(); 00134 delete m_recMdcDedxCol; 00135 m_recMdcDedxCol = 0; 00136 00137 return StatusCode::SUCCESS; 00138 }
|
|
|
|
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
|