90 {
91 MsgStream log(
msgSvc(),
"EvtRecPi0Cnv");
92 log << MSG::DEBUG << "EvtRecPi0Cnv::DataObjectToTObject" << endreq;
93
95 if ( ! evtRecPi0Col ) {
96 log << MSG::ERROR << "Could not downcast to EvtRecPi0Col" << endreq;
97 return StatusCode::FAILURE;
98 }
99
100 DataObject* evt;
103 log << MSG::ERROR << "Could not get EvtRecObject in TDS" << endreq;
104 return StatusCode::FAILURE;
105 }
107 if ( ! devtTds ) {
108 log << MSG::ERROR << "EvtRecPi0Cnv: Could not downcast to TDS EvtRecObject" << endreq;
109 }
110
111 IOpaqueAddress *addr;
114
116 if ( ! m_evtRecPi0Col ) 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 EvtRecPi0Cnv" << 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 EvtRecPi0Col::const_iterator evtRecPi0 = evtRecPi0Col->begin();
140
141 for ( ; evtRecPi0 != evtRecPi0Col->end(); evtRecPi0++) {
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
168
169
170 it = find(evtRecTrackColbegin,
172
174
175
176
178 }
179
180 return StatusCode::SUCCESS;
181}
ObjectVector< EvtRecPi0 > EvtRecPi0Col
static TEvtRecObject * getWriteObject()
const EvtRecTrack * loEnGamma() const
HepLorentzVector hiPfit() const
HepLorentzVector loPfit() const
const EvtRecTrack * hiEnGamma() 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 addEvtRecPi0(TEvtRecPi0 *pi0)
const TObjArray * getEvtRecPi0Col() const
void setLoPxfit(Double_t loPx)
void setLoPyfit(Double_t loPy)
void setUnconMass(Double_t unconMass)
void setLoEnGamma(Int_t loEnGamma)
void setLoPzfit(Double_t loPz)
void setHiPyfit(Double_t hiPy)
void setLoPefit(Double_t loPe)
void setHiPxfit(Double_t hiPx)
void setHiPzfit(Double_t hiPz)
void setChisq(Double_t chisq)
void setHiEnGamma(Int_t hiEnGamma)
void setHiPefit(Double_t hiPe)
_EXTERN_ std::string Event
_EXTERN_ std::string EvtRecTrackCol