49 {
50
51 MsgStream log(
msgSvc(),
"TreeEstTofCalibDataCnv");
52 log<<MSG::DEBUG<<"SetProperty"<<endreq;
53
56
57 TBufferFile *buf1 = new TBufferFile(TBuffer::kRead);
58 TBufferFile *buf2 = new TBufferFile(TBuffer::kRead);
59 TBufferFile *buf3 = new TBufferFile(TBuffer::kRead);
60 TBufferFile *buf4 = new TBufferFile(TBuffer::kRead);
61
62 buf1->SetBuffer((*records)["BarTofPar"],512000,kFALSE);
63 buf2->SetBuffer((*records)["EndTofPar"],512000,kFALSE);
64 buf3->SetBuffer((*records)["TofConPar"],512000,kFALSE);
65 buf4->SetBuffer((*records)["BarTof"],512000,kFALSE);
66
67 std::cout<<" CalVerSft is "<<(*records)["CalParVer"];
68 std::cout<<" File name is "<<(*records)["FileName"]<<std::endl;
69
70 TTree *btoftree= new TTree();
71 TTree *etoftree= new TTree();
72 TTree *btofcommontree = new TTree();
73 TTree *CalibInfo = new TTree();
74
75 btoftree->Streamer(*buf1);
76 etoftree->Streamer(*buf2);
77 btofcommontree->Streamer(*buf3);
78 CalibInfo->Streamer(*buf4);
79
84
85 std::vector<CalibData::bTofCalibBase> tmpbTof;
86 std::vector<CalibData::eTofCalibBase> tmpeTof;
87 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
88 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
89
90
91 int cnt;
92
103
104 char brname[10];
105 for(
unsigned int i=0; i<
nBarPar; i++ ) {
106 sprintf( brname, "P%i", i );
108 }
109 for(
unsigned int i=0; i<
nBarPar; i++ ) {
110 sprintf( brname,
"P%i", i+
nBarPar );
112 }
114 sprintf( brname, "Bunch0_Poff%i", i );
116 }
118 sprintf( brname,
"Bunch0_Poff%i", i+
nBarParOff );
120 }
122 sprintf( brname, "Bunch1_Poff%i", i );
124 }
126 sprintf( brname,
"Bunch1_Poff%i", i+
nBarParOff );
128 }
130 sprintf( brname, "Bunch2_Poff%i", i );
132 }
134 sprintf( brname,
"Bunch2_Poff%i", i+
nBarParOff );
136 }
138 sprintf( brname, "Bunch3_Poff%i", i );
140 }
142 sprintf( brname,
"Bunch3_Poff%i", i+
nBarParOff );
144 }
145
146 for(cnt=0; cnt<176; cnt++){
148 bTof.
setP1( cnvBarPar1 );
149 bTof.
setP2( cnvBarPar2 );
158 tmpbTof.push_back(bTof);
159 }
160
161
163
164 char ecname[10];
165 for(
unsigned int i=0; i<
nEndPar; i++ ) {
166 sprintf( ecname, "P%i", i );
168 }
169
170 for( cnt=0; cnt<96; cnt++ ) {
172 eTof.
setP( cnvEndPar );
173 tmpeTof.push_back( eTof );
174 }
175
176
179 sprintf( brname, "t0offset%i", i );
181 }
182
183 int entries = btofcommontree->GetEntries();
184 for(cnt=0;cnt<entries;cnt++){
185 btofcommontree->GetEntry(cnt);
187 tmpbTofCommon.push_back(bTofCommon);
188 }
189
191
192 refpObject=tmpObject;
193 delete btoftree;
194 delete etoftree;
195 delete btofcommontree;
196 delete CalibInfo;
197
198 return StatusCode::SUCCESS;
199}
data SetBranchAddress("time",&time)
const unsigned int nBarOffset
const unsigned int nBarParOff
const unsigned int nEndPar
const unsigned int nBarPar
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)
virtual DatabaseRecord * pp()