90 {
91 MsgStream log(
msgSvc(),
"EvtRecEtaToGGCnv");
92 log << MSG::DEBUG << "EvtRecEtaToGGCnv::DataObjectToTObject" << endreq;
93
95 if ( ! evtRecEtaToGGCol ) {
96 log << MSG::ERROR << "Could not downcast to EvtRecEtaToGGCol" << endreq;
97 return StatusCode::FAILURE;
98 }
99
100 DataObject* evt;
102 if ( evt == NULL ) {
103 log << MSG::ERROR << "Could not get EvtRecObject in TDS" << endreq;
104 return StatusCode::FAILURE;
105 }
107 if ( ! devtTds ) {
108 log << MSG::ERROR << "EvtRecEtaToGGCnv: Could not downcast to TDS EvtRecObject" << endreq;
109 }
110
111 IOpaqueAddress *addr;
114
116 if ( ! m_evtRecEtaToGGCol ) return StatusCode::SUCCESS;
117
118 IDataProviderSvc* dataSvc = 0;
119 StatusCode sc = serviceLocator()->getService("EventDataSvc",
120 IDataProviderSvc::interfaceID(), (IInterface*&)dataSvc);
121 if ( sc.isFailure() ) {
122 log << MSG::FATAL << "Could not get EventDataSvc in EvtRecEtaToGGCnv" << endreq;
123 return sc;
124 }
125
126 EvtRecTrackCol::iterator evtRecTrackColbegin, evtRecTrackColend;
127
129 if ( ! evtRecTrackCol) {
130 log << MSG::INFO << "Could not find EvtRecTrackCol" << endreq;
131 }
132 else {
133 evtRecTrackColbegin = evtRecTrackCol->begin();
134 evtRecTrackColend = evtRecTrackCol->end();
135 }
136
137
139 EvtRecEtaToGGCol::const_iterator evtRecEtaToGG = evtRecEtaToGGCol->begin();
140
141 for ( ; evtRecEtaToGG != evtRecEtaToGGCol->end(); evtRecEtaToGG++) {
144
145
148
149
150 HepLorentzVector hiP4=ptr->
hiPfit();
151 HepLorentzVector loP4=ptr->
loPfit();
156
161
162
163
164 EvtRecTrackCol::iterator it = find(evtRecTrackColbegin,
166
167 evtRecEtaToGGRoot->
setHiEnGamma(it - evtRecTrackColbegin );
168
169
170 it = find(evtRecTrackColbegin,
172
173 evtRecEtaToGGRoot->
setLoEnGamma(it - evtRecTrackColbegin );
174
175
176
178 }
179
180 return StatusCode::SUCCESS;
181}
ObjectVector< EvtRecEtaToGG > EvtRecEtaToGGCol
static TEvtRecObject * getWriteObject()
const EvtRecTrack * hiEnGamma() const
HepLorentzVector hiPfit() const
HepLorentzVector loPfit() const
const EvtRecTrack * loEnGamma() const
EvtRecCnv * getEvtRecCnv()
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void setHiPyfit(Double_t hiPy)
void setHiPxfit(Double_t hiPx)
void setHiPzfit(Double_t hiPz)
void setHiPefit(Double_t hiPe)
void setLoPxfit(Double_t loPx)
void setLoPyfit(Double_t loPy)
void setLoPefit(Double_t loPe)
void setLoEnGamma(Int_t loEnGamma)
void setUnconMass(Double_t unconMass)
void setLoPzfit(Double_t loPz)
void setChisq(Double_t chisq)
void setHiEnGamma(Int_t hiEnGamma)
const TObjArray * getEvtRecEtaToGGCol() const
void clearEvtRecEtaToGGCol()
void addEvtRecEtaToGG(TEvtRecEtaToGG *eta)
_EXTERN_ std::string Event
_EXTERN_ std::string EvtRecTrackCol