--- eventviewer/flight/src/FEVdetector.cpp 2007/03/30 11:16:43 1.18 +++ eventviewer/flight/src/FEVdetector.cpp 2007/11/08 11:05:34 1.21 @@ -83,6 +83,18 @@ thefigure = &figure; checkctrlword(); var.selex = false; + var.showall = false; + + var.showsi = false; + var.shownd = false; + var.shows4 = false; + var.showorb = false; + var.showtof = false; + var.showtrg = false; + var.showtrk = false; + var.showcal = false; + var.showrun = false; + var.showac = false; } void FEVdetector::checkctrlword(){ @@ -92,7 +104,7 @@ var.RUN = 1; var.TRK = 0; var.ORB = 1; - var.TRG = 0; + var.TRG = 1; var.CALO = 0; var.CALOT = 0; var.S4 = 0; @@ -136,6 +148,7 @@ void FEVdetector::GetWindow(){ // if ( level.file == 2 ){ + // printf("0qui\n"); L2->GetEntry(minevent); } else { otr->GetEntry(minevent); @@ -152,6 +165,7 @@ }; // if ( level.file == 2 ){ + // printf("1qui\n"); L2->GetEntry(maxevent); } else { otr->GetEntry(maxevent); @@ -193,28 +207,54 @@ thisentry = i; if ( level.file == 2 ){ L2->Clear(); + // printf("qui\n"); L2->GetEntry(i); - ShowInfo("RunInfo"); - ShowInfo("SoftInfo"); - ShowInfo("OrbitalInfo"); - ShowInfo("TrigLevel2"); - ShowInfo("ToFLevel2"); - ShowInfo("TrkLevel2"); - ShowInfo("AcLevel2"); - ShowInfo("CaloLevel2"); - ShowInfo("CaloLevel1"); - ShowInfo("S4Level2"); - ShowInfo("NDLevel2"); + if ( var.showall ){ + ShowInfo("RunInfo"); + ShowInfo("SoftInfo"); + ShowInfo("OrbitalInfo"); + ShowInfo("TrigLevel2"); + ShowInfo("ToFLevel2"); + ShowInfo("TrkLevel2"); + ShowInfo("AcLevel2"); + ShowInfo("CaloLevel2"); + ShowInfo("CaloLevel1"); + ShowInfo("S4Level2"); + ShowInfo("NDLevel2"); + } else { + if ( var.showrun ) ShowInfo("RunInfo"); + if ( var.showsi ) ShowInfo("SoftInfo"); + if ( var.showorb ) ShowInfo("OrbitalInfo"); + if ( var.showtrg ) ShowInfo("TrigLevel2"); + if ( var.showtof ) ShowInfo("ToFLevel2"); + if ( var.showtrk ) ShowInfo("TrkLevel2"); + if ( var.showac ) ShowInfo("AcLevel2"); + if ( var.showcal ) ShowInfo("CaloLevel2"); + if ( var.showcal ) ShowInfo("CaloLevel1"); + if ( var.shows4 ) ShowInfo("S4Level2"); + if ( var.shownd ) ShowInfo("NDLevel2"); + }; } else { otr->GetEntry(i); - ShowInfo("Pscu"); - ShowInfo("Trigger"); - ShowInfo("Tof"); - ShowInfo("Tracker"); - ShowInfo("Anticounter"); - ShowInfo("Calorimeter"); - ShowInfo("Neutron"); - ShowInfo("S4"); + if ( var.showall ){ + ShowInfo("Pscu"); + ShowInfo("Trigger"); + ShowInfo("Tof"); + ShowInfo("Tracker"); + ShowInfo("Anticounter"); + ShowInfo("Calorimeter"); + ShowInfo("S4"); + ShowInfo("Neutron"); + } else { + if ( var.showorb ) ShowInfo("Pscu"); + if ( var.showtrg ) ShowInfo("Trigger"); + if ( var.showtof ) ShowInfo("Tof"); + if ( var.showtrk ) ShowInfo("Tracker"); + if ( var.showac ) ShowInfo("Anticounter"); + if ( var.showcal ) ShowInfo("Calorimeter"); + if ( var.shows4 ) ShowInfo("S4"); + if ( var.shownd ) ShowInfo("Neutron"); + }; }; } @@ -1011,20 +1051,23 @@ // } -TChain* FEVdetector::Load(TFile &mainfile){ +TChain* FEVdetector::Load(TString file){ // - file = &mainfile; + // file = &mainfile; // if ( level.file == 2 ){ // printf(" %s \n",ddec.Data()); if ( !L2 ){ - L2 = new PamLevel2("",file->GetName(),ddec.Data()); + L2 = new PamLevel2("",file.Data(),ddec.Data()); otr = L2->GetPamTree(); + printf(" l2 constructor\n"); + // printf(" abst %u obt %u qtot %f \n",L2->GetOrbitalInfo()->absTime,L2->GetOrbitalInfo()->OBT,L2->GetCaloLevel2()->qtot); } else { // - otr = L2->GetPamTree(gSystem->DirName(file->GetName()),file->GetName(),ddec.Data()); - L2->GetRunTree(gSystem->DirName(file->GetName()),file->GetName()); + printf(" l2 already exist \n"); + otr = L2->GetPamTree(gSystem->DirName(file.Data()),file.Data(),ddec.Data()); + L2->GetRunTree(gSystem->DirName(file.Data()),file.Data()); // }; // @@ -1089,7 +1132,7 @@ tof = new pamela::tof::TofEvent(); // otr = new TChain("Physics"); - otr->Add(file->GetName(),-1); + otr->Add(file.Data(),-1); otr->SetBranchAddress("Trigger", &trigger); otr->SetBranchAddress("Header", &eh); };