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
53 {
54
55 MsgStream log(
msgSvc(),
"RootEstTofCalibDataCnv");
56 log<<MSG::DEBUG<<"SetProperty"<<endreq;
57
58
60 if(!sc)
61 { log<<MSG::ERROR<<"unable to open files"<<endreq;
62 }
63
68
69 std::vector<CalibData::bTofCalibBase> tmpbTof;
70 std::vector<CalibData::eTofCalibBase> tmpeTof;
71 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
72 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
73
74
75 int cnt;
76
87
88 TTree *btoftree = (TTree*)
m_inFile -> Get(
"BarTofPar");
89
90 char brname[10];
91 for(
unsigned int i=0; i<
nBarPar; i++ ) {
92 sprintf( brname, "P%i", i );
94 }
95 for(
unsigned int i=0; i<
nBarPar; i++ ) {
96 sprintf( brname,
"P%i", i+
nBarPar );
98 }
100 sprintf( brname, "Bunch0_Poff%i", i );
102 }
104 sprintf( brname,
"Bunch0_Poff%i", i+
nBarParOff );
106 }
108 sprintf( brname, "Bunch1_Poff%i", i );
110 }
112 sprintf( brname,
"Bunch1_Poff%i", i+
nBarParOff );
114 }
116 sprintf( brname, "Bunch2_Poff%i", i );
118 }
120 sprintf( brname,
"Bunch2_Poff%i", i+
nBarParOff );
122 }
124 sprintf( brname, "Bunch3_Poff%i", i );
126 }
128 sprintf( brname,
"Bunch3_Poff%i", i+
nBarParOff );
130 }
131
132 for(cnt=0; cnt<176; cnt++){
134 bTof.
setP1( cnvBarPar1 );
135 bTof.
setP2( cnvBarPar2 );
144 tmpbTof.push_back( bTof );
145 }
146
147
149
150 TTree *etoftree = (TTree*)
m_inFile -> Get(
"EndTofPar");
151
152 char ecname[10];
153 for(
unsigned int i=0; i<
nEndPar; i++ ) {
154 sprintf( ecname, "P%i", i );
156 }
157
158 for(cnt=0; cnt<96; cnt++){
159 etoftree->GetEntry(cnt);
160 eTof.
setP( cnvEndPar );
161 tmpeTof.push_back(eTof);
162 }
163
164
166 TTree *btofcommontree = (TTree*)
m_inFile -> Get(
"BarTofParCommon");
168 sprintf( brname, "t0offset%i", i );
170 }
171
172 int entries = btofcommontree->GetEntries();
173 for(cnt=0;cnt<entries;cnt++){
174 btofcommontree->GetEntry(cnt);
176 tmpbTofCommon.push_back(bTofCommon);
177 }
178
180
181 refpObject=tmpObject;
182
183 return StatusCode::SUCCESS;
184}
data SetBranchAddress("time",&time)
const unsigned int nBarOffset
const unsigned int nBarParOff
void setP2(const double *TofP2)
void setPoff1_bunch3(const double *TofPoff1_bunch3)
void setPoff2_bunch1(const double *TofPoff2_bunch1)
void setPoff1_bunch0(const double *TofPoff1_bunch0)
void setPoff2_bunch2(const double *TofPoff2_bunch2)
void setPoff1_bunch1(const double *TofPoff1_bunch1)
void setPoff1_bunch2(const double *TofPoff1_bunch2)
void setPoff2_bunch3(const double *TofPoff2_bunch3)
void setPoff2_bunch0(const double *TofPoff2_bunch0)
void setP1(const double *TofP1)
void setOffset(const double *offset)
void setP(const double *TofP)
StatusCode openRead(const std::string &fname)