Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RecMdcKalHelixSegCnv Class Reference

#include <RecMdcKalHelixSegCnv.h>

Inheritance diagram for RecMdcKalHelixSegCnv:

RootEventBaseCnv RootEventBaseCnv Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > Converter< Ty1, Ty2 > List of all members.

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 ()
destinationoperator (const source &) const
destinationoperator (const source &) const
virtual long repSvcType () const
virtual long repSvcType () const
virtual ~RecMdcKalHelixSegCnv ()
virtual ~RecMdcKalHelixSegCnv ()

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 destinationconvert (const source &) const =0
virtual destinationconvert (const source &) const =0
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
virtual StatusCode DataObjectToTObject (DataObject *obj, RootAddress *addr)
 transformation to root
 RecMdcKalHelixSegCnv (ISvcLocator *svc)
 RecMdcKalHelixSegCnv (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
RootCnvSvcm_cnvSvc
RootCnvSvcm_cnvSvc
std::string m_currentFileName
IDataProviderSvc * m_eds
 pointer to eventdataservice
IDataProviderSvc * m_eds
 pointer to eventdataservice
RootEvtSelectorm_evtsel
RootEvtSelectorm_evtsel
std::vector< RootCnvSvc::Leafm_leaves
std::vector< RootCnvSvc::Leafm_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)
RootInterfacem_rootInterface
 pointer to the RootInterface
RootInterfacem_rootInterface
 pointer to the RootInterface
std::string m_rootTreename
 each converter knows it's treename

Private Attributes

commonData m_common
 relational maps
TObjArray * m_recMdcKalHelixSegCol
 root object to be read
TObjArray * m_recMdcKalHelixSegCol
 root object to be read

Friends

class CnvFactory<RecMdcKalHelixSegCnv>

Member Typedef Documentation

template<class Ty1, class Ty2>
typedef Ty2 Converter< Ty1, Ty2 >::destination [inherited]
 

template<class Ty1, class Ty2>
typedef Ty2 Converter< Ty1, Ty2 >::destination [inherited]
 

template<class Ty1, class Ty2>
typedef Ty1 Converter< Ty1, Ty2 >::source [inherited]
 

template<class Ty1, class Ty2>
typedef Ty1 Converter< Ty1, Ty2 >::source [inherited]
 


Constructor & Destructor Documentation

virtual RecMdcKalHelixSegCnv::~RecMdcKalHelixSegCnv  )  [inline, virtual]
 

00025 { };

RecMdcKalHelixSegCnv::RecMdcKalHelixSegCnv ISvcLocator *  svc  )  [protected]
 

00029 : RootEventBaseCnv(classID(), svc)
00030 {
00031 
00032     // Here we associate this converter with the /Event path on the TDS.
00033     MsgStream log(msgSvc(), "RecMdcKalHelixSegCnv");
00034     //log << MSG::DEBUG << "Constructor called for " << objType() << endreq;
00035     //m_rootTreename ="Rec";
00036     m_rootBranchname ="m_recMdcKalHelixSegCol";
00037     //declareObject(EventModel::Recon::RecMdcKalHelixSegCol, objType(), m_rootTreename, m_rootBranchname);
00038     m_adresses.push_back(&m_recMdcKalHelixSegCol);
00039     m_recMdcKalHelixSegCol=0;
00040 }

virtual RecMdcKalHelixSegCnv::~RecMdcKalHelixSegCnv  )  [inline, virtual]
 

00025 { };

RecMdcKalHelixSegCnv::RecMdcKalHelixSegCnv ISvcLocator *  svc  )  [protected]
 


Member Function Documentation

const CLID& RecMdcKalHelixSegCnv::classID  )  [inline, static]
 

00021   {
00022        return CLID_RecMdcKalHelixSegCol; 
00023   }

const CLID& RecMdcKalHelixSegCnv::classID  )  [inline, static]
 

00021   {
00022        return CLID_RecMdcKalHelixSegCol; 
00023   }

template<class Ty1, class Ty2>
virtual destination* Converter< Ty1, Ty2 >::convert const source  )  const [protected, pure virtual, inherited]
 

template<class Ty1, class Ty2>
virtual destination* Converter< Ty1, Ty2 >::convert const source  )  const [protected, pure virtual, inherited]
 

virtual StatusCode RootEventBaseCnv::createObj IOpaqueAddress *  addr,
DataObject *&  dat
[virtual, inherited]
 

Convert the persistent object to transient.

Reimplemented in EventCnv, and EventCnv.

StatusCode RootEventBaseCnv::createObj IOpaqueAddress *  addr,
DataObject *&  dat
[virtual, inherited]
 

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 }

virtual StatusCode RootEventBaseCnv::createRep DataObject *  pObject,
IOpaqueAddress *&  refpAddress
[virtual, inherited]
 

Convert the transient object to the requested representation.

StatusCode RootEventBaseCnv::createRep DataObject *  pObject,
IOpaqueAddress *&  refpAddress
[virtual, inherited]
 

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 }

virtual StatusCode RecMdcKalHelixSegCnv::DataObjectToTObject DataObject *  obj,
RootAddress addr
[protected, virtual]
 

transformation to root

Implements RootEventBaseCnv.

StatusCode RecMdcKalHelixSegCnv::DataObjectToTObject DataObject *  obj,
RootAddress addr
[protected, virtual]
 

transformation to root

Implements RootEventBaseCnv.

00126                                                                                           {
00127  
00128   MsgStream log(msgSvc(), "RecMdcKalHelixSegCnv");
00129   log << MSG::DEBUG << "RecMdcKalHelixSegCnv::DataObjectToTObject" << endreq;
00130  
00131   RecMdcKalHelixSegCol * mdcHitColTds=dynamic_cast<RecMdcKalHelixSegCol *> (obj);
00132   if (!mdcHitColTds) {
00133     log << MSG::ERROR << "Could not downcast to RecMdcKalHelixSegCol" << endreq;
00134     return StatusCode::FAILURE;
00135   }
00136  
00137   DataObject *evt;
00138   m_eds->findObject(EventModel::Recon::Event,evt);
00139   if (evt==NULL) {
00140     log << MSG::ERROR << "Could not get ReconEvent in TDS "  << endreq;
00141     return StatusCode::FAILURE;
00142   }
00143 
00144   ReconEvent * devtTds=dynamic_cast<ReconEvent *> (evt);
00145   if (!devtTds) {
00146     log << MSG::ERROR << "RecMdcKalHelixSegCnv:Could not downcast to TDS ReconEvent" << endreq;
00147   }
00148 
00149   IOpaqueAddress *addr;
00150 
00151   m_cnvSvc->getRecTrackCnv()->createRep(evt,addr); 
00152   TRecTrackEvent *recEvt=m_cnvSvc->getRecTrackCnv()->getWriteObject();
00153 
00154   const TObjArray *m_recMdcKalHelixSegCol = recEvt->getRecMdcKalHelixSegCol();
00155   if (!m_recMdcKalHelixSegCol) return StatusCode::SUCCESS;
00156   recEvt->clearRecMdcKalHelixSegCol(); //necessary in case there is I/O at the same time since array is static
00157 
00158   RecMdcKalHelixSegCol::const_iterator recMdcKalHelixSeg;
00159   for (recMdcKalHelixSeg = mdcHitColTds->begin(); recMdcKalHelixSeg != mdcHitColTds->end(); recMdcKalHelixSeg++) {
00160      Int_t      trackId =(*recMdcKalHelixSeg)->getTrackId();
00161      Int_t      flagLR = (*recMdcKalHelixSeg)->getFlagLR();
00162      UInt_t     mdcId = (*recMdcKalHelixSeg)->getMdcId().get_value();
00163      Double_t   tdc = (*recMdcKalHelixSeg)->getTdc();
00164      Double_t   adc = (*recMdcKalHelixSeg)->getAdc();
00165      Double_t   zhit = (*recMdcKalHelixSeg)->getZhit();
00166      Double_t   tof = (*recMdcKalHelixSeg)->getTof();
00167      Double_t   docaIncl = (*recMdcKalHelixSeg)->getDocaIncl();
00168      Double_t   docaExcl = (*recMdcKalHelixSeg)->getDocaExcl();
00169      Double_t   driftDist= (*recMdcKalHelixSeg)->getDD();
00170      Double_t   entra = (*recMdcKalHelixSeg)->getEntra();
00171      Double_t   driftT =  (*recMdcKalHelixSeg)->getDT();
00172 //     Int_t      layerId = (*recMdcKalHelixSeg)->getLayerId();
00173 //     Double_t   drIncl =  (*recMdcKalHelixSeg)->getDrIncl();
00174 //     Double_t   phi0Incl =(*recMdcKalHelixSeg)->getFi0Incl();
00175 //     Double_t   kappaIncl = (*recMdcKalHelixSeg)->getCpaIncl();
00176 //     Double_t   dzIncl =  (*recMdcKalHelixSeg)->getDzIncl();
00177 //     Double_t   tanlIncl = (*recMdcKalHelixSeg)->getTanlIncl();
00178 //     Double_t   drExcl =  (*recMdcKalHelixSeg)->getDrExcl();
00179 //     Double_t   phi0Excl = (*recMdcKalHelixSeg)->getFi0Excl();
00180 //     Double_t   kappaExcl = (*recMdcKalHelixSeg)->getCpaExcl();
00181 //     Double_t   dzExcl =   (*recMdcKalHelixSeg)->getDzExcl();
00182 //     Double_t   tanlExcl = (*recMdcKalHelixSeg)->getTanlExcl();
00183      HepVector  helixIncl_vct = (*recMdcKalHelixSeg)->getHelixIncl();
00184      HepVector  helixExcl_vct = (*recMdcKalHelixSeg)->getHelixExcl();
00185 //     HepSymMatrix  errIncl_mtx = (*recMdcKalHelixSeg)->getErrorIncl();
00186 //     HepSymMatrix  errExcl_mtx = (*recMdcKalHelixSeg)->getErrorExcl();
00187     
00188     Double_t helixIncl[5], helixExcl[5]; //errIncl[5][5], errExcl[5][5];
00189      for(Int_t i=0; i<5; i++){
00190              helixIncl[i] = helixIncl_vct[i];
00191              helixExcl[i] = helixExcl_vct[i];
00192      }
00193 //     for (Int_t i=0; i<5; i++){
00194 //             for(Int_t j=0; j<5; j++){
00195 //                   errIncl[i][j] = errIncl_mtx[i][j];
00196 //                   errExcl[i][j] = errExcl_mtx[i][j];
00197 //             }
00198 //     }
00199 
00200      TRecMdcKalHelixSeg *recMdcKalHelixSegRoot = new TRecMdcKalHelixSeg();
00201      //m_common.m_recMdcKalHelixSegMap[(*recMdcKalHelixSeg)] = recMdcKalHelixSegRoot;
00202 
00203      recMdcKalHelixSegRoot->setTrackId( trackId );
00204      recMdcKalHelixSegRoot->setFlagLR( flagLR );
00205      recMdcKalHelixSegRoot->setMdcId( Identifier(mdcId) );
00206      recMdcKalHelixSegRoot->setTdc( tdc );
00207      recMdcKalHelixSegRoot->setAdc( adc );
00208      recMdcKalHelixSegRoot->setZhit( zhit );
00209      recMdcKalHelixSegRoot->setTof( tof );
00210      recMdcKalHelixSegRoot->setDocaIncl( docaIncl );
00211      recMdcKalHelixSegRoot->setDocaExcl( docaExcl );
00212      recMdcKalHelixSegRoot->setDD( driftDist );
00213      recMdcKalHelixSegRoot->setEntra( entra );
00214      recMdcKalHelixSegRoot->setDT( driftT );
00215 //     recMdcKalHelixSegRoot->setLayerId( layerId );
00216 //     recMdcKalHelixSegRoot->setDrIncl( drIncl );
00217 //     recMdcKalHelixSegRoot->setFi0Incl( phi0Incl );
00218 //     recMdcKalHelixSegRoot->setCpaIncl( kappaIncl );
00219 //     recMdcKalHelixSegRoot->setDzIncl( dzIncl );
00220 //     recMdcKalHelixSegRoot->setTanlIncl( tanlIncl );
00221 //     recMdcKalHelixSegRoot->setDrExcl( drIncl );
00222 //     recMdcKalHelixSegRoot->setFi0Excl( phi0Excl );
00223 //     recMdcKalHelixSegRoot->setCpaExcl( kappaExcl );
00224 //     recMdcKalHelixSegRoot->setDzExcl( dzExcl );
00225 //     recMdcKalHelixSegRoot->setTanlExcl( tanlExcl );
00226      recMdcKalHelixSegRoot->setHelixIncl( helixIncl );
00227      recMdcKalHelixSegRoot->setHelixExcl( helixExcl );
00228 //     recMdcKalHelixSegRoot->setErrorIncl( errIncl );
00229 //     recMdcKalHelixSegRoot->setErrorExcl( errExcl );
00230 
00231      log<<MSG::INFO<<" recMdcKalHelixSegRoot.dd: "<<recMdcKalHelixSegRoot->getDD()
00232              <<" recMdcKalHelixSegRoot.entra: "<<recMdcKalHelixSegRoot->getEntra()
00233              <<endreq;
00234 
00235      recEvt->addRecMdcKalHelixSeg(recMdcKalHelixSegRoot);
00236   }
00237   return StatusCode::SUCCESS;
00238 }

void RootEventBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  treename,
const std::string &  branchname
[inherited]
 

Store TDS path to link a particular converter to an object on the TDS.

void RootEventBaseCnv::declareObject const std::string &  fullPath,
const CLID &  clid,
const std::string &  treename,
const std::string &  branchname
[inherited]
 

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 }

virtual StatusCode RootEventBaseCnv::fillObjRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

StatusCode RootEventBaseCnv::fillObjRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

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 }

virtual StatusCode RootEventBaseCnv::fillRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

Resolve the references of the converted object.

StatusCode RootEventBaseCnv::fillRepRefs IOpaqueAddress *  pAddress,
DataObject *  pObject
[virtual, inherited]
 

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 }

virtual StatusCode RootEventBaseCnv::finalize  )  [virtual, inherited]
 

StatusCode RootEventBaseCnv::finalize  )  [virtual, inherited]
 

00141                                         {
00142     if ( m_cnvSvc )     {
00143         m_cnvSvc->release();
00144         m_cnvSvc=0;
00145     }
00146     return Converter::finalize();
00147 }

TObject* RootEventBaseCnv::getReadObject  )  const [inline, inherited]
 

get the object to be read

00124 { return m_objRead;} 

TObject* RootEventBaseCnv::getReadObject  )  const [inline, inherited]
 

get the object to be read

00124 { return m_objRead;} 

virtual StatusCode RootEventBaseCnv::initialize  )  [virtual, inherited]
 

Reimplemented in DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, TrigCnv, DigiCnv, DstCnv, EvtHeaderCnv, EvtRecCnv, HltCnv, McCnv, RecTrackCnv, and TrigCnv.

StatusCode RootEventBaseCnv::initialize  )  [virtual, inherited]
 

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 }

template<class Ty1, class Ty2>
destination* Converter< Ty1, Ty2 >::operator const source  )  const [inline, inherited]
 

template<class Ty1, class Ty2>
destination* Converter< Ty1, Ty2 >::operator const source  )  const [inline, inherited]
 

virtual long RootEventBaseCnv::repSvcType  )  const [inline, virtual, inherited]
 

00087                                     { 
00088       return ROOT_StorageType; 
00089     } 

virtual long RootEventBaseCnv::repSvcType  )  const [inline, virtual, inherited]
 

00087                                     { 
00088       return ROOT_StorageType; 
00089     } 

const unsigned char RootEventBaseCnv::storageType  )  [inline, static, inherited]
 

Storage type and class ID.

00083                                                   {
00084       return ROOT_StorageType;
00085     }

const unsigned char RootEventBaseCnv::storageType  )  [inline, static, inherited]
 

Storage type and class ID.

00083                                                   {
00084       return ROOT_StorageType;
00085     }

virtual StatusCode RecMdcKalHelixSegCnv::TObjectToDataObject DataObject *&  obj  )  [protected, virtual]
 

transformation from root

Implements RootEventBaseCnv.

StatusCode RecMdcKalHelixSegCnv::TObjectToDataObject DataObject *&  obj  )  [protected, virtual]
 

transformation from root

Implements RootEventBaseCnv.

00042                                                                             {
00043   // creation of TDS object from root object
00044   MsgStream log(msgSvc(), "RecMdcKalHelixSegCnv");
00045   log << MSG::DEBUG << "RecMdcKalHelixSegCnv::TObjectToDataObject" << endreq;
00046 
00047   // create the TDS location for the RecMdcKalHelixSeg Collection
00048   RecMdcKalHelixSegCol* recMdcKalHelixSegCol = new RecMdcKalHelixSegCol;
00049   refpObject = recMdcKalHelixSegCol;
00050 
00051   // now convert
00052   if (!m_recMdcKalHelixSegCol) return StatusCode::SUCCESS;
00053   TIter mdcHitIter(m_recMdcKalHelixSegCol);
00054   TRecMdcKalHelixSeg *recMdcKalHelixSegRoot = 0;
00055   while ((recMdcKalHelixSegRoot = (TRecMdcKalHelixSeg*)mdcHitIter.Next())) {
00056     int      trackId = recMdcKalHelixSegRoot->getTrackId();
00057     int      flagLR = recMdcKalHelixSegRoot->getFlagLR(); 
00058     Identifier mdcId(recMdcKalHelixSegRoot->getMdcId()); 
00059     double   tdc = recMdcKalHelixSegRoot->getTdc();
00060     double   adc = recMdcKalHelixSegRoot->getAdc();
00061     double   zhit = recMdcKalHelixSegRoot->getZhit();
00062     double   tof = recMdcKalHelixSegRoot->getTof();
00063     double   docaIncl = recMdcKalHelixSegRoot->getDocaIncl();
00064     double   docaExcl = recMdcKalHelixSegRoot->getDocaExcl();
00065     double   driftDist= recMdcKalHelixSegRoot->getDD();
00066     double   entra = recMdcKalHelixSegRoot->getEntra();
00067     double   driftT = recMdcKalHelixSegRoot->getDT();
00068   //  int      layerId = recMdcKalHelixSegRoot->getLayerId();
00069   //  double   drIncl = recMdcKalHelixSegRoot->getDrIncl();
00070   //  double   phi0Incl = recMdcKalHelixSegRoot->getFi0Incl();
00071   //  double   kappaIncl = recMdcKalHelixSegRoot->getCpaIncl();
00072   //  double   dzIncl = recMdcKalHelixSegRoot->getDzIncl();
00073   //  double   tanlIncl = recMdcKalHelixSegRoot->getTanlIncl();
00074   //  double   drExcl = recMdcKalHelixSegRoot->getDrExcl();
00075   //  double   phi0Excl = recMdcKalHelixSegRoot->getFi0Excl();
00076   //  double   kappaExcl = recMdcKalHelixSegRoot->getCpaExcl();
00077   //  double   dzExcl = recMdcKalHelixSegRoot->getDzExcl();
00078   //  double   tanlExcl = recMdcKalHelixSegRoot->getTanlExcl();
00079     double helixIncl[5]; // errIncl[15]; 
00080     double helixExcl[5]; // errExcl[15];
00081     for(int i=0, k=0; i<5; i++){
00082             helixIncl[i] = recMdcKalHelixSegRoot->getHelixIncl(i);
00083             helixExcl[i] = recMdcKalHelixSegRoot->getHelixExcl(i);
00084            // for(int j=0; j<=i; j++){
00085            //         errIncl[k] = recMdcKalHelixSegRoot->getErrorIncl(i,j);
00086            //         errExcl[k] = recMdcKalHelixSegRoot->getErrorExcl(i,j);
00087            // }
00088     }
00089 
00090     RecMdcKalHelixSeg *recMdcKalHelixSeg= new RecMdcKalHelixSeg();
00091     m_common.m_rootRecMdcKalHelixSegMap[recMdcKalHelixSegRoot] = recMdcKalHelixSeg;
00092 
00093     recMdcKalHelixSeg->setTrackId( trackId );
00094     recMdcKalHelixSeg->setFlagLR( flagLR );
00095     recMdcKalHelixSeg->setMdcId( Identifier(mdcId) );
00096     recMdcKalHelixSeg->setTdc( tdc );
00097     recMdcKalHelixSeg->setAdc( adc );
00098     recMdcKalHelixSeg->setZhit( zhit );
00099     recMdcKalHelixSeg->setTof( tof );
00100     recMdcKalHelixSeg->setDocaIncl( docaIncl );
00101     recMdcKalHelixSeg->setDocaExcl( docaExcl );
00102     recMdcKalHelixSeg->setDD( driftDist );
00103     recMdcKalHelixSeg->setEntra( entra );
00104     recMdcKalHelixSeg->setDT( driftT );
00105 //    recMdcKalHelixSeg->setLayerId( layerId );
00106 //    recMdcKalHelixSeg->setDrIncl( drIncl );
00107 //    recMdcKalHelixSeg->setFi0Incl( phi0Incl );
00108 //    recMdcKalHelixSeg->setCpaIncl( kappaIncl );
00109 //    recMdcKalHelixSeg->setDzIncl( dzIncl );
00110 //    recMdcKalHelixSeg->setTanlIncl( tanlIncl );
00111 //    recMdcKalHelixSeg->setDrExcl( drIncl );
00112 //    recMdcKalHelixSeg->setFi0Excl( phi0Excl );
00113 //    recMdcKalHelixSeg->setCpaExcl( kappaExcl );
00114 //    recMdcKalHelixSeg->setDzExcl( dzExcl );
00115 //    recMdcKalHelixSeg->setTanlExcl( tanlExcl );
00116     recMdcKalHelixSeg->setHelixIncl( helixIncl );
00117     recMdcKalHelixSeg->setHelixExcl( helixExcl );
00118 //    recMdcKalHelixSeg->setErrorIncl( errIncl );
00119 //    recMdcKalHelixSeg->setErrorExcl( errExcl );
00120 
00121     recMdcKalHelixSegCol->push_back(recMdcKalHelixSeg);
00122   }
00123     return StatusCode::SUCCESS;
00124 }


Friends And Related Function Documentation

CnvFactory<RecMdcKalHelixSegCnv> [friend]
 


Member Data Documentation

CLID RootEventBaseCnv::CLID_top [protected, inherited]
 

the CLID of the upper converter if any

std::vector<void *> RootEventBaseCnv::m_adresses [protected, inherited]
 

each converter knows the corresponding adresses

std::vector<void *> RootEventBaseCnv::m_adresses [protected, inherited]
 

each converter knows the corresponding adresses

int RootEventBaseCnv::m_branchNr [protected, inherited]
 

the branchNr of this converter for writing

int RootEventBaseCnv::m_branchNrDst [protected, inherited]
 

int RootEventBaseCnv::m_branchNrEvtHeader [protected, inherited]
 

int RootEventBaseCnv::m_branchNrEvtRec [protected, inherited]
 

int RootEventBaseCnv::m_branchNrMc [protected, inherited]
 

int RootEventBaseCnv::m_branchNrRecon [protected, inherited]
 

TArrayS* RootEventBaseCnv::m_branchNumbers [protected, inherited]
 

array with number of branches for reading

TArrayS* RootEventBaseCnv::m_branchNumbers [protected, inherited]
 

array with number of branches for reading

RootCnvSvc* RootEventBaseCnv::m_cnvSvc [protected, inherited]
 

RootCnvSvc* RootEventBaseCnv::m_cnvSvc [protected, inherited]
 

commonData RecMdcKalHelixSegCnv::m_common [private]
 

relational maps

std::string RootEventBaseCnv::m_currentFileName [protected, inherited]
 

IDataProviderSvc* RootEventBaseCnv::m_eds [protected, inherited]
 

pointer to eventdataservice

IDataProviderSvc* RootEventBaseCnv::m_eds [protected, inherited]
 

pointer to eventdataservice

RootEvtSelector* RootEventBaseCnv::m_evtsel [protected, inherited]
 

RootEvtSelector* RootEventBaseCnv::m_evtsel [protected, inherited]
 

std::vector<RootCnvSvc::Leaf> RootEventBaseCnv::m_leaves [protected, inherited]
 

std::vector<RootCnvSvc::Leaf> RootEventBaseCnv::m_leaves [protected, inherited]
 

TObject* RootEventBaseCnv::m_objRead [protected, inherited]
 

the object that was read

TObject* RootEventBaseCnv::m_objRead [protected, inherited]
 

the object that was read

TObjArray* RecMdcKalHelixSegCnv::m_recMdcKalHelixSegCol [private]
 

root object to be read

TObjArray* RecMdcKalHelixSegCnv::m_recMdcKalHelixSegCol [private]
 

root object to be read

std::string RootEventBaseCnv::m_rootBranchname [protected, inherited]
 

root branchname (may be concatenated of severals)

RootInterface* RootEventBaseCnv::m_rootInterface [protected, inherited]
 

pointer to the RootInterface

RootInterface* RootEventBaseCnv::m_rootInterface [protected, inherited]
 

pointer to the RootInterface

std::string RootEventBaseCnv::m_rootTreename [protected, inherited]
 

each converter knows it's treename


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:46:23 2011 for BOSS6.5.5 by  doxygen 1.3.9.1