| 374 |
PamTrack::PamTrack(const PamTrack& track) { |
PamTrack::PamTrack(const PamTrack& track) { |
| 375 |
|
|
| 376 |
TrkTrack *t = track.trk_track; |
TrkTrack *t = track.trk_track; |
| 377 |
|
ExtTrack *e = track.trk_ext_track; |
| 378 |
CaloTrkVar *c = track.calo_track; |
CaloTrkVar *c = track.calo_track; |
| 379 |
ToFTrkVar *o = track.tof_track; |
ToFTrkVar *o = track.tof_track; |
| 380 |
OrbitalInfoTrkVar *r = track.orb_track; |
OrbitalInfoTrkVar *r = track.orb_track; |
| 381 |
|
|
| 382 |
trk_track = 0; |
trk_ext_track = 0; |
| 383 |
calo_track = 0; |
trk_track = 0; |
| 384 |
tof_track = 0; |
calo_track = 0; |
| 385 |
orb_track = 0; |
tof_track = 0; |
| 386 |
|
orb_track = 0; |
| 387 |
|
if(e) |
| 388 |
|
trk_ext_track = new ExtTrack(*e); |
| 389 |
if (t) |
if (t) |
| 390 |
trk_track = new TrkTrack(*t); |
trk_track = new TrkTrack(*t); |
| 391 |
if (c) |
if (c) |
| 394 |
tof_track = new ToFTrkVar(*o); |
tof_track = new ToFTrkVar(*o); |
| 395 |
if (r) |
if (r) |
| 396 |
orb_track = new OrbitalInfoTrkVar(*r); |
orb_track = new OrbitalInfoTrkVar(*r); |
| 397 |
|
|
| 398 |
candeleteobj = 1; |
candeleteobj = 1; |
| 399 |
pscore = 0; |
pscore = 0; |
| 400 |
iscore = 0; |
iscore = 0; |
| 401 |
|
|
| 402 |
} |
} |
| 403 |
void PamTrack::Clear() { |
void PamTrack::Clear(Option_t *option) { |
| 404 |
|
|
| 405 |
// cout << "PamTrack::Clear() "<<candeleteobj<<endl; |
// cout << "PamTrack::Clear( "<<option<<" ) "<<candeleteobj<<endl; |
| 406 |
if (candeleteobj) { |
if (candeleteobj) { |
| 407 |
|
|
| 408 |
if (trk_ext_track) |
if (trk_ext_track) |
| 409 |
trk_ext_track->ExtTrack::Clear(); |
trk_ext_track->ExtTrack::Clear(option); |
| 410 |
if (trk_track) |
if (trk_track) |
| 411 |
trk_track->TrkTrack::Clear(); |
trk_track->TrkTrack::Clear(); |
| 412 |
if (calo_track) |
if (calo_track) |
| 431 |
// cout << "PamTrack::Delete() "<<candeleteobj<<endl; |
// cout << "PamTrack::Delete() "<<candeleteobj<<endl; |
| 432 |
if (candeleteobj) { |
if (candeleteobj) { |
| 433 |
if (trk_ext_track) { |
if (trk_ext_track) { |
| 434 |
trk_ext_track->ExtTrack::Clear(); |
trk_ext_track->ExtTrack::Clear("C"); |
| 435 |
delete trk_ext_track; |
delete trk_ext_track; |
| 436 |
} |
} |
| 437 |
if (trk_track) { |
if (trk_track) { |
| 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; |
| 577 |
gltsync = 0; // Emiliano |
gltsync = 0; // Emiliano |
| 578 |
fUpdateRunInfo = true; // Emiliano |
fUpdateRunInfo = true; // Emiliano |
| 579 |
fUseDBinRunInfo = true; // Emiliano |
fUseDBinRunInfo = true; // Emiliano |
| 580 |
|
fDiscarded = false; //EM |
| 581 |
isSync = false; // by default assume that the level2 file(s) is(are) not sinchronized between L0/DB and L2, that is we miss some packets in L2 due to nested/DV-skipped events |
isSync = false; // by default assume that the level2 file(s) is(are) not sinchronized between L0/DB and L2, that is we miss some packets in L2 due to nested/DV-skipped events |
| 582 |
il0entry = 0LL; |
il0entry = 0LL; |
| 583 |
// hasL0EE = true; |
// hasL0EE = true; |
| 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 |
; |
; |
| 1478 |
// create TCloneArrays to store tracks and its images |
// create TCloneArrays to store tracks and its images |
| 1479 |
if (!tsorted) |
if (!tsorted) |
| 1480 |
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1481 |
tsorted->Delete(); |
tsorted->Clear("C+C");//Delete(); |
| 1482 |
TClonesArray &ttsorted = *tsorted; |
TClonesArray &ttsorted = *tsorted; |
| 1483 |
|
|
| 1484 |
if (!timage) |
if (!timage) |
| 1485 |
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 1486 |
timage->Delete(); |
timage->Clear("C+C");//Delete(); |
| 1487 |
TClonesArray &ttimage = *timage; |
TClonesArray &ttimage = *timage; |
| 1488 |
|
|
| 1489 |
|
|
| 2019 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2020 |
// create/reset TCloneArrays to store tracks and their images |
// create/reset TCloneArrays to store tracks and their images |
| 2021 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2022 |
|
|
| 2023 |
|
// cout << " PamLevel2::SortTracksNew() --- Clear TClonesArray objects"<<endl; |
| 2024 |
|
|
| 2025 |
// main tracks from standard alg |
// main tracks from standard alg |
| 2026 |
if (!tsorted) |
// if (!tsorted) |
| 2027 |
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
// tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2028 |
tsorted->Delete(); |
// tsorted->Clear("C+C");//Delete(); |
| 2029 |
// track images from standard alg |
// // track images from standard alg |
| 2030 |
if (!timage) |
// if (!timage) |
| 2031 |
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
// timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2032 |
timage->Delete(); |
// timage->Clear("C+C");//Delete(); |
| 2033 |
// tracks from extended algorythm |
// // tracks from extended algorythm |
| 2034 |
if(EXT && !text) |
// if(EXT && !text) |
| 2035 |
text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
// text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
| 2036 |
if(text)text->Delete(); |
// if(text)text->Clear("C+C");//Delete(); |
| 2037 |
|
|
| 2038 |
|
if(tsorted)delete tsorted; |
| 2039 |
|
if(timage) delete timage; |
| 2040 |
|
if(text) delete text; |
| 2041 |
|
tsorted = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2042 |
|
timage = new TClonesArray("PamTrack", trk2_obj->GetNTracks()); |
| 2043 |
|
text = new TClonesArray("PamTrack",trk_ext_obj->GetEntries()); |
| 2044 |
|
|
| 2045 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2046 |
// create/reset TCloneArrays to store tracks and their images |
// create/reset TCloneArrays to store tracks and their images |
| 2047 |
//----------------------------------------------------------- |
//----------------------------------------------------------- |
| 2048 |
if(NUC){ |
if(NUC){ |
| 2049 |
|
|
| 2050 |
|
|
| 2051 |
|
if(tsorted_nuc)delete tsorted_nuc; |
| 2052 |
|
if(timage_nuc) delete timage_nuc; |
| 2053 |
|
if(text_nuc) delete text_nuc; |
| 2054 |
|
tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2055 |
|
timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2056 |
|
text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
| 2057 |
|
|
| 2058 |
// main tracks from standard alg |
// main tracks from standard alg |
| 2059 |
if (!tsorted_nuc) |
// if (!tsorted_nuc) |
| 2060 |
tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
// tsorted_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2061 |
tsorted_nuc->Delete(); |
// tsorted_nuc->Clear("C+C");//Delete(); |
| 2062 |
// track images from standard alg |
// // track images from standard alg |
| 2063 |
if (!timage_nuc) |
// if (!timage_nuc) |
| 2064 |
timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
// timage_nuc = new TClonesArray("PamTrack", trk2_nuc_obj->GetNTracks()); |
| 2065 |
timage_nuc->Delete(); |
// timage_nuc->Clear("C+C");//Delete(); |
| 2066 |
// tracks from extended algorythm |
// // tracks from extended algorythm |
| 2067 |
if(EXT && !text_nuc) |
// if(EXT && !text_nuc) |
| 2068 |
text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
// text_nuc = new TClonesArray("PamTrack",trk_ext_nuc_obj->GetEntries()); |
| 2069 |
if(text_nuc)text_nuc->Delete(); |
// if(text_nuc)text_nuc->Clear("C+C");//Delete(); |
| 2070 |
|
|
| 2071 |
} |
} |
| 2072 |
//-------------------------------------------------- |
//-------------------------------------------------- |
| 2073 |
// retrieve sorting method |
// retrieve sorting method |
| 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 |
|
|
| 4821 |
TFile *f = new TFile(name.Data()); |
TFile *f = new TFile(name.Data()); |
| 4822 |
if (!f || f->IsZombie()) { |
if (!f || f->IsZombie()) { |
| 4823 |
cout << "File: " << f->GetName() << " discarded ---- Non valid root file" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Non valid root file" << endl; |
| 4824 |
|
fDiscarded = true; |
| 4825 |
return false; |
return false; |
| 4826 |
} |
} |
| 4827 |
// cout << "Get list of keys: "<<f<<endl; |
// cout << "Get list of keys: "<<f<<endl; |
| 4860 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4861 |
cout << "File: " << f->GetName() << " discarded ---- SelectionList tree has " << nevt |
cout << "File: " << f->GetName() << " discarded ---- SelectionList tree has " << nevt |
| 4862 |
<< " events instead of " << nev << endl; |
<< " events instead of " << nev << endl; |
| 4863 |
|
fDiscarded = true; |
| 4864 |
return false; |
return false; |
| 4865 |
} |
} |
| 4866 |
nev = nevt; |
nev = nevt; |
| 4875 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4876 |
cout << "File: " << f->GetName() << " discarded ---- Trigger tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Trigger tree has " << nevt << " events instead of " |
| 4877 |
<< nev << endl; |
<< nev << endl; |
| 4878 |
|
fDiscarded = true; |
| 4879 |
return false; |
return false; |
| 4880 |
} |
} |
| 4881 |
nev = nevt; |
nev = nevt; |
| 4889 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4890 |
cout << "File: " << f->GetName() << " discarded ---- ToF tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- ToF tree has " << nevt << " events instead of " << nev |
| 4891 |
<< endl; |
<< endl; |
| 4892 |
|
fDiscarded = true; |
| 4893 |
return false; |
return false; |
| 4894 |
} |
} |
| 4895 |
nev = nevt; |
nev = nevt; |
| 4903 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4904 |
cout << "File: " << f->GetName() << " discarded ---- S4 tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- S4 tree has " << nevt << " events instead of " << nev |
| 4905 |
<< endl; |
<< endl; |
| 4906 |
|
fDiscarded = true; |
| 4907 |
return false; |
return false; |
| 4908 |
} |
} |
| 4909 |
nev = nevt; |
nev = nevt; |
| 4918 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4919 |
cout << "File: " << f->GetName() << " discarded ---- NeutronD tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- NeutronD tree has " << nevt << " events instead of " |
| 4920 |
<< nev << endl; |
<< nev << endl; |
| 4921 |
|
fDiscarded = true; |
| 4922 |
return false; |
return false; |
| 4923 |
} |
} |
| 4924 |
nev = nevt; |
nev = nevt; |
| 4932 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4933 |
cout << "File: " << f->GetName() << " discarded ---- Anticounter tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Anticounter tree has " << nevt << " events instead of " |
| 4934 |
<< nev << endl; |
<< nev << endl; |
| 4935 |
|
fDiscarded = true; |
| 4936 |
return false; |
return false; |
| 4937 |
} |
} |
| 4938 |
nev = nevt; |
nev = nevt; |
| 4946 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4947 |
cout << "File: " << f->GetName() << " discarded ---- OrbitalInfo tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- OrbitalInfo tree has " << nevt << " events instead of " |
| 4948 |
<< nev << endl; |
<< nev << endl; |
| 4949 |
|
fDiscarded = true; |
| 4950 |
return false; |
return false; |
| 4951 |
} |
} |
| 4952 |
nev = nevt; |
nev = nevt; |
| 4960 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4961 |
cout << "File: " << f->GetName() << " discarded ---- Tracker tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Tracker tree has " << nevt << " events instead of " |
| 4962 |
<< nev << endl; |
<< nev << endl; |
| 4963 |
|
fDiscarded = true; |
| 4964 |
return false; |
return false; |
| 4965 |
} |
} |
| 4966 |
nev = nevt; |
nev = nevt; |
| 4984 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 4985 |
cout << "File: " << f->GetName() << " discarded ---- Calorimeter tree has " << nevt << " events instead of " |
cout << "File: " << f->GetName() << " discarded ---- Calorimeter tree has " << nevt << " events instead of " |
| 4986 |
<< nev << endl; |
<< nev << endl; |
| 4987 |
|
fDiscarded = true; |
| 4988 |
return false; |
return false; |
| 4989 |
} |
} |
| 4990 |
nev = nevt; |
nev = nevt; |
| 5007 |
if (nev && nevt != nev) { |
if (nev && nevt != nev) { |
| 5008 |
cout << "File: " << f->GetName() << " discarded ---- h20 tree has " << nevt << " events instead of " << nev |
cout << "File: " << f->GetName() << " discarded ---- h20 tree has " << nevt << " events instead of " << nev |
| 5009 |
<< endl; |
<< endl; |
| 5010 |
|
fDiscarded = true; |
| 5011 |
return false; |
return false; |
| 5012 |
} |
} |
| 5013 |
nev = nevt; |
nev = nevt; |
| 5020 |
SELLI = (Int_t) SELLI__ok; |
SELLI = (Int_t) SELLI__ok; |
| 5021 |
if (SELLI == 0 && SELLI__ok) { |
if (SELLI == 0 && SELLI__ok) { |
| 5022 |
cout << "File: " << f->GetName() << " discarded ---- found SelectionList (it is not a full-event file)" << endl; |
cout << "File: " << f->GetName() << " discarded ---- found SelectionList (it is not a full-event file)" << endl; |
| 5023 |
|
fDiscarded = true; |
| 5024 |
return false; |
return false; |
| 5025 |
} |
} |
| 5026 |
if (SELLI == 1 && !SELLI__ok) { |
if (SELLI == 1 && !SELLI__ok) { |
| 5027 |
cout << "File: " << f->GetName() << " discarded ---- SelectionList missing" << endl; |
cout << "File: " << f->GetName() << " discarded ---- SelectionList missing" << endl; |
| 5028 |
|
fDiscarded = true; |
| 5029 |
return false; |
return false; |
| 5030 |
} |
} |
| 5031 |
|
|
| 5064 |
|
|
| 5065 |
if (CAL1 && !CAL1__ok) { |
if (CAL1 && !CAL1__ok) { |
| 5066 |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel1 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel1 branch" << endl; |
| 5067 |
|
fDiscarded = true; |
| 5068 |
return false; |
return false; |
| 5069 |
}; |
}; |
| 5070 |
if (CAL2 && !CAL2__ok) { |
if (CAL2 && !CAL2__ok) { |
| 5071 |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel2 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing CaloLevel2 branch" << endl; |
| 5072 |
|
fDiscarded = true; |
| 5073 |
return false; |
return false; |
| 5074 |
}; |
}; |
| 5075 |
if (TRK2 && !TRK2__ok) { |
if (TRK2 && !TRK2__ok) { |
| 5076 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel2 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel2 branch" << endl; |
| 5077 |
|
fDiscarded = true; |
| 5078 |
return false; |
return false; |
| 5079 |
}; |
}; |
| 5080 |
if (TRK1 && !TRK1__ok) { |
if (TRK1 && !TRK1__ok) { |
| 5081 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel1 branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkLevel1 branch" << endl; |
| 5082 |
|
fDiscarded = true; |
| 5083 |
return false; |
return false; |
| 5084 |
}; |
}; |
| 5085 |
if (TRKh && !TRKh__ok) { |
if (TRKh && !TRKh__ok) { |
| 5086 |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkHough branch" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing TrkHough branch" << endl; |
| 5087 |
|
fDiscarded = true; |
| 5088 |
return false; |
return false; |
| 5089 |
}; |
}; |
| 5090 |
if (ORB && !ORB__ok) { |
if (ORB && !ORB__ok) { |
| 5091 |
cout << "File: " << f->GetName() << " discarded ---- Missing ORB tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ORB tree" << endl; |
| 5092 |
|
fDiscarded = true; |
| 5093 |
return false; |
return false; |
| 5094 |
}; |
}; |
| 5095 |
if (AC && !AC__ok) { |
if (AC && !AC__ok) { |
| 5096 |
cout << "File: " << f->GetName() << " discarded ---- Missing AC tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing AC tree" << endl; |
| 5097 |
|
fDiscarded = true; |
| 5098 |
return false; |
return false; |
| 5099 |
}; |
}; |
| 5100 |
if (S4 && !S4__ok) { |
if (S4 && !S4__ok) { |
| 5101 |
cout << "File: " << f->GetName() << " discarded ---- Missing S4 tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing S4 tree" << endl; |
| 5102 |
|
fDiscarded = true; |
| 5103 |
return false; |
return false; |
| 5104 |
}; |
}; |
| 5105 |
if (TOF && !TOF__ok) { |
if (TOF && !TOF__ok) { |
| 5106 |
cout << "File: " << f->GetName() << " discarded ---- Missing ToF tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ToF tree" << endl; |
| 5107 |
|
fDiscarded = true; |
| 5108 |
return false; |
return false; |
| 5109 |
}; |
}; |
| 5110 |
|
|
| 5111 |
if (ND && !ND__ok) { |
if (ND && !ND__ok) { |
| 5112 |
cout << "File: " << f->GetName() << " discarded ---- Missing ND tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing ND tree" << endl; |
| 5113 |
|
fDiscarded = true; |
| 5114 |
return false; |
return false; |
| 5115 |
}; |
}; |
| 5116 |
if (TRG && !TRG__ok) { |
if (TRG && !TRG__ok) { |
| 5117 |
cout << "File: " << f->GetName() << " discarded ---- Missing Trigger tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing Trigger tree" << endl; |
| 5118 |
|
fDiscarded = true; |
| 5119 |
return false; |
return false; |
| 5120 |
}; |
}; |
| 5121 |
if (GP && !GP__ok) { |
if (GP && !GP__ok) { |
| 5122 |
cout << "File: " << f->GetName() << " discarded ---- Missing h20 tree" << endl; |
cout << "File: " << f->GetName() << " discarded ---- Missing h20 tree" << endl; |
| 5123 |
|
fDiscarded = true; |
| 5124 |
return false; |
return false; |
| 5125 |
}; |
}; |
| 5126 |
|
|
| 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 |
} |
} |
| 5467 |
for (Int_t i = 0; i < NCLONES; i++) { |
for (Int_t i = 0; i < NCLONES; i++) { |
| 5468 |
if (pam_tree_clone[i]) { |
if (pam_tree_clone[i]) { |
| 5469 |
cout << pam_tree_clone[i]->GetName() << endl; |
cout << pam_tree_clone[i]->GetName() << endl; |
| 5470 |
pam_tree_clone[i]->Write(); |
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 |
} |
} |