106 {
107
108 MsgStream log(
msgSvc(),
"CgemDigiCnv");
109
110 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject()" << endreq;
111
112 log << MSG::DEBUG << "CgemDigiCnv::DataObjectToTObject" << endreq;
113 StatusCode sc=StatusCode::SUCCESS;
114
116 if (!cgemDigiColTds) {
117 log << MSG::ERROR << "Could not downcast to CgemDigiCol" << endreq;
118
119 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject()-finished" << endreq;
120
121 return StatusCode::FAILURE;
122 }
123
124 DataObject *evt;
126 if (evt==NULL) {
127 log << MSG::ERROR << "Could not get DigiEvent in TDS " << endreq;
128
129 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject()-finished" << endreq;
130
131 return StatusCode::FAILURE;
132 }
134 if (!devtTds) {
135
136 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject()-finished" << endreq;
137
138 log << MSG::ERROR << "CgemDigiCnv:Could not downcast to TDS DigiEvent" << endreq;
139 }
140
141 IOpaqueAddress *addr;
142
143
145
146
147
149
151 if (!m_cgemDigiCol) return sc;
153 CgemDigiCol::const_iterator cgemDigiTds;
154
155 for (cgemDigiTds=cgemDigiColTds->begin(); cgemDigiTds!=cgemDigiColTds->end(); cgemDigiTds++)
156 {
157 UInt_t overflow = (*cgemDigiTds)->getOverflow();
158 UInt_t
time = (*cgemDigiTds)->getTimeChannel();
159 UInt_t charge = (*cgemDigiTds)->getChargeChannel();
160 UInt_t id = (*cgemDigiTds)->getIntId();
161 Int_t trackIndex = (*cgemDigiTds)->getTrackIndex();
162 Double_t time_ns = (*cgemDigiTds)->getTime_ns();
163 Double_t charge_fC= (*cgemDigiTds)->getCharge_fc();
164
165
167
168
169 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject: "
170 << "id=" << id
172 << ",charge=" << charge
173 << ",overflow=" << overflow << endreq;
174
181 }
182
183
184 log << MSG::INFO << "My Message::CgemDigiCnv::DataObjectToTObject()-finished" << endreq;
185
186 return StatusCode::SUCCESS;
187}
ObjectVector< CgemDigi > CgemDigiCol
static TDigiEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setTime_ns(Double_t t)
void setCharge_fc(Double_t q)
void setOverflow(const UInt_t overflow)
void clearCgemDigiCol()
clear the whole array (necessary because of the consts-s)
const TObjArray * getCgemDigiCol() const
retrieve the whole TObjArray of TkrDigi Data
void addCgemDigi(TCgemDigi *digi)
Add a TkrDigi into the TKR data collection.
void initialize(UInt_t id, UInt_t time=0, UInt_t charge=0)
void setTrackIndex(const int trackIndex)
_EXTERN_ std::string Event