44 DataObject*& refpObject ) {
46 MsgStream log(
msgSvc(),
"RootTofSimDataCnv" );
47 log << MSG::DEBUG <<
"SetProperty" << endmsg;
51 if ( !sc ) { log << MSG::ERROR <<
"unable to open files" << endmsg; }
56 std::vector<CalibData::BTofSimBase> tmpbTof;
57 std::vector<CalibData::ETofSimBase> tmpeTof;
58 std::vector<CalibData::TofSimConstBase> tofbaseCol;
66 TTree* btoftree = (TTree*)
m_inFile->Get(
"BTofSim" );
67 btoftree->SetBranchAddress(
"AttenLength", &AttenLength );
68 btoftree->SetBranchAddress(
"Gain", &Gain );
69 btoftree->SetBranchAddress(
"Ratio", &Ratio );
70 int entries = btoftree->GetEntries();
71 for ( cnt = 0; cnt < entries; cnt++ )
73 btoftree->GetEntry( cnt );
77 tmpbTof.push_back( bTof );
80 TTree* etoftree = (TTree*)
m_inFile->Get(
"ETofSim" );
81 etoftree->SetBranchAddress(
"Gain", &Gain );
82 etoftree->SetBranchAddress(
"AttenLength", &AttenLength );
83 etoftree->SetBranchAddress(
"NoiseSmear", &NoiseSmear );
84 entries = etoftree->GetEntries();
85 for ( cnt = 0; cnt < entries; cnt++ )
87 etoftree->GetEntry( cnt );
91 tmpeTof.push_back( eTof );
95 double BarConstant, BarPMTGain, BarHighThres, BarLowThres, EndConstant, EndPMTGain,
96 EndHighThres, EndLowThres, EndNoiseSwitch;
97 TTree* btofcommontree = (TTree*)
m_inFile->Get(
"SimConstants" );
98 btofcommontree->SetBranchAddress(
"BarConstant", &BarConstant );
99 btofcommontree->SetBranchAddress(
"BarPMTGain", &BarPMTGain );
100 btofcommontree->SetBranchAddress(
"BarHighThres", &BarHighThres );
101 btofcommontree->SetBranchAddress(
"BarLowThres", &BarLowThres );
102 btofcommontree->SetBranchAddress(
"EndConstant", &EndConstant );
103 btofcommontree->SetBranchAddress(
"EndPMTGain", &EndPMTGain );
104 btofcommontree->SetBranchAddress(
"EndHighThres", &EndHighThres );
105 btofcommontree->SetBranchAddress(
"EndLowThres", &EndLowThres );
106 btofcommontree->SetBranchAddress(
"EndNoiseSwitch", &EndNoiseSwitch );
107 entries = btofcommontree->GetEntries();
108 for ( cnt = 0; cnt < entries; cnt++ )
110 btofcommontree->GetEntry( cnt );
120 tofbaseCol.push_back( tofbase );
126 refpObject = tmpObject;
128 return StatusCode::SUCCESS;