81 {
82 MsgStream log(
msgSvc(),
"RecCgemDedxHitCnv");
83 log << MSG::DEBUG << "RecCgemDedxHitCnv::DataObjectToTObject" << endreq;
84 StatusCode sc=StatusCode::SUCCESS;
86 if (!recCgemDedxHitCol) {
87 log << MSG::ERROR << "Could not downcast to RecCgemDedxHitCol" << endreq;
88 return StatusCode::FAILURE;
89 }
90 DataObject *evt;
92 if (evt==NULL) {
93 log << MSG::ERROR << "Could not get RecEvent in TDS " << endreq;
94 return StatusCode::FAILURE;
95 }
97 if (!devtTds) {
98 log << MSG::ERROR << "RecCgemDedxHitCnv:Could not downcast to TDS RecEvent" << endreq;
99 }
100 IOpaqueAddress *addr;
104 if (!m_recCgemDedxHitCol) return sc;
106 RecCgemDedxHitCol::const_iterator recCgemDedxHit;
107 for (recCgemDedxHit = recCgemDedxHitCol->begin(); recCgemDedxHit != recCgemDedxHitCol->end(); recCgemDedxHit++) {
108 int trackId = (*recCgemDedxHit)->getTrkId();
109
110
111 UInt_t cgemId =(*recCgemDedxHit)->getCgemId().get_value();
112 double pathlength = (*recCgemDedxHit)->getPathLength();
113 log << MSG::DEBUG<<"check Reconstrunction of dE/dx Hit root"<<" pathlength is : "<<pathlength<<endreq;
115
116 recCgemDedxHitRoot->
setTrkId(trackId);
117
118
120
122 log << MSG::DEBUG<<"check Reconstrunction of dE/dx Hit root"<<" pathlength 2 is : "<<(*recCgemDedxHit)->getPathLength()<<endreq;
124 }
125
126 return StatusCode::SUCCESS;
127}
ObjectVector< RecCgemDedxHit > RecCgemDedxHitCol
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 setCgemId(UInt_t cgemid)
void setTrkId(Int_t trkid)
void setPathLength(double pathlength)
const TObjArray * getRecCgemDedxHitCol() const
retrieve the whole TObjArray of Dedx Data
void clearRecCgemDedxHitCol()
clear the whole array
void addRecCgemDedxHit(TRecCgemDedxHit *Track)
Add a Dedx into the TOF Data collection.
_EXTERN_ std::string Event