88 MsgStream log(
msgSvc(), name() );
92 std::string fullPath =
"/Calib/TofCal";
93 log << MSG::INFO <<
"execute() fullPath = " << fullPath << endmsg;
95 SmartDataPtr<CalibData::TofCalibData> btof( m_pCalibDataSvc, fullPath );
97 TFile*
f1 =
new TFile(
"TofCalConst.root",
"read" );
99 TTree* btoftree = (TTree*)
f1->Get(
"BarTofPar" );
103 btoftree->SetBranchAddress(
"FCounter0", &fCount[0] );
104 btoftree->SetBranchAddress(
"FCounter1", &fCount[1] );
105 btoftree->SetBranchAddress(
"FCounter2", &fCount[2] );
106 btoftree->SetBranchAddress(
"FCounter3", &fCount[3] );
107 btoftree->SetBranchAddress(
"FCounter4", &fCount[4] );
108 btoftree->SetBranchAddress(
"FCounter5", &fCount[5] );
109 btoftree->SetBranchAddress(
"FCounter6", &fCount[6] );
110 btoftree->SetBranchAddress(
"FCounter7", &fCount[7] );
111 btoftree->SetBranchAddress(
"FCounter8", &fCount[8] );
112 btoftree->SetBranchAddress(
"FCounter9", &fCount[9] );
113 btoftree->SetBranchAddress(
"FLeft0", &fLeft[0] );
114 btoftree->SetBranchAddress(
"FLeft1", &fLeft[1] );
115 btoftree->SetBranchAddress(
"FLeft2", &fLeft[2] );
116 btoftree->SetBranchAddress(
"FLeft3", &fLeft[3] );
117 btoftree->SetBranchAddress(
"FLeft4", &fLeft[4] );
118 btoftree->SetBranchAddress(
"FRight0", &fRight[0] );
119 btoftree->SetBranchAddress(
"FRight1", &fRight[1] );
120 btoftree->SetBranchAddress(
"FRight2", &fRight[2] );
121 btoftree->SetBranchAddress(
"FRight3", &fRight[3] );
122 btoftree->SetBranchAddress(
"FRight4", &fRight[4] );
124 for (
int i = 0; i < 176; i++ )
126 btoftree->GetEntry( i );
128 double bAtten0 = btof->getBTofAtten( i, 0 );
129 double bAtten1 = btof->getBTofAtten( i, 1 );
130 double bP0 = btof->getBTofPleft( i, 0 );
131 double bP1 = btof->getBTofPleft( i, 1 );
132 double bP2 = btof->getBTofPleft( i, 2 );
133 double bP3 = btof->getBTofPleft( i, 3 );
134 double bP4 = btof->getBTofPleft( i, 4 );
135 double bP5 = btof->getBTofPleft( i, 5 );
136 double bP10 = btof->getBTofPright( i, 0 );
139 double bSpeed0 = btof->getBTofSpeed( i, 0 );
140 double bSpeed1 = btof->getBTofSpeed( i, 1 );
147 double fCount1[10], fLeft1[5], fRight1[5];
148 for (
int j = 0; j < 10; j++ )
150 fCount1[j] = btof->getBTofFcounter( i, j );
151 if ( fCount1[j] != fCount[j] ) std::cout <<
"error error error error" << std::endl;
156 for (
int j = 0; j < 5; j++ )
158 fLeft1[j] = btof->getBTofFleft( i, j );
159 if ( fLeft1[j] != fLeft[j] ) std::cout <<
"error error error error" << std::endl;
164 for (
int j = 0; j < 5; j++ )
166 fRight1[j] = btof->getBTofFright( i, j );
167 if ( fRight1[j] != fRight[j] ) std::cout <<
"error error error error" << std::endl;
262 for (
int i = 0; i < 8; i++ )
264 sigma[i] = btof->getBTofSigmaCorr( 0, i );
265 std::cout <<
" sigma[" << i <<
"]=" << sigma[i];
269 std::cout <<
" btof->getRunBegin()" << btof->getRunBegin( 0 );
270 std::cout <<
"btof->getRunEnd()" << btof->getRunEnd( 0 );
271 std::cout <<
"btof->getVersion()" << btof->getVersion( 0 );
272 std::cout <<
"btof->getQCorr()" << btof->getQCorr( 0 );
273 std::cout <<
"btof->getMisLable()" << btof->getMisLable( 0 );
274 std::cout <<
"btof->getQElec()" << btof->getQElec( 0 );
275 for (
int i = 0; i < 5; i++ )
277 std::cout <<
"i===" << i << std::endl;
278 std::cout <<
" btof->getBrEast(int index)" << btof->getBrEast( 0, i );
279 std::cout <<
" btof->getBrWest(int index)" << btof->getBrWest( 0, i );
280 std::cout <<
" btof->getEndcap(int index)" << btof->getEndcap( 0, i );
285 return StatusCode::SUCCESS;