Create the transient representation of an object, given an opaque address. This and the following update method comprise the core functionality of calibration converters. Convenience routine used by most CAL calibration types, which have a <dimension> element describing how the remainder of the Data is laid out. Read from TDS; store information internally in protected members.
Given a pointer to a TDS object which can be cast to "our" type, fill in corresponding information in the corresponding root class
65 {
66
67 MsgStream log(
msgSvc(),
"RootTofCalibDataCnv");
68 log<<MSG::DEBUG<<"SetProperty"<<endreq;
69
70
72 if(!sc)
73 { log<<MSG::ERROR<<"unable to open files"<<endreq;
74 }
75
82
83 std::vector<CalibData::bTofCalibBase> tmpbTof;
84 std::vector<CalibData::eTofCalibBase> tmpeTof;
85 std::vector<CalibData::etfCalibBase> tmpetf;
86 std::vector<CalibData::etfBunchCalibBase> tmpetfBunch;
87 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
88 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
89
90 int cnt;
91
92
108
109 TTree *btoftree = (TTree*)
m_inFile -> Get(
"BarTofPar");
110
111 char brname[10];
112 for(
unsigned int i=0; i<
nBarAtten; i++ ) {
113 sprintf( brname,
"Atten%i", i );
115 }
116 for(
unsigned int i=0; i<
nBarSpeed; i++ ) {
117 sprintf( brname,
"Speed%i", i );
119 }
120 for(
unsigned int i=0; i<
nBarPar; i++ ) {
123 }
124 for(
unsigned int i=0; i<
nBarPar; i++ ) {
127 }
129 sprintf( brname,
"Bunch0_Poff%i", i );
131 }
135 }
137 sprintf( brname,
"Bunch1_Poff%i", i );
139 }
143 }
145 sprintf( brname,
"Bunch2_Poff%i", i );
147 }
151 }
153 sprintf( brname,
"Bunch3_Poff%i", i );
155 }
159 }
160 for(
unsigned int i=0; i<
nBarSigma; i++ ) {
161 sprintf( brname,
"FLeft%i", i );
163 }
164 for(
unsigned int i=0; i<
nBarSigma; i++ ) {
165 sprintf( brname,
"FRight%i", i );
167 }
169 sprintf( brname,
"FCounter%i", i );
171 }
172
173 for(cnt=0; cnt<176; cnt++){
177 bTof.
setP1( cnvBarPar1 );
178 bTof.
setP2( cnvBarPar2 );
190 tmpbTof.push_back(bTof);
191 }
192
193
198
199 TTree *etoftree = (TTree*)
m_inFile -> Get(
"EndTofPar");
200
201 char ecname[10];
202 for(
unsigned int i=0; i<
nEndAtten; i++ ) {
203 sprintf( ecname,
"Atten%i", i );
205 }
206 for(
unsigned int i=0; i<
nEndSpeed; i++ ) {
207 sprintf( ecname,
"Speed%i", i );
209 }
210 for(
unsigned int i=0; i<
nEndPar; i++ ) {
213 }
214 for(
unsigned int i=0; i<
nEndSigma; i++ ) {
215 sprintf( ecname,
"FCounter%i", i );
217 }
218
219 for(cnt=0; cnt<96; cnt++){
223 eTof.
setP( cnvEndPar );
224 eTof.
setFP( cnvEndFPar );
225 tmpeTof.push_back(eTof);
226 }
227
228
233
234 if( NULL!=
m_inFile->Get(
"EtfTofPar") ) {
235 TTree *etftree = (TTree*)
m_inFile -> Get(
"EtfTofPar");
236
237 char etfname[10];
238 for(
unsigned int i=0; i<
nEtfSpeed; i++ ) {
239 sprintf( etfname,
"Speed%i", i );
241 }
242 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
245 }
246 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
249 }
250 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
253 }
254
255 for(cnt=0; cnt<(72*12); cnt++){
258 etf.
setP( cnvEtfPar );
259 etf.
setP1( cnvEtfPar1 );
260 etf.
setP2( cnvEtfPar2 );
261 tmpetf.push_back(etf);
262 }
263 }
264
265
267
268 if( NULL!=
m_inFile->Get(
"EtfTofBunch") ) {
269 TTree *etfbunchtree = (TTree*)
m_inFile -> Get(
"EtfTofBunch");
270
271 char etfbunchname[10];
272 for(
unsigned int i=0; i<
nEtfBunch; i++ ) {
273 sprintf( etfbunchname,
"pbunch%i", i );
275 }
276
277 int entries= etfbunchtree->GetEntries();
278 for(cnt=0;cnt<entries;cnt++){
281 tmpetfBunch.push_back( etfBunch );
282 }
283 }
284
285
288 TTree *btofcommontree = (TTree*)
m_inFile -> Get(
"BarTofParCommon");
290 sprintf( brname,
"sigmaCorr%i", i );
292 }
294 sprintf( brname,
"t0offset%i", i );
296 }
297
298 int entries = btofcommontree->GetEntries();
299 for(cnt=0;cnt<entries;cnt++){
300 btofcommontree->GetEntry(cnt);
303 tmpbTofCommon.push_back(bTofCommon);
304 }
305
306 int m_run1, m_run2, m_version;
307 int m_qCorr, m_qElec, m_misLable;
308 int m_tofidEast[5], m_tofidWest[5], m_tofidEndcap[5];
309
310 TTree *CalibInfo = (TTree*)
m_inFile -> Get(
"CalibInfo");
311 CalibInfo->SetBranchAddress("Run1", &m_run1 );
312 CalibInfo->SetBranchAddress("Run2", &m_run2 );
313 CalibInfo->SetBranchAddress("Version", &m_version );
314 CalibInfo->SetBranchAddress("ebrId0", &m_tofidEast[0] );
315 CalibInfo->SetBranchAddress("ebrId1", &m_tofidEast[1] );
316 CalibInfo->SetBranchAddress("ebrId2", &m_tofidEast[2] );
317 CalibInfo->SetBranchAddress("ebrId3", &m_tofidEast[3] );
318 CalibInfo->SetBranchAddress("ebrId4", &m_tofidEast[4] );
319 CalibInfo->SetBranchAddress("ecId0", &m_tofidEndcap[0] );
320 CalibInfo->SetBranchAddress("ecId1", &m_tofidEndcap[1] );
321 CalibInfo->SetBranchAddress("ecId2", &m_tofidEndcap[2] );
322 CalibInfo->SetBranchAddress("ecId3", &m_tofidEndcap[3] );
323 CalibInfo->SetBranchAddress("ecId4", &m_tofidEndcap[4] );
324 CalibInfo->SetBranchAddress("wbrId0", &m_tofidWest[0] );
325 CalibInfo->SetBranchAddress("wbrId1", &m_tofidWest[1] );
326 CalibInfo->SetBranchAddress("wbrId2", &m_tofidWest[2] );
327 CalibInfo->SetBranchAddress("wbrId3", &m_tofidWest[3] );
328 CalibInfo->SetBranchAddress("wbrId4", &m_tofidWest[4] );
329 CalibInfo->SetBranchAddress("misLable",&m_misLable );
330 CalibInfo->SetBranchAddress("qCorr", &m_qCorr );
331 CalibInfo->SetBranchAddress("qElec", &m_qElec );
332
333 entries= CalibInfo->GetEntries();
334 for(cnt=0;cnt<entries;cnt++){
335 CalibInfo->GetEntry(cnt);
345 tofinfoCol.push_back(tofinfo);
346 }
347
349
350 refpObject=tmpObject;
351
352 return StatusCode::SUCCESS;
353}
data SetBranchAddress("time",&time)
const unsigned int nBarOffset
const unsigned int nBarSigCor
void setP2(const double *TofP2)
void setPoff1_bunch3(const double *TofPoff1_bunch3)
void setFPleft(const double *FP1)
void setPoff2_bunch1(const double *TofPoff2_bunch1)
void setSpeed(const double *Speed)
void setAtten(const double *Atten)
void setPoff1_bunch0(const double *TofPoff1_bunch0)
void setPoff2_bunch2(const double *TofPoff2_bunch2)
void setPoff1_bunch1(const double *TofPoff1_bunch1)
void setFPcounter(const double *FP3)
void setPoff1_bunch2(const double *TofPoff1_bunch2)
void setPoff2_bunch3(const double *TofPoff2_bunch3)
void setFPright(const double *FP2)
void setPoff2_bunch0(const double *TofPoff2_bunch0)
void setP1(const double *TofP1)
void setSigmaCorr(const double *sigmaCorr)
void setOffset(const double *offset)
void setAtten(const double *Atten)
void setP(const double *TofP)
void setFP(const double *FP)
void setSpeed(const double *Speed)
void setPBunch(const double *etfBunchP)
void setSpeed(const double *Speed)
void setP(const double *etfP)
void setP1(const double *etfP1)
void setP2(const double *etfP2)
void setBrWest(const int *tofidWest)
void setRunEnd(const int run2)
void setVersion(const int version)
void setMisLable(const int misLable)
void setRunBegin(const int run1)
void setBrEast(const int *tofidEast)
void setQElec(const int qElec)
void setQCorr(const int qCorr)
void setEndcap(const int *tofidEndcap)
StatusCode openRead(const std::string &fname)