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
52 {
53
54 MsgStream log(
msgSvc(),
"RootEstTofCalibDataCnv");
55 log<<MSG::DEBUG<<"SetProperty"<<endreq;
56
57
59 if(!sc)
60 { log<<MSG::ERROR<<"unable to open files"<<endreq;
61 }
62
68
69 std::vector<CalibData::bTofCalibBase> tmpbTof;
70 std::vector<CalibData::eTofCalibBase> tmpeTof;
71 std::vector<CalibData::etfCalibBase> tmpetf;
72 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
73 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
74
75
76 int cnt;
77
88
89 TTree *btoftree = (TTree*)
m_inFile -> Get(
"BarTofPar");
90
91 char brname[10];
92 for(
unsigned int i=0; i<
nBarPar; i++ ) {
93 sprintf( brname, "P%i", i );
95 }
96 for(
unsigned int i=0; i<
nBarPar; i++ ) {
97 sprintf( brname,
"P%i", i+
nBarPar );
99 }
101 sprintf( brname, "Bunch0_Poff%i", i );
103 }
105 sprintf( brname,
"Bunch0_Poff%i", i+
nBarParOff );
107 }
109 sprintf( brname, "Bunch1_Poff%i", i );
111 }
113 sprintf( brname,
"Bunch1_Poff%i", i+
nBarParOff );
115 }
117 sprintf( brname, "Bunch2_Poff%i", i );
119 }
121 sprintf( brname,
"Bunch2_Poff%i", i+
nBarParOff );
123 }
125 sprintf( brname, "Bunch3_Poff%i", i );
127 }
129 sprintf( brname,
"Bunch3_Poff%i", i+
nBarParOff );
131 }
132
133 for(cnt=0; cnt<176; cnt++){
135 bTof.
setP1( cnvBarPar1 );
136 bTof.
setP2( cnvBarPar2 );
145 tmpbTof.push_back( bTof );
146 }
147
148
150
151 TTree *etoftree = (TTree*)
m_inFile -> Get(
"EndTofPar");
152
153 char ecname[10];
154 for(
unsigned int i=0; i<
nEndPar; i++ ) {
155 sprintf( ecname, "P%i", i );
157 }
158
159 for(cnt=0; cnt<96; cnt++){
160 etoftree->GetEntry(cnt);
161 eTof.
setP( cnvEndPar );
162 tmpeTof.push_back(eTof);
163 }
164
165
169
170 if( NULL!=
m_inFile->Get(
"EtfTofPar") ) {
171 TTree *etftree = (TTree*)
m_inFile -> Get(
"EtfTofPar");
172
173 char etfname[10];
174 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
175 sprintf( etfname, "P%i", i );
177 }
178 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
179 sprintf( etfname,
"P%i", i+
nEtfPar );
181 }
182 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
183 sprintf( etfname,
"P%i", i+2*
nEtfPar );
185 }
186
187 for(cnt=0; cnt<(72*12); cnt++){
189 etf.
setP( cnvEtfPar );
190 etf.
setP1( cnvEtfPar1 );
191 etf.
setP2( cnvEtfPar2 );
192 tmpetf.push_back(etf);
193 }
194 }
195
196
198 TTree *btofcommontree = (TTree*)
m_inFile -> Get(
"BarTofParCommon");
200 sprintf( brname, "t0offset%i", i );
202 }
203
204 int entries = btofcommontree->GetEntries();
205 for(cnt=0;cnt<entries;cnt++){
206 btofcommontree->GetEntry(cnt);
208 tmpbTofCommon.push_back(bTofCommon);
209 }
210
212
213 refpObject=tmpObject;
214
215 return StatusCode::SUCCESS;
216}
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)
void setP(const double *etfP)
void setP1(const double *etfP1)
void setP2(const double *etfP2)
StatusCode openRead(const std::string &fname)