52 DataObject*& refpObject) {
54 MsgStream log(
msgSvc(),
"RootEstTofCalibDataCnv");
55 log<<MSG::DEBUG<<
"SetProperty"<<endreq;
60 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
69 std::vector<CalibData::bTofCalibBase> tmpbTof;
70 std::vector<CalibData::eTofCalibBase> tmpeTof;
71 std::vector<CalibData::etfCalibBase> tmpetf;
72 std::vector<CalibData::bTofCommonCalibBase> tmpbTofCommon;
73 std::vector<CalibData::tofCalibInfoBase> tofinfoCol;
89 TTree *btoftree = (TTree*)
m_inFile -> Get(
"BarTofPar");
92 for(
unsigned int i=0; i<
nBarPar; i++ ) {
96 for(
unsigned int i=0; i<
nBarPar; i++ ) {
101 sprintf( brname,
"Bunch0_Poff%i", i );
109 sprintf( brname,
"Bunch1_Poff%i", i );
117 sprintf( brname,
"Bunch2_Poff%i", i );
125 sprintf( brname,
"Bunch3_Poff%i", i );
133 for(cnt=0; cnt< btoftree->GetEntries(); cnt++){
135 bTof.
setP1( cnvBarPar1 );
136 bTof.
setP2( cnvBarPar2 );
145 tmpbTof.push_back( bTof );
151 TTree *etoftree = (TTree*)
m_inFile -> Get(
"EndTofPar");
154 for(
unsigned int i=0; i<
nEndPar; i++ ) {
159 for(cnt=0; cnt<etoftree->GetEntries(); cnt++){
160 etoftree->GetEntry(cnt);
161 eTof.
setP( cnvEndPar );
162 tmpeTof.push_back(eTof);
171 TTree *etftree = (TTree*)
m_inFile -> Get(
"EtfTofPar");
174 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
178 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
182 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
187 for(cnt=0; cnt<etftree->GetEntries(); cnt++){
189 etf.
setP( cnvEtfPar );
190 etf.
setP1( cnvEtfPar1 );
191 etf.
setP2( cnvEtfPar2 );
192 tmpetf.push_back(etf);
198 TTree *btofcommontree = (TTree*)
m_inFile -> Get(
"BarTofParCommon");
200 sprintf( brname,
"t0offset%i", i );
204 int entries = btofcommontree->GetEntries();
205 for(cnt=0;cnt<entries;cnt++){
206 btofcommontree->GetEntry(cnt);
208 tmpbTofCommon.push_back(bTofCommon);
211 int m_runFrom, m_runTo, m_eventFrom, m_eventTo;
213 TTree *CalibInfo = (TTree*)
m_inFile -> Get(
"CalibInfo");
215 if( CalibInfo->GetBranchStatus(
"runFrom") ) {
216 CalibInfo->SetBranchAddress(
"runFrom", &m_runFrom );
217 CalibInfo->SetBranchAddress(
"runTo", &m_runTo );
218 CalibInfo->SetBranchAddress(
"eventFrom", &m_eventFrom );
219 CalibInfo->SetBranchAddress(
"eventTo", &m_eventTo );
228 entries= CalibInfo->GetEntries();
229 for(cnt=0;cnt<entries;cnt++){
230 CalibInfo->GetEntry(cnt);
235 tofinfoCol.push_back(tofinfo);
240 refpObject=tmpObject;
242 return StatusCode::SUCCESS;
247 MsgStream log(
msgSvc(),
"RootEstTofCalibDataCnv");
252 { log<<MSG::ERROR<<
"unable to open files"<<endreq;
261 char brname[8], ibrname[8];
262 TTree *btoftree =
new TTree(
"BarTofPar",
"BarTofPar");
263 for(
unsigned int i=0; i<
nBarPar; i++ ) {
265 sprintf( ibrname,
"P%i/D", i );
266 btoftree ->
Branch( brname, &cnvBarPar1[i], ibrname );
269 for(
int i=0; i<176; i++ ) {
270 for(
int j=0;j<static_cast<int>(
nBarPar);j++){
280 char ecname[8], iecname[8];
281 TTree *etoftree =
new TTree(
"EndTofPar",
"EndTofPar");
282 for(
unsigned int i=0; i<
nEndPar; i++ ) {
284 sprintf( iecname,
"P%i/D", i );
285 etoftree ->
Branch( ecname, &cnvEndPar[i], iecname );
288 for(
int i=0; i<96; i++){
289 for(
int j=0;j<static_cast<int>(
nEndPar);j++){
300 char etfname[8], ietfname[8];
301 TTree *etftree =
new TTree(
"EtfTofPar",
"EtfTofPar");
302 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
304 sprintf( ietfname,
"P%i/D", i );
305 etftree ->
Branch( etfname, &cnvEtfPar[i], ietfname );
307 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
310 etftree ->
Branch( etfname, &cnvEtfPar1[i], ietfname );
312 for(
unsigned int i=0; i<
nEtfPar; i++ ) {
315 etftree ->
Branch( etfname, &cnvEtfPar2[i], ietfname );
318 for(
int i=0; i<72; i++ ) {
319 for(
int k=0; k<12; k++ ) {
320 for(
int j=0;j<static_cast<int>(
nEtfPar);j++){
337 log<<MSG::INFO<<
"successfully create RootFile"<<endreq;