91 {
92
93 MsgStream log(
msgSvc(),
"RecCgemHitCnv");
94 log << MSG::DEBUG << "RecCgemHitCnv::DataObjectToTObject" << endreq;
95
97 if (!cgemHitColTds) {
98 log << MSG::ERROR << "Could not downcast to RecCgemHitCol" << endreq;
99 return StatusCode::FAILURE;
100 }
101
102 DataObject *evt;
104 if (evt==NULL) {
105 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
106 return StatusCode::FAILURE;
107 }
108
110 if (!devtTds) {
111 log << MSG::ERROR << "RecCgemHitCnv:Could not downcast to TDS ReconEvent" << endreq;
112 }
113
114 IOpaqueAddress *addr;
115
118
120 if (!m_recCgemHitCol) return StatusCode::SUCCESS;
122
123 RecCgemHitCol::const_iterator recCgemHit;
124 for (recCgemHit = cgemHitColTds->begin(); recCgemHit != cgemHitColTds->end(); recCgemHit++) {
125 Bool_t isGrouped =(*recCgemHit)->isGrouped();
126 Int_t id =(*recCgemHit)->getId();
127 Int_t trackId =(*recCgemHit)->getTrkId();
128 Double_t chisqAdd =(*recCgemHit)->getChisqAdd();
129 Int_t stat =(*recCgemHit)->getStat();
130
131
132 UInt_t cgemId =(*recCgemHit)->getCgemId().get_value();
133 Double_t tdc =(*recCgemHit)->getTdc();
134 Double_t adc =(*recCgemHit)->getAdc();
135 Double_t doca =(*recCgemHit)->getDoca();
136 Double_t entra =(*recCgemHit)->getEntra();
137 Double_t zhit =(*recCgemHit)->getZhit();
138 Double_t fltLen =(*recCgemHit)->getFltLen();
139
141
142
144 recCgemHitRoot->
setId(
id );
145 recCgemHitRoot->
setTrkId( trackId );
147 recCgemHitRoot->
setStat( stat );
148
149
151 recCgemHitRoot->
setTdc( tdc );
152 recCgemHitRoot->
setAdc( adc );
153 recCgemHitRoot->
setDoca( doca );
155 recCgemHitRoot->
setZhit( zhit );
157
159 }
160 return StatusCode::SUCCESS;
161}
ObjectVector< RecCgemHit > RecCgemHitCol
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 setChisqAdd(Double_t pChisq)
void setZhit(Double_t zhit)
void setTdc(Double_t tdc)
void setCgemId(UInt_t cgemid)
void setFltLen(Double_t fltLen)
void setEntra(Double_t entra)
void setDoca(Double_t doca)
void setIsGrouped(Bool_t isGrouped)
void setTrkId(Int_t trkid)
void setAdc(Double_t adc)
const TObjArray * getRecCgemHitCol() const
retrieve the whole TObjArray of RecCgemHit Data
void addRecCgemHit(TRecCgemHit *Hit)
Add a Rec Cgem Hit into the Cgem data collection.
void clearRecCgemHitCol()
clear the whole array (necessary because of the consts-s)
_EXTERN_ std::string Event