49 DataObject*& refpObject) {
51 MsgStream log(
msgSvc(),
"TreeEstTofCalibDataCnv");
52 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
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);
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);
67 std::cout<<
" CalVerSft is "<<(*records)[
"CalParVer"];
68 std::cout<<
" File name is "<<(*records)[
"FileName"]<<std::endl;
70 TTree *btoftree=
new TTree();
71 TTree *etoftree=
new TTree();
72 TTree *btofcommontree =
new TTree();
73 TTree *CalibInfo =
new TTree();
75 btoftree->Streamer(*buf1);
76 etoftree->Streamer(*buf2);
77 btofcommontree->Streamer(*buf3);
78 CalibInfo->Streamer(*buf4);
85 std::vector<CalibData::bTofCalibBase> tmpbTof;
86 std::vector<CalibData::eTofCalibBase> tmpeTof;
87 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
88 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
105 for(
unsigned int i=0; i<
nBarPar; i++ ) {
106 sprintf( brname,
"P%i", i );
109 for(
unsigned int i=0; i<
nBarPar; i++ ) {
110 sprintf( brname,
"P%i", i+
nBarPar );
114 sprintf( brname,
"Bunch0_Poff%i", i );
118 sprintf( brname,
"Bunch0_Poff%i", i+
nBarParOff );
122 sprintf( brname,
"Bunch1_Poff%i", i );
126 sprintf( brname,
"Bunch1_Poff%i", i+
nBarParOff );
130 sprintf( brname,
"Bunch2_Poff%i", i );
134 sprintf( brname,
"Bunch2_Poff%i", i+
nBarParOff );
138 sprintf( brname,
"Bunch3_Poff%i", i );
142 sprintf( brname,
"Bunch3_Poff%i", i+
nBarParOff );
146 for(cnt=0; cnt<176; cnt++){
148 bTof.
setP1( cnvBarPar1 );
149 bTof.
setP2( cnvBarPar2 );
158 tmpbTof.push_back(bTof);
165 for(
unsigned int i=0; i<
nEndPar; i++ ) {
166 sprintf( ecname,
"P%i", i );
170 for( cnt=0; cnt<96; cnt++ ) {
172 eTof.
setP( cnvEndPar );
173 tmpeTof.push_back( eTof );
179 sprintf( brname,
"t0offset%i", i );
183 int entries = btofcommontree->GetEntries();
184 for(cnt=0;cnt<entries;cnt++){
185 btofcommontree->GetEntry(cnt);
187 tmpbTofCommon.push_back(bTofCommon);
192 refpObject=tmpObject;
195 delete btofcommontree;
198 return StatusCode::SUCCESS;