59 DataObject*& refpObject) {
61 MsgStream log(
msgSvc(),
"TreeTofCalibDataCnv");
62 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
68 TBufferFile *buf1 =
new TBufferFile(TBuffer::kRead);
69 TBufferFile *buf2 =
new TBufferFile(TBuffer::kRead);
70 TBufferFile *buf3 =
new TBufferFile(TBuffer::kRead);
71 TBufferFile *buf4 =
new TBufferFile(TBuffer::kRead);
73 buf1->SetBuffer((*records)[
"BarTofPar"],512000,kFALSE);
74 buf2->SetBuffer((*records)[
"EndTofPar"],512000,kFALSE);
75 buf3->SetBuffer((*records)[
"TofConPar"],512000,kFALSE);
76 buf4->SetBuffer((*records)[
"BarTof"],512000,kFALSE);
78 std::cout<<
" SftVer is "<<(*records)[
"SftVer"];
79 std::cout<<
" CalVerSft is "<<(*records)[
"CalParVer"];
80 std::cout<<
" File name is "<<(*records)[
"FileName"]<<std::endl;
82 TTree *btoftree=
new TTree();
83 TTree *etoftree=
new TTree();
84 TTree *btofcommontree =
new TTree();
85 TTree *CalibInfo =
new TTree();
87 btoftree->Streamer(*buf1);
88 etoftree->Streamer(*buf2);
89 btofcommontree->Streamer(*buf3);
90 CalibInfo->Streamer(*buf4);
92 int nentri = btoftree -> GetEntries();
93 int nentri1 = etoftree -> GetEntries();
94 int nentri2 = btofcommontree->GetEntries();
95 int nentri3 = CalibInfo->GetEntries();
102 std::vector<CalibData::bTofCalibBase> tmpbTof;
103 std::vector<CalibData::eTofCalibBase> tmpeTof;
104 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
105 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
127 for(
unsigned int i=0; i<
nBarAtten; i++ ) {
128 sprintf( brname,
"Atten%i", i );
131 for(
unsigned int i=0; i<
nBarSpeed; i++ ) {
132 sprintf( brname,
"Speed%i", i );
135 for(
unsigned int i=0; i<
nBarPar; i++ ) {
136 sprintf( brname,
"P%i", i );
139 for(
unsigned int i=0; i<
nBarPar; i++ ) {
140 sprintf( brname,
"P%i", i+
nBarPar );
144 sprintf( brname,
"Bunch0_Poff%i", i );
148 sprintf( brname,
"Bunch0_Poff%i", i+
nBarParOff );
152 sprintf( brname,
"Bunch1_Poff%i", i );
156 sprintf( brname,
"Bunch1_Poff%i", i+
nBarParOff );
160 sprintf( brname,
"Bunch2_Poff%i", i );
164 sprintf( brname,
"Bunch2_Poff%i", i+
nBarParOff );
168 sprintf( brname,
"Bunch3_Poff%i", i );
172 sprintf( brname,
"Bunch3_Poff%i", i+
nBarParOff );
175 for(
unsigned int i=0; i<
nBarSigma; i++ ) {
176 sprintf( brname,
"FLeft%i", i );
179 for(
unsigned int i=0; i<
nBarSigma; i++ ) {
180 sprintf( brname,
"FRight%i", i );
184 sprintf( brname,
"FCounter%i", i );
188 for(cnt=0; cnt<176; cnt++){
192 bTof.
setP1( cnvBarPar1 );
193 bTof.
setP2( cnvBarPar2 );
205 tmpbTof.push_back(bTof);
215 for(
unsigned int i=0; i<
nEndAtten; i++ ) {
216 sprintf( ecname,
"Atten%i", i );
219 for(
unsigned int i=0; i<
nEndSpeed; i++ ) {
220 sprintf( ecname,
"Speed%i", i );
223 for(
unsigned int i=0; i<
nEndPar; i++ ) {
224 sprintf( ecname,
"P%i", i );
227 for(
unsigned int i=0; i<
nEndSigma; i++ ) {
228 sprintf( ecname,
"FCounter%i", i );
232 for(cnt=0; cnt<96; cnt++){
236 eTof.
setP( cnvEndPar );
237 eTof.
setFP( cnvEndFPar );
238 tmpeTof.push_back(eTof);
245 sprintf( brname,
"sigmaCorr%i", i );
249 sprintf( brname,
"t0offset%i", i );
253 int entries = btofcommontree->GetEntries();
254 for(cnt=0;cnt<entries;cnt++){
255 btofcommontree->GetEntry(cnt);
258 tmpbTofCommon.push_back(bTofCommon);
261 int m_run1, m_run2, m_version;
262 int m_qCorr, m_qElec, m_misLable;
263 int m_tofidEast[5], m_tofidWest[5], m_tofidEndcap[5];
266 CalibInfo->SetBranchAddress(
"Run1",&m_run1);
267 CalibInfo->SetBranchAddress(
"Run2",&m_run2);
268 CalibInfo->SetBranchAddress(
"Version",&m_version);
269 CalibInfo->SetBranchAddress(
"ebrId0",&m_tofidEast[0]);
270 CalibInfo->SetBranchAddress(
"ebrId1",&m_tofidEast[1]);
271 CalibInfo->SetBranchAddress(
"ebrId2",&m_tofidEast[2]);
272 CalibInfo->SetBranchAddress(
"ebrId3",&m_tofidEast[3]);
273 CalibInfo->SetBranchAddress(
"ebrId4",&m_tofidEast[4]);
274 CalibInfo->SetBranchAddress(
"ecId0",&m_tofidEndcap[0]);
275 CalibInfo->SetBranchAddress(
"ecId1",&m_tofidEndcap[1]);
276 CalibInfo->SetBranchAddress(
"ecId2",&m_tofidEndcap[2]);
277 CalibInfo->SetBranchAddress(
"ecId3",&m_tofidEndcap[3]);
278 CalibInfo->SetBranchAddress(
"ecId4",&m_tofidEndcap[4]);
279 CalibInfo->SetBranchAddress(
"wbrId0",&m_tofidWest[0]);
280 CalibInfo->SetBranchAddress(
"wbrId1",&m_tofidWest[1]);
281 CalibInfo->SetBranchAddress(
"wbrId2",&m_tofidWest[2]);
282 CalibInfo->SetBranchAddress(
"wbrId3",&m_tofidWest[3]);
283 CalibInfo->SetBranchAddress(
"wbrId4",&m_tofidWest[4]);
284 CalibInfo->SetBranchAddress(
"misLable",&m_misLable);
285 CalibInfo->SetBranchAddress(
"qCorr",&m_qCorr);
286 CalibInfo->SetBranchAddress(
"qElec",&m_qElec);
288 entries= CalibInfo->GetEntries();
289 for(cnt=0;cnt<entries;cnt++){
290 CalibInfo->GetEntry(cnt);
300 tofinfoCol.push_back(tofinfo);
305 refpObject=tmpObject;
308 delete btofcommontree;
311 return StatusCode::SUCCESS;