100 {
101
102 MsgStream log(
msgSvc(),
"RecMdcHitCnv");
103 log << MSG::DEBUG << "RecMdcHitCnv::DataObjectToTObject" << endreq;
104
106 if (!mdcHitColTds) {
107 log << MSG::ERROR << "Could not downcast to RecMdcHitCol" << endreq;
108 return StatusCode::FAILURE;
109 }
110
111 DataObject *evt;
113 if (evt==NULL) {
114 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
115 return StatusCode::FAILURE;
116 }
117
119 if (!devtTds) {
120 log << MSG::ERROR << "RecMdcHitCnv:Could not downcast to TDS ReconEvent" << endreq;
121 }
122
123 IOpaqueAddress *addr;
124
127
129 if (!m_recMdcHitCol) return StatusCode::SUCCESS;
131
132 RecMdcHitCol::const_iterator recMdcHit;
133 for (recMdcHit = mdcHitColTds->begin(); recMdcHit != mdcHitColTds->end(); recMdcHit++) {
134 Bool_t isGrouped =(*recMdcHit)->isGrouped();
135 Int_t id =(*recMdcHit)->getId();
136 Int_t trackId =(*recMdcHit)->getTrkId();
137 Double_t driftDistLeft =(*recMdcHit)->getDriftDistLeft();
138 Double_t driftDistRight =(*recMdcHit)->getDriftDistRight();
139 Double_t errDriftDistLeft =(*recMdcHit)->getErrDriftDistLeft();
140 Double_t errDriftDistRight =(*recMdcHit)->getErrDriftDistRight();
141 Double_t chisqAdd =(*recMdcHit)->getChisqAdd();
142 Int_t flagLR =(*recMdcHit)->getFlagLR();
143 Int_t stat =(*recMdcHit)->getStat();
144 UInt_t mdcId =(*recMdcHit)->getMdcId().get_value();
145 Double_t tdc =(*recMdcHit)->getTdc();
146 Double_t adc =(*recMdcHit)->getAdc();
147 Double_t driftT =(*recMdcHit)->getDriftT();
148 Double_t doca =(*recMdcHit)->getDoca();
149 Double_t entra =(*recMdcHit)->getEntra();
150 Double_t zhit =(*recMdcHit)->getZhit();
151 Double_t fltLen =(*recMdcHit)->getFltLen();
152
154
155
157 recMdcHitRoot->
setId(
id );
165 <<endreq;
168 recMdcHitRoot->
setStat( stat );
170 recMdcHitRoot->
setTdc( tdc );
171 recMdcHitRoot->
setAdc( adc );
173 recMdcHitRoot->
setDoca( doca );
175 recMdcHitRoot->
setZhit( zhit );
177
179 }
180 return StatusCode::SUCCESS;
181}
ObjectVector< RecMdcHit > RecMdcHitCol
static TRecTrackEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
RecTrackCnv * getRecTrackCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setFltLen(Double_t fltLen)
void setIsGrouped(Bool_t isGrouped)
const Double_t getDriftDistLeft(void) const
void setErrDriftDistLeft(Double_t erddl)
void setDriftDistLeft(Double_t ddl)
void setDriftDistRight(Double_t ddr)
const Double_t getErrDriftDistLeft(void) const
void setTdc(Double_t tdc)
void setAdc(Double_t adc)
void setTrkId(Int_t trkid)
void setDriftT(Double_t driftT)
void setErrDriftDistRight(Double_t erddr)
void setZhit(Double_t zhit)
void setDoca(Double_t doca)
void setEntra(Double_t entra)
void setChisqAdd(Double_t pChisq)
void setMdcId(UInt_t mdcid)
void addRecMdcHit(TRecMdcHit *Hit)
Add a Rec Mdc Hit into the Mdc data collection.
void clearRecMdcHitCol()
clear the whole array (necessary because of the consts-s)
const TObjArray * getRecMdcHitCol() const
retrieve the whole TObjArray of RecMdcHit Data
_EXTERN_ std::string Event