37 MsgStream log(
msgSvc(),
"TreeTofSimDataCnv" );
38 log << MSG::DEBUG <<
"SetProperty" << endmsg;
44 TBufferFile* buf1 =
new TBufferFile( TBuffer::kRead );
45 TBufferFile* buf2 =
new TBufferFile( TBuffer::kRead );
46 TBufferFile* buf3 =
new TBufferFile( TBuffer::kRead );
48 buf1->SetBuffer( ( *records )[
"BTofSim"], 512000, kFALSE );
49 buf2->SetBuffer( ( *records )[
"ETofSim"], 512000, kFALSE );
50 buf3->SetBuffer( ( *records )[
"SimConstants"], 512000, kFALSE );
52 std::cout <<
" SftVer is " << ( *records )[
"SftVer"];
53 std::cout <<
" CalVerSft is " << ( *records )[
"TofSimParVer"];
54 std::cout <<
" File name is " << ( *records )[
"FileName"] << std::endl;
56 TTree* btoftree =
new TTree();
57 TTree* etoftree =
new TTree();
58 TTree* btofcommontree =
new TTree();
59 btoftree->Streamer( *buf1 );
60 etoftree->Streamer( *buf2 );
61 btofcommontree->Streamer( *buf3 );
66 std::vector<CalibData::BTofSimBase> tmpbTof;
67 std::vector<CalibData::ETofSimBase> tmpeTof;
68 std::vector<CalibData::TofSimConstBase> tofbaseCol;
76 btoftree->SetBranchAddress(
"AttenLength", &AttenLength );
77 btoftree->SetBranchAddress(
"Gain", &Gain );
78 btoftree->SetBranchAddress(
"Ratio", &Ratio );
79 int entries = btoftree->GetEntries();
80 for ( cnt = 0; cnt < entries; cnt++ )
82 btoftree->GetEntry( cnt );
86 tmpbTof.push_back( bTof );
89 etoftree->SetBranchAddress(
"Gain", &Gain );
90 etoftree->SetBranchAddress(
"AttenLength", &AttenLength );
91 etoftree->SetBranchAddress(
"NoiseSmear", &NoiseSmear );
92 entries = etoftree->GetEntries();
93 for ( cnt = 0; cnt < entries; cnt++ )
95 etoftree->GetEntry( cnt );
99 tmpeTof.push_back( eTof );
102 double BarConstant, BarPMTGain, BarHighThres, BarLowThres, EndConstant, EndPMTGain,
103 EndHighThres, EndLowThres, EndNoiseSwitch;
104 btofcommontree->SetBranchAddress(
"BarConstant", &BarConstant );
105 btofcommontree->SetBranchAddress(
"BarPMTGain", &BarPMTGain );
106 btofcommontree->SetBranchAddress(
"BarHighThres", &BarHighThres );
107 btofcommontree->SetBranchAddress(
"BarLowThres", &BarLowThres );
108 btofcommontree->SetBranchAddress(
"EndConstant", &EndConstant );
109 btofcommontree->SetBranchAddress(
"EndPMTGain", &EndPMTGain );
110 btofcommontree->SetBranchAddress(
"EndHighThres", &EndHighThres );
111 btofcommontree->SetBranchAddress(
"EndLowThres", &EndLowThres );
112 btofcommontree->SetBranchAddress(
"EndNoiseSwitch", &EndNoiseSwitch );
113 entries = btofcommontree->GetEntries();
114 for ( cnt = 0; cnt < entries; cnt++ )
116 btofcommontree->GetEntry( cnt );
126 tofbaseCol.push_back( tofbase );
131 refpObject = tmpObject;
134 delete btofcommontree;
136 return StatusCode::SUCCESS;