94 {
95
96 MsgStream log(
msgSvc(),
"CgemSegmentCnv");
97
98 log << MSG::INFO << "My Message::CgemSegmentCnv::DataObjectToTObject("<<rootaddr->getTreename()<<")"<<endreq;
99
100 log << MSG::DEBUG << "CgemSegmentCnv::DataObjectToTObject" << endreq;
101 StatusCode sc=StatusCode::SUCCESS;
102
104 if (!cgemSegmentColTds) {
105 log << MSG::ERROR << "Could not downcast to CgemSegmentCol" << endreq;
106
107 log << MSG::INFO << "My Message::CgemSegmentCnv::DataObjectToTObject("<<rootaddr->getTreename()<<")-finished"<<endreq;
108
109 return StatusCode::FAILURE;
110 }
111
112 DataObject *evt;
114 if (evt==NULL) {
115 log << MSG::ERROR << "Could not get DstEvent in TDS " << endreq;
116
117 log << MSG::INFO << "My Message::CgemSegmentCnv::DataObjectToTObject("<<rootaddr->getTreename()<<")-finished"<<endreq;
118
119 return StatusCode::FAILURE;
120 }
122 if (!devtTds) {
123 log << MSG::ERROR << "CgemSegmentCnv:Could not downcast to TDS DstEvent" << endreq;
124 }
125 IOpaqueAddress *addr;
126
127
128 log << MSG::INFO <<
"My Message::CgemSegmentCnv::DataObjectToTObject("<<rootaddr->
getTreename()<<
")::DstCnv"<<endreq;
129
132
134 if (!m_cgemSegmentCol) return sc;
136 DstCgemSegmentCol::const_iterator cgemSegmentTds;
137
138 for (cgemSegmentTds = cgemSegmentColTds->begin(); cgemSegmentTds != cgemSegmentColTds->end(); cgemSegmentTds++) {
139 Int_t segmentId = (*cgemSegmentTds)->getsegmentid();
140 Int_t eventId = (*cgemSegmentTds)->geteventid();
141 Int_t match = (*cgemSegmentTds)->getmatch();
142 Int_t clusterId_1 = (*cgemSegmentTds)->getclusterid_1();
143 Int_t clusterId_2 = (*cgemSegmentTds)->getclusterid_2();
144 Int_t clusterId_3 = (*cgemSegmentTds)->getclusterid_3();
145 Double_t helix[5];
146 Double_t helix_err[15];
147 for(int i = 0; i < 5; i++){
148 helix[i] = (*cgemSegmentTds)->gethelix(i);
149 }
150 for(int i = 0; i < 15; i++){
151 helix_err[i] = (*cgemSegmentTds)->gethelix_err(i);
152 }
153
155
164
166 }
167
168
169 log << MSG::INFO << "My Message::CgemSegmentCnv::DataObjectToTObject("<<rootaddr->getTreename()<<")-finished"<<endreq;
170
171 return StatusCode::SUCCESS;
172}
ObjectVector< DstCgemSegment > DstCgemSegmentCol
static TDstEvent * getWriteObject()
returns object to be written (maintained here for all DIGI-converters)
std::string getTreename() const
IDataProviderSvc * m_eds
pointer to eventdataservice
virtual StatusCode createRep(DataObject *pObject, IOpaqueAddress *&refpAddress)
Convert the transient object to the requested representation.
void sethelix(Double_t helix[5])
void setclusterid_3(Int_t clusterid_3)
void setmatch(Int_t match)
void setsegmentid(Int_t segmentid)
void setclusterid_1(Int_t clusterid_1)
void setclusterid_2(Int_t clusterid_2)
void seteventid(Int_t eventid)
void sethelix_err(Double_t helix_err[15])
const TObjArray * getCgemSegmentCol() const
retrieve the whole TObjArray of CgemSegment Data
void clearCgemSegmentCol()
clear the whole array (necessary because of the consts-s)
void addCgemSegment(TCgemSegment *Segment)
Add a segment into the Cgem data collection.
_EXTERN_ std::string Event