84{
85 MsgStream log(
msgSvc(),
"RecCgemSegmentCnv");
86 log << MSG::DEBUG << "RecCgemSegmentCnv::DataObjectToTObject" << endreq;
87
89 if (!cgemSegmentColTds) {
90 log << MSG::ERROR << "Could not downcast to RecCgemSegmentCol" << endreq;
91 return StatusCode::FAILURE;
92 }
93
94 DataObject *evt;
96 if (evt==NULL) {
97 log << MSG::ERROR << "Could not get ReconEvent in TDS " << endreq;
98 return StatusCode::FAILURE;
99 }
100
102 if (!devtTds) {
103 log << MSG::ERROR << "RecCgemHitCnv:Could not downcast to TDS ReconEvent" << endreq;
104 }
105
106 IOpaqueAddress *addr;
107
110
111
112
114 if (!m_recCgemSegmentCol) return StatusCode::SUCCESS;
116
117 RecCgemSegmentCol::const_iterator recCgemSegment;
118 for (recCgemSegment = cgemSegmentColTds->begin(); recCgemSegment != cgemSegmentColTds->end(); recCgemSegment++)
119 {
120 Int_t eventid = (*recCgemSegment)->geteventid();
121 Int_t match = (*recCgemSegment)->getmatch();
122 Int_t segmentid = (*recCgemSegment)->getsegmentid();
123 Int_t clusterid_1 = (*recCgemSegment)->getclusterid_1();
124 Int_t clusterid_2 = (*recCgemSegment)->getclusterid_2();
125 Int_t clusterid_3 = (*recCgemSegment)->getclusterid_3();
126 Double_t helix[5];
127 Double_t helix_err[15];
128 for(int i = 0; i < 5; i++){
129 helix[i] = (*recCgemSegment)->gethelix(i);
130 }
131 for(int i = 0; i < 15; i++){
132 helix_err[i] = (*recCgemSegment)->gethelix_err(i);
133 }
134
136
138 recCgemSegmentRoot->
setmatch(match);
143 recCgemSegmentRoot->
sethelix( helix );
145
147 }
148 return StatusCode::SUCCESS;
149}
ObjectVector< RecCgemSegment > RecCgemSegmentCol
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 setsegmentid(Int_t segmentid)
void sethelix_err(Double_t helix_err[15])
void seteventid(Int_t eventid)
void setmatch(Int_t match)
void sethelix(Double_t helix[5])
void setclusterid_1(Int_t clusterid_1)
void setclusterid_2(Int_t clusterid_2)
void setclusterid_3(Int_t clusterid_3)
void addRecCgemSegment(TRecCgemSegment *Segment)
Add a TkrSegment into the Cgem data collection.
const TObjArray * getRecCgemSegmentCol() const
retrieve the whole TObjArray of RecCgemSegment Data
void clearRecCgemSegmentCol()
clear the whole array (necessary because of the consts-s)
_EXTERN_ std::string Event