50 DataObject*& refpObject) {
52 MsgStream log(
msgSvc(),
"TreeEstTofCalibDataCnv");
53 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
58 TBufferFile *buf1 =
new TBufferFile(TBuffer::kRead);
59 TBufferFile *buf2 =
new TBufferFile(TBuffer::kRead);
60 TBufferFile *buf3 =
new TBufferFile(TBuffer::kRead);
61 TBufferFile *buf4 =
new TBufferFile(TBuffer::kRead);
62 TBufferFile *buf5 = 0;
64 buf1->SetBuffer((*records)[
"BarTofPar"],1024000,kFALSE);
65 buf2->SetBuffer((*records)[
"EndTofPar"],1024000,kFALSE);
66 buf3->SetBuffer((*records)[
"TofConPar"],1024000,kFALSE);
67 buf4->SetBuffer((*records)[
"BarTof"], 1024000,kFALSE);
69 if( (*records)[
"EtfTofPar"]!=0 ) {
70 buf5 =
new TBufferFile(TBuffer::kRead);
71 buf5->SetBuffer((*records)[
"EtfTofPar"],1024000,kFALSE);
74 std::cout<<
" CalVerSft is "<<(*records)[
"CalParVer"];
75 std::cout<<
" File name is "<<(*records)[
"FileName"]<<std::endl;
77 TTree *btoftree =
new TTree();
78 TTree *etoftree =
new TTree();
79 TTree *etftree =
new TTree();
80 TTree *btofcommontree =
new TTree();
81 TTree *CalibInfo =
new TTree();
83 btoftree->Streamer(*buf1);
84 etoftree->Streamer(*buf2);
85 btofcommontree->Streamer(*buf3);
86 CalibInfo->Streamer(*buf4);
88 etftree->Streamer(*buf5);
97 std::vector<CalibData::bTofCalibBase> tmpbTof;
98 std::vector<CalibData::eTofCalibBase> tmpeTof;
99 std::vector<CalibData::etfCalibBase> tmpetf;
100 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
101 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
118 for(
unsigned int i=0; i<
nBarPar; i++ ) {
122 for(
unsigned int i=0; i<
nBarPar; i++ ) {
127 sprintf( brname,
"Bunch0_Poff%i", i );
135 sprintf( brname,
"Bunch1_Poff%i", i );
143 sprintf( brname,
"Bunch2_Poff%i", i );
151 sprintf( brname,
"Bunch3_Poff%i", i );
159 int entries = btoftree->GetEntries();
160 for(cnt=0; cnt<entries; cnt++){
162 bTof.
setP1( cnvBarPar1 );
163 bTof.
setP2( cnvBarPar2 );
172 tmpbTof.push_back(bTof);
180 for(
unsigned int i=0; i<
nEndPar; i++ ) {
185 entries = etoftree->GetEntries();
186 for( cnt=0; cnt<entries; cnt++ ) {
188 eTof.
setP( cnvEndPar );
189 tmpeTof.push_back( eTof );
194 if( etftree->GetEntries() != 0 ) {
201 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
210 entries = etftree->GetEntries();
211 for(cnt=0; cnt<entries; cnt++){
213 etf.
setP( cnvEtfPar );
214 etf.
setP1( cnvEtfPar1 );
215 etf.
setP2( cnvEtfPar2 );
216 tmpetf.push_back(etf);
225 sprintf( brname,
"t0offset%i", i );
229 entries = btofcommontree->GetEntries();
230 for(cnt=0;cnt<entries;cnt++){
231 btofcommontree->GetEntry(cnt);
233 tmpbTofCommon.push_back(bTofCommon);
236 int m_runFrom, m_runTo, m_eventFrom, m_eventTo;
237 if( CalibInfo->GetBranchStatus(
"runFrom" ) ) {
238 CalibInfo->SetBranchAddress(
"runFrom", &m_runFrom );
239 CalibInfo->SetBranchAddress(
"runTo", &m_runTo );
240 CalibInfo->SetBranchAddress(
"eventFrom",&m_eventFrom );
241 CalibInfo->SetBranchAddress(
"eventTo", &m_eventTo );
250 entries = CalibInfo->GetEntries();
251 for(cnt=0;cnt<entries;cnt++){
252 CalibInfo->GetEntry(cnt);
257 tofinfoCol.push_back(tofinfo);
262 refpObject=tmpObject;
266 delete btofcommontree;
269 return StatusCode::SUCCESS;