177 |
|
|
178 |
if(LOCAL_CONNECTION&&dbc){ |
if(LOCAL_CONNECTION&&dbc){ |
179 |
dbc->Close(); |
dbc->Close(); |
180 |
|
delete dbc; |
181 |
if(TrkParams::DebugMode()){ |
if(TrkParams::DebugMode()){ |
182 |
cout << " DB connection closed."<<endl; |
cout << " DB connection closed."<<endl; |
183 |
} |
} |
349 |
// tr2->SetBranchAddress("CalibTrk2",&calibdata2); |
// tr2->SetBranchAddress("CalibTrk2",&calibdata2); |
350 |
tr1->SetBranchAddress("CalibTrk1",calib1->GetPointerTo()); |
tr1->SetBranchAddress("CalibTrk1",calib1->GetPointerTo()); |
351 |
tr2->SetBranchAddress("CalibTrk2",calib2->GetPointerTo()); |
tr2->SetBranchAddress("CalibTrk2",calib2->GetPointerTo()); |
352 |
tr1->GetEntry(ev_reg1); |
if ( tr1->GetEntry(ev_reg1) <= 0 ) throw -36;//EM |
353 |
tr2->GetEntry(ev_reg2); |
if ( tr2->GetEntry(ev_reg2) <= 0 ) throw -36;//EM |
354 |
Int_t dspn1(0),dspn2(0); |
Int_t dspn1(0),dspn2(0); |
355 |
|
|
356 |
|
|
548 |
//------------------------- |
//------------------------- |
549 |
tr = (TTree*)f0->Get("CalibTrk1"); |
tr = (TTree*)f0->Get("CalibTrk1"); |
550 |
tr->SetBranchAddress("CalibTrk1",calib->GetPointerTo()); |
tr->SetBranchAddress("CalibTrk1",calib->GetPointerTo()); |
551 |
tr->GetEntry(ev_reg1); |
if ( tr->GetEntry(ev_reg1) <= 0 ) throw -36;//EM |
552 |
} |
} |
553 |
if(i==1){ |
if(i==1){ |
554 |
//------------------------- |
//------------------------- |
556 |
//------------------------- |
//------------------------- |
557 |
tr = (TTree*)f0->Get("CalibTrk2"); |
tr = (TTree*)f0->Get("CalibTrk2"); |
558 |
tr->SetBranchAddress("CalibTrk2",calib->GetPointerTo()); |
tr->SetBranchAddress("CalibTrk2",calib->GetPointerTo()); |
559 |
tr->GetEntry(ev_reg2); |
if ( tr->GetEntry(ev_reg2) <= 0 ) throw -36; |
560 |
} |
} |
561 |
for(Int_t ipkt=0; ipkt<NPLANE; ipkt++){ |
for(Int_t ipkt=0; ipkt<NPLANE; ipkt++){ |
562 |
Int_t view = calib->GetView(ipkt); |
Int_t view = calib->GetView(ipkt); |
869 |
} |
} |
870 |
|
|
871 |
Bool_t TrkParams::Load( ){ |
Bool_t TrkParams::Load( ){ |
872 |
for(Int_t i=0 ; i<NTYPES; i++)if(!glload[i] && trkparamtype[i]>0 )if( !TrkParams::Load(trkparamtype[i]) )return false; |
Bool_t result = true; |
873 |
return true; |
for(Int_t i=0 ; i<NTYPES; i++) |
874 |
|
if(!glload[i] && trkparamtype[i]>0 ) |
875 |
|
if( !TrkParams::Load(trkparamtype[i]) ) |
876 |
|
result = false; |
877 |
|
return result; |
878 |
}; |
}; |
879 |
Bool_t TrkParams::IsLoaded( ){ |
Bool_t TrkParams::IsLoaded( ){ |
880 |
for(Int_t i=0 ; i<NTYPES; i++)if(!glload[i] && trkparamtype[i]>0 )return false; |
for(Int_t i=0 ; i<NTYPES; i++)if(!glload[i] && trkparamtype[i]>0 )return false; |