| 566 |
|
|
| 567 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
| 568 |
soft_obj = 0;// Emiliano |
soft_obj = 0;// Emiliano |
| 569 |
|
proc_obj = 0;// Emiliano |
| 570 |
irun = -1LL; |
irun = -1LL; |
| 571 |
irunt = -1LL; |
irunt = -1LL; |
| 572 |
totrunentry = 0LL; |
totrunentry = 0LL; |
| 593 |
|
|
| 594 |
run_tree = NULL; |
run_tree = NULL; |
| 595 |
run_tree_clone = NULL; |
run_tree_clone = NULL; |
| 596 |
|
|
| 597 |
|
proc_tree = NULL; |
| 598 |
|
proc_tree_clone = NULL; |
| 599 |
|
|
| 600 |
sel_tree = NULL; |
sel_tree = NULL; |
| 601 |
sel_tree_clone = NULL; |
sel_tree_clone = NULL; |
| 602 |
|
|
| 628 |
if (strcmp(pamdbpsw, "")) |
if (strcmp(pamdbpsw, "")) |
| 629 |
psw = pamdbpsw; |
psw = pamdbpsw; |
| 630 |
|
|
| 631 |
|
customString = ""; |
| 632 |
|
|
| 633 |
// sorted_tracks = 0;//new TRefArray(); |
// sorted_tracks = 0;//new TRefArray(); |
| 634 |
|
|
| 635 |
CAL0 = false; |
CAL0 = false; |
| 646 |
ND = true; |
ND = true; |
| 647 |
AC = true; |
AC = true; |
| 648 |
ORB = true; |
ORB = true; |
| 649 |
|
PROC = true; |
| 650 |
GP = false; |
GP = false; |
| 651 |
|
|
| 652 |
EXT = false; |
EXT = false; |
| 689 |
delete run_obj; |
delete run_obj; |
| 690 |
if (soft_obj) |
if (soft_obj) |
| 691 |
delete soft_obj; //Emiliano |
delete soft_obj; //Emiliano |
| 692 |
|
if (proc_obj) |
| 693 |
|
delete proc_obj; //Emiliano |
| 694 |
|
|
| 695 |
// cout << "void PamLevel2::Clear()"<<endl; |
// cout << "void PamLevel2::Clear()"<<endl; |
| 696 |
if (h0_obj) |
if (h0_obj) |
| 891 |
orb2_obj->Clear(); |
orb2_obj->Clear(); |
| 892 |
if (gp_obj) |
if (gp_obj) |
| 893 |
gp_obj->Clear(); |
gp_obj->Clear(); |
| 894 |
|
if (proc_obj) |
| 895 |
|
proc_obj->Clear(); |
| 896 |
|
|
| 897 |
// if(sorted_tracks)sorted_tracks->Clear(); |
// if(sorted_tracks)sorted_tracks->Clear(); |
| 898 |
// sorted_tracks.Clear(); |
// sorted_tracks.Clear(); |
| 973 |
if (sel_tree) |
if (sel_tree) |
| 974 |
sel_tree->Delete();; |
sel_tree->Delete();; |
| 975 |
sel_tree = NULL; |
sel_tree = NULL; |
| 976 |
|
|
| 977 |
|
if (proc_tree) |
| 978 |
|
proc_tree->Delete(); |
| 979 |
|
proc_tree = NULL; |
| 980 |
// |
// |
| 981 |
// Close file |
// Close file |
| 982 |
// |
// |
| 1000 |
ac_obj = 0; |
ac_obj = 0; |
| 1001 |
orb2_obj = 0; |
orb2_obj = 0; |
| 1002 |
gp_obj = 0; |
gp_obj = 0; |
| 1003 |
|
proc_obj = 0; |
| 1004 |
|
|
| 1005 |
trk_ext_obj = 0; |
trk_ext_obj = 0; |
| 1006 |
trk_ext_nuc_obj = 0; |
trk_ext_nuc_obj = 0; |
| 1032 |
// |
// |
| 1033 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
| 1034 |
soft_obj = 0;// Emiliano |
soft_obj = 0;// Emiliano |
| 1035 |
|
proc_obj = 0;// Emiliano |
| 1036 |
irun = -1; |
irun = -1; |
| 1037 |
irunt = -1; |
irunt = -1; |
| 1038 |
totrunentry = 0LL; |
totrunentry = 0LL; |
| 1207 |
if (!objname.CompareTo("SoftInfo")) |
if (!objname.CompareTo("SoftInfo")) |
| 1208 |
return &soft_obj; // Emiliano |
return &soft_obj; // Emiliano |
| 1209 |
|
|
| 1210 |
|
if (!objname.CompareTo("ProcInfo")){ |
| 1211 |
|
if (!proc_obj) |
| 1212 |
|
proc_obj = new ProcInfo(); |
| 1213 |
|
return &proc_obj; // Emiliano |
| 1214 |
|
} |
| 1215 |
|
|
| 1216 |
return NULL; |
return NULL; |
| 1217 |
} |
} |
| 1218 |
; |
; |
| 3328 |
TChain *G = 0; |
TChain *G = 0; |
| 3329 |
|
|
| 3330 |
TChain *L = 0; |
TChain *L = 0; |
| 3331 |
|
TChain *P = 0; |
| 3332 |
|
|
| 3333 |
if (TRK2 || TRK1 || TRKh) |
if (TRK2 || TRK1 || TRKh) |
| 3334 |
T = new TChain("Tracker"); |
T = new TChain("Tracker"); |
| 3348 |
B = new TChain("OrbitalInfo"); |
B = new TChain("OrbitalInfo"); |
| 3349 |
if (GP) |
if (GP) |
| 3350 |
G = new TChain("h20"); |
G = new TChain("h20"); |
| 3351 |
|
if (PROC) |
| 3352 |
|
P = new TChain("ProcessingInfo"); |
| 3353 |
L = new TChain("SelectionList"); |
L = new TChain("SelectionList"); |
| 3354 |
|
|
| 3355 |
// loop over files and create chains |
// loop over files and create chains |
| 3377 |
B->Add(name); |
B->Add(name); |
| 3378 |
if (GP) |
if (GP) |
| 3379 |
G->Add(name); |
G->Add(name); |
| 3380 |
|
if (P) |
| 3381 |
|
P->Add(name); |
| 3382 |
if (SELLI == 1) |
if (SELLI == 1) |
| 3383 |
L->Add(name); |
L->Add(name); |
| 3384 |
}; |
}; |
| 3504 |
L->Delete(); |
L->Delete(); |
| 3505 |
}; |
}; |
| 3506 |
|
|
| 3507 |
|
//ProcessingInfo EM |
| 3508 |
|
if ( P && P->GetEntries() ){ |
| 3509 |
|
cout << "----------------------------------------------------" << endl; |
| 3510 |
|
cout << ">>> Found ProcessingInfo <<<" << endl; |
| 3511 |
|
// L->SetBranchAddress("RunEntry",&irun); |
| 3512 |
|
P->SetBranchAddress("ProcInfo", &proc_obj);//NEWNEW |
| 3513 |
|
proc_tree = P; |
| 3514 |
|
} else { |
| 3515 |
|
// proc_tree = new TChain("ProcessingInfo","Log of data processing"); |
| 3516 |
|
// proc_tree->Branch("ProcInfo", "ProcInfo", &proc_obj); |
| 3517 |
|
cout << "----------------------------------------------------" << endl; |
| 3518 |
|
cout << ">>> ProcessingInfo not found, PROC set to false and continue (not 10RED files?)<<<" << endl; |
| 3519 |
|
PROC = false; |
| 3520 |
|
} |
| 3521 |
// -------------------------------------------- |
// -------------------------------------------- |
| 3522 |
// return the pamela chain with all the friends |
// return the pamela chain with all the friends |
| 3523 |
// -------------------------------------------- |
// -------------------------------------------- |
| 3524 |
|
|
| 3525 |
pam_tree = Trout; |
pam_tree = Trout; |
|
|
|
| 3526 |
return Trout; |
return Trout; |
| 3527 |
} |
} |
| 3528 |
|
|
| 4614 |
// cout << "Checking file: "<<f->GetName()<<endl; |
// cout << "Checking file: "<<f->GetName()<<endl; |
| 4615 |
if (!f || f->IsZombie()) { |
if (!f || f->IsZombie()) { |
| 4616 |
cout << "File: " << f->GetName() << " Non valid root file" << endl; |
cout << "File: " << f->GetName() << " Non valid root file" << endl; |
| 4617 |
|
fDiscarded = true; |
| 4618 |
return; |
return; |
| 4619 |
} |
} |
| 4620 |
|
|
| 5220 |
// cout << i<< "\t | "<<GetRunInfo()->ID<<"\t "<<GetRunInfo()->NEVENTS<< "\t "<<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME<<endl; |
// cout << i<< "\t | "<<GetRunInfo()->ID<<"\t "<<GetRunInfo()->NEVENTS<< "\t "<<GetRunInfo()->RUNHEADER_TIME<<" <---> "<<GetRunInfo()->RUNTRAILER_TIME<<endl; |
| 5221 |
run_tree_clone->Fill(); |
run_tree_clone->Fill(); |
| 5222 |
} |
} |
| 5223 |
cout << "----------------------------------------------------" << endl; |
// |
| 5224 |
|
// replicate processinginfo tree |
| 5225 |
|
// |
| 5226 |
|
if ( PROC ){ // EMEMEM |
| 5227 |
|
proc_tree_clone = new TTree("ProcessingInfo","Log of data processing"); |
| 5228 |
|
proc_tree_clone->Branch("ProcInfo", "ProcInfo", GetPointerTo("ProcInfo")); |
| 5229 |
|
cout << "ProcessingInfo: branch ProcessingInfo" << endl; |
| 5230 |
|
// ------------------ |
| 5231 |
|
// replicate processinginfo tree |
| 5232 |
|
// ------------------ |
| 5233 |
|
// cout << "----------------------------------------------------"<<endl; |
| 5234 |
|
// cout << "irun\t | RUN\t NEVENTS\t absolute time"<<endl; |
| 5235 |
|
for (Int_t i = 0; i < proc_tree->GetEntries(); i++) { |
| 5236 |
|
proc_tree->GetEntry(i); |
| 5237 |
|
// cout << i<< "\t | "<<endl; |
| 5238 |
|
proc_tree_clone->Fill(); |
| 5239 |
|
} |
| 5240 |
|
if ( SELLI != 2 ){ |
| 5241 |
|
proc_obj->runID = 0; |
| 5242 |
|
TTimeStamp *dt = new TTimeStamp(); |
| 5243 |
|
proc_obj->date = dt->AsString(); |
| 5244 |
|
delete dt; |
| 5245 |
|
proc_obj->commandLine = Form("PamelaLevel2 was called: CAL2 %i CAL1 %i CAL0 %i TRK2 %i TRK1 %i TRKh %i TRK0 %i TOF %i TOF0 %i TRG %i \n S4 %i ND %i AC %i ORB %i GP %i EXT %i NUC %i RUN %i ISGP %i SELLI %i \n Custom string = %s",CAL2,CAL1,CAL0,TRK2,TRK1,TRKh,TRK0,TOF,TOF0,TRG,S4,ND,AC,ORB,GP,EXT,NUC,RUN,ISGP,SELLI,customString.Data()); |
| 5246 |
|
proc_obj->outputFilename = ofile->GetName(); |
| 5247 |
|
proc_obj->localDir = gSystem->WorkingDirectory(); |
| 5248 |
|
proc_obj->uname = gSystem->GetFromPipe("uname -a"); |
| 5249 |
|
if (!dbc || (dbc && !dbc->IsConnected())) SetDBConnection(); |
| 5250 |
|
proc_obj->DB = Form("mysql://%s/%s",dbc->GetHost(),dbc->GetDB()); |
| 5251 |
|
dbc->Close(); |
| 5252 |
|
proc_tree_clone->Fill(); |
| 5253 |
|
} |
| 5254 |
|
cout << "----------------------------------------------------" << endl; |
| 5255 |
|
} |
| 5256 |
// ------------------------------------ |
// ------------------------------------ |
| 5257 |
// add branch with dead and live times |
// add branch with dead and live times |
| 5258 |
// ------------------------------------ |
// ------------------------------------ |
| 5443 |
if (!name.CompareTo(na)) |
if (!name.CompareTo(na)) |
| 5444 |
return sel_tree_clone; |
return sel_tree_clone; |
| 5445 |
} |
} |
| 5446 |
|
if (proc_tree_clone && PROC) { |
| 5447 |
|
TString na = proc_tree_clone->GetName(); |
| 5448 |
|
if (!name.CompareTo(na)) |
| 5449 |
|
return proc_tree_clone; |
| 5450 |
|
} |
| 5451 |
return NULL; |
return NULL; |
| 5452 |
|
|
| 5453 |
} |
} |
| 5470 |
pam_tree_clone[i]->Write(pam_tree_clone[i]->GetName(),TObject::kOverwrite); |
pam_tree_clone[i]->Write(pam_tree_clone[i]->GetName(),TObject::kOverwrite); |
| 5471 |
}; |
}; |
| 5472 |
} |
} |
| 5473 |
|
|
| 5474 |
|
if ( PROC ){//EMEMEMEM |
| 5475 |
|
proc_tree_clone->Write("ProcessingInfo",TObject::kOverwrite); |
| 5476 |
|
} |
| 5477 |
cout << "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+" << endl; |
cout << "+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+" << endl; |
| 5478 |
|
|
| 5479 |
} |
} |