/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkParams.cpp
ViewVC logotype

Diff of /DarthVader/TrackerLevel2/src/TrkParams.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.25 by pam-fi, Tue Nov 25 14:41:37 2008 UTC revision 1.27 by pam-fi, Tue Nov 29 13:25:07 2011 UTC
# Line 177  Bool_t TrkParams::SetCalib( GL_RUN *glru Line 177  Bool_t TrkParams::SetCalib( GL_RUN *glru
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              }                    }      
# Line 348  void TrkParams::FillACalibFrom(TFile* f0 Line 349  void TrkParams::FillACalibFrom(TFile* f0
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    
# Line 547  void TrkParams::FillMask(TFile* f0, Int_ Line 548  void TrkParams::FillMask(TFile* f0, Int_
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              //-------------------------              //-------------------------
# Line 555  void TrkParams::FillMask(TFile* f0, Int_ Line 556  void TrkParams::FillMask(TFile* f0, Int_
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);
# Line 868  Bool_t TrkParams::Load(UInt_t type){ Line 869  Bool_t TrkParams::Load(UInt_t type){
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;

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.23