/[PAMELA software]/eventviewer/flight/src/FEVdetector.cpp
ViewVC logotype

Diff of /eventviewer/flight/src/FEVdetector.cpp

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

revision 1.18 by mocchiut, Fri Mar 30 11:16:43 2007 UTC revision 1.21 by mocchiut, Thu Nov 8 11:05:34 2007 UTC
# Line 83  FEVdetector::FEVdetector(TString filenam Line 83  FEVdetector::FEVdetector(TString filenam
83    thefigure = &figure;    thefigure = &figure;
84    checkctrlword();    checkctrlword();
85    var.selex = false;    var.selex = false;
86      var.showall = false;
87    
88      var.showsi = false;
89      var.shownd = false;
90      var.shows4 = false;
91      var.showorb = false;
92      var.showtof = false;
93      var.showtrg = false;
94      var.showtrk = false;
95      var.showcal = false;
96      var.showrun = false;
97      var.showac = false;
98  }  }
99    
100  void FEVdetector::checkctrlword(){  void FEVdetector::checkctrlword(){
# Line 92  void FEVdetector::checkctrlword(){ Line 104  void FEVdetector::checkctrlword(){
104    var.RUN = 1;    var.RUN = 1;
105    var.TRK = 0;    var.TRK = 0;
106    var.ORB = 1;    var.ORB = 1;
107    var.TRG = 0;    var.TRG = 1;
108    var.CALO = 0;    var.CALO = 0;
109    var.CALOT = 0;    var.CALOT = 0;
110    var.S4 = 0;    var.S4 = 0;
# Line 136  void FEVdetector::SetDDEC(TString de){ Line 148  void FEVdetector::SetDDEC(TString de){
148  void FEVdetector::GetWindow(){  void FEVdetector::GetWindow(){
149    //    //
150    if ( level.file == 2 ){    if ( level.file == 2 ){
151        //    printf("0qui\n");
152      L2->GetEntry(minevent);      L2->GetEntry(minevent);
153    } else {    } else {
154      otr->GetEntry(minevent);      otr->GetEntry(minevent);
# Line 152  void FEVdetector::GetWindow(){ Line 165  void FEVdetector::GetWindow(){
165    };    };
166    //    //
167    if ( level.file == 2 ){    if ( level.file == 2 ){
168        //    printf("1qui\n");
169      L2->GetEntry(maxevent);      L2->GetEntry(maxevent);
170    } else {    } else {
171      otr->GetEntry(maxevent);      otr->GetEntry(maxevent);
# Line 193  void FEVdetector::GetEntry(Int_t i){ Line 207  void FEVdetector::GetEntry(Int_t i){
207    thisentry = i;      thisentry = i;  
208    if ( level.file == 2 ){    if ( level.file == 2 ){
209      L2->Clear();      L2->Clear();
210        //    printf("qui\n");
211      L2->GetEntry(i);      L2->GetEntry(i);
212      ShowInfo("RunInfo");      if ( var.showall ){
213      ShowInfo("SoftInfo");        ShowInfo("RunInfo");
214      ShowInfo("OrbitalInfo");        ShowInfo("SoftInfo");
215      ShowInfo("TrigLevel2");        ShowInfo("OrbitalInfo");
216      ShowInfo("ToFLevel2");        ShowInfo("TrigLevel2");
217      ShowInfo("TrkLevel2");        ShowInfo("ToFLevel2");
218      ShowInfo("AcLevel2");        ShowInfo("TrkLevel2");
219      ShowInfo("CaloLevel2");        ShowInfo("AcLevel2");
220      ShowInfo("CaloLevel1");        ShowInfo("CaloLevel2");
221      ShowInfo("S4Level2");        ShowInfo("CaloLevel1");
222      ShowInfo("NDLevel2");        ShowInfo("S4Level2");
223          ShowInfo("NDLevel2");
224        } else {
225          if ( var.showrun ) ShowInfo("RunInfo");
226          if ( var.showsi ) ShowInfo("SoftInfo");
227          if ( var.showorb ) ShowInfo("OrbitalInfo");
228          if ( var.showtrg ) ShowInfo("TrigLevel2");
229          if ( var.showtof ) ShowInfo("ToFLevel2");
230          if ( var.showtrk ) ShowInfo("TrkLevel2");
231          if ( var.showac ) ShowInfo("AcLevel2");
232          if ( var.showcal ) ShowInfo("CaloLevel2");
233          if ( var.showcal ) ShowInfo("CaloLevel1");
234          if ( var.shows4 ) ShowInfo("S4Level2");
235          if ( var.shownd ) ShowInfo("NDLevel2");
236        };
237    } else {    } else {
238      otr->GetEntry(i);      otr->GetEntry(i);
239      ShowInfo("Pscu");      if ( var.showall ){
240      ShowInfo("Trigger");        ShowInfo("Pscu");
241      ShowInfo("Tof");        ShowInfo("Trigger");
242      ShowInfo("Tracker");        ShowInfo("Tof");
243      ShowInfo("Anticounter");        ShowInfo("Tracker");
244      ShowInfo("Calorimeter");        ShowInfo("Anticounter");
245      ShowInfo("Neutron");        ShowInfo("Calorimeter");
246      ShowInfo("S4");        ShowInfo("S4");
247          ShowInfo("Neutron");
248        } else {
249          if ( var.showorb ) ShowInfo("Pscu");
250          if ( var.showtrg ) ShowInfo("Trigger");
251          if ( var.showtof ) ShowInfo("Tof");
252          if ( var.showtrk ) ShowInfo("Tracker");
253          if ( var.showac ) ShowInfo("Anticounter");
254          if ( var.showcal ) ShowInfo("Calorimeter");
255          if ( var.shows4 ) ShowInfo("S4");
256          if ( var.shownd ) ShowInfo("Neutron");
257        };
258    };    };
259  }  }
260    
# Line 1011  int FEVdetector::SelectEvent(){ Line 1051  int FEVdetector::SelectEvent(){
1051    //    //
1052  }  }
1053    
1054  TChain* FEVdetector::Load(TFile &mainfile){  TChain* FEVdetector::Load(TString file){
1055    //    //
1056    file = &mainfile;    //  file = &mainfile;
1057    //    //
1058    if ( level.file == 2 ){    if ( level.file == 2 ){
1059      //      //
1060      printf(" %s \n",ddec.Data());      printf(" %s \n",ddec.Data());
1061      if ( !L2 ){      if ( !L2 ){
1062        L2 = new PamLevel2("",file->GetName(),ddec.Data());        L2 = new PamLevel2("",file.Data(),ddec.Data());
1063        otr = L2->GetPamTree();        otr = L2->GetPamTree();
1064          printf(" l2 constructor\n");
1065          //      printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot);    
1066      } else {      } else {
1067        //        //
1068        otr = L2->GetPamTree(gSystem->DirName(file->GetName()),file->GetName(),ddec.Data());        printf(" l2 already exist \n");
1069        L2->GetRunTree(gSystem->DirName(file->GetName()),file->GetName());        otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data());
1070          L2->GetRunTree(gSystem->DirName(file.Data()),file.Data());
1071        //        //
1072      };      };
1073      //      //
# Line 1089  TChain* FEVdetector::Load(TFile &mainfil Line 1132  TChain* FEVdetector::Load(TFile &mainfil
1132      tof = new pamela::tof::TofEvent();      tof = new pamela::tof::TofEvent();
1133      //      //
1134      otr = new TChain("Physics");      otr = new TChain("Physics");
1135      otr->Add(file->GetName(),-1);      otr->Add(file.Data(),-1);
1136      otr->SetBranchAddress("Trigger", &trigger);      otr->SetBranchAddress("Trigger", &trigger);
1137      otr->SetBranchAddress("Header", &eh);      otr->SetBranchAddress("Header", &eh);
1138    };    };

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.23