| 87 |
AC = true; |
AC = true; |
| 88 |
ORB = true; |
ORB = true; |
| 89 |
|
|
| 90 |
|
RUN = true; |
| 91 |
|
|
| 92 |
}; |
}; |
| 93 |
/** |
/** |
| 510 |
*/ |
*/ |
| 511 |
TTree *PamLevel2::GetPamTree(TFile *f, TString detlist ){ |
TTree *PamLevel2::GetPamTree(TFile *f, TString detlist ){ |
| 512 |
|
|
| 513 |
if( !detlist.IsNull() ) SetWhichTrees(detlist); |
// if( !detlist.IsNull() ) SetWhichTrees(detlist); |
| 514 |
else GetWhichTrees(f); |
// else GetWhichTrees(f); |
| 515 |
|
SetWhichTrees(detlist); |
| 516 |
|
|
| 517 |
TTree *Trout =0; |
TTree *Trout =0; |
| 518 |
|
|
| 521 |
|
|
| 522 |
UInt_t *found=0; |
UInt_t *found=0; |
| 523 |
|
|
| 524 |
|
cout<< "GetPamTree(TFile*,TString): detector list --> "; |
| 525 |
|
if(TRK1)cout<<"TRK1 "; |
| 526 |
|
if(TRK2)cout<<"TRK2 "; |
| 527 |
|
if(TRKh)cout<<"TRKH "; |
| 528 |
|
if(CAL1)cout<<"CAL1 "; |
| 529 |
|
if(CAL2)cout<<"CAL2 "; |
| 530 |
|
if(TOF)cout<<"TOF "; |
| 531 |
|
if(TRG)cout<<"TRG "; |
| 532 |
|
if(AC)cout<<"AC "; |
| 533 |
|
if(ND)cout<<"ND "; |
| 534 |
|
if(S4)cout<<"S4 "; |
| 535 |
|
if(ORB)cout<<"ORB "; |
| 536 |
|
cout << endl; |
| 537 |
|
|
| 538 |
|
f->cd(); |
| 539 |
|
|
| 540 |
// Tracker |
// Tracker |
| 541 |
TTree *T = (TTree*)f->Get("Tracker"); |
TTree *T = (TTree*)f->Get("Tracker"); |
| 542 |
if(T && (TRK2||TRK1||TRKh)) { |
if(T && (TRK2||TRK1||TRKh)) { |
| 568 |
}else{ |
}else{ |
| 569 |
cout << "Calorimeter : missing tree"<<endl; |
cout << "Calorimeter : missing tree"<<endl; |
| 570 |
}; |
}; |
| 571 |
|
|
| 572 |
// ToF |
// ToF |
| 573 |
TTree *O = (TTree*)f->Get("ToF"); |
TTree *O = (TTree*)f->Get("ToF"); |
| 574 |
if(O && TOF) { |
if(O && TOF) { |
| 749 |
|
|
| 750 |
TChain *Trout =0; |
TChain *Trout =0; |
| 751 |
|
|
| 752 |
if( !detlist.IsNull() )SetWhichTrees(detlist); |
// if( !detlist.IsNull() )SetWhichTrees(detlist); |
| 753 |
|
SetWhichTrees(detlist); |
| 754 |
|
|
| 755 |
|
cout<< "GetPamTree(TList*,TString): detector list --> "; |
| 756 |
|
if(TRK1)cout<<"TRK1 "; |
| 757 |
|
if(TRK2)cout<<"TRK2 "; |
| 758 |
|
if(TRKh)cout<<"TRKH "; |
| 759 |
|
if(CAL1)cout<<"CAL1 "; |
| 760 |
|
if(CAL2)cout<<"CAL2 "; |
| 761 |
|
if(TOF)cout<<"TOF "; |
| 762 |
|
if(TRG)cout<<"TRG "; |
| 763 |
|
if(AC)cout<<"AC "; |
| 764 |
|
if(ND)cout<<"ND "; |
| 765 |
|
if(S4)cout<<"S4 "; |
| 766 |
|
if(ORB)cout<<"ORB "; |
| 767 |
|
cout << endl; |
| 768 |
|
|
| 769 |
|
|
| 770 |
|
|
| 771 |
TChain *T = 0; |
TChain *T = 0; |
| 772 |
TChain *C = 0; |
TChain *C = 0; |
| 1157 |
*/ |
*/ |
| 1158 |
void PamLevel2::SetWhichTrees(TString detlist){ |
void PamLevel2::SetWhichTrees(TString detlist){ |
| 1159 |
|
|
| 1160 |
if(detlist.Contains("+ALL", TString::kIgnoreCase)){ |
if(detlist.IsNull() || detlist.Contains("+ALL", TString::kIgnoreCase)){ |
| 1161 |
CAL1 = true; |
CAL1 = true; |
| 1162 |
CAL2 = true; |
CAL2 = true; |
| 1163 |
TRK2 = true; |
TRK2 = true; |
| 1241 |
if( detlist.Contains("-ORB", TString::kIgnoreCase) )ORB = false; |
if( detlist.Contains("-ORB", TString::kIgnoreCase) )ORB = false; |
| 1242 |
else if( detlist.Contains("+ORB", TString::kIgnoreCase) )ORB = true; |
else if( detlist.Contains("+ORB", TString::kIgnoreCase) )ORB = true; |
| 1243 |
|
|
| 1244 |
cout<< "Set detector list --> "; |
// cout<< "Set detector list --> "; |
| 1245 |
if(TRK1)cout<<"TRK1 "; |
// if(TRK1)cout<<"TRK1 "; |
| 1246 |
if(TRK2)cout<<"TRK2 "; |
// if(TRK2)cout<<"TRK2 "; |
| 1247 |
if(TRKh)cout<<"TRKH "; |
// if(TRKh)cout<<"TRKH "; |
| 1248 |
if(CAL1)cout<<"CAL1 "; |
// if(CAL1)cout<<"CAL1 "; |
| 1249 |
if(CAL2)cout<<"CAL2 "; |
// if(CAL2)cout<<"CAL2 "; |
| 1250 |
if(TOF)cout<<"TOF "; |
// if(TOF)cout<<"TOF "; |
| 1251 |
if(TRG)cout<<"TRG "; |
// if(TRG)cout<<"TRG "; |
| 1252 |
if(AC)cout<<"AC "; |
// if(AC)cout<<"AC "; |
| 1253 |
if(ND)cout<<"ND "; |
// if(ND)cout<<"ND "; |
| 1254 |
if(S4)cout<<"S4 "; |
// if(S4)cout<<"S4 "; |
| 1255 |
if(ORB)cout<<"ORB "; |
// if(ORB)cout<<"ORB "; |
| 1256 |
cout << endl; |
// cout << endl; |
| 1257 |
|
|
| 1258 |
}; |
}; |
| 1259 |
|
|
| 1267 |
// ----------- |
// ----------- |
| 1268 |
// reset flags |
// reset flags |
| 1269 |
// ----------- |
// ----------- |
| 1270 |
Bool_t CAL1 = false; |
CAL1 = false; |
| 1271 |
Bool_t CAL2 = false; |
CAL2 = false; |
| 1272 |
Bool_t TRK2 = false; |
TRK2 = false; |
| 1273 |
Bool_t TRK1 = false; |
TRK1 = false; |
| 1274 |
Bool_t TRKh = false; |
TRKh = false; |
| 1275 |
Bool_t TRG = false; |
TRG = false; |
| 1276 |
Bool_t TOF = false; |
TOF = false; |
| 1277 |
Bool_t S4 = false; |
S4 = false; |
| 1278 |
Bool_t ND = false; |
ND = false; |
| 1279 |
Bool_t AC = false; |
AC = false; |
| 1280 |
Bool_t ORB = false; |
ORB = false; |
| 1281 |
|
|
| 1282 |
Bool_t RUN = false; |
RUN = false; |
| 1283 |
|
|
| 1284 |
cout << "Checking file: "<<f->GetName()<<endl; |
cout << "Checking file: "<<f->GetName()<<endl; |
| 1285 |
if( !f || f->IsZombie() ){ |
if( !f || f->IsZombie() ){ |
| 1390 |
}; |
}; |
| 1391 |
|
|
| 1392 |
lk->Delete(); |
lk->Delete(); |
| 1393 |
|
|
| 1394 |
|
// cout<< "Get detector list from input file --> "; |
| 1395 |
|
// if(TRK1)cout<<"TRK1 "; |
| 1396 |
|
// if(TRK2)cout<<"TRK2 "; |
| 1397 |
|
// if(TRKh)cout<<"TRKH "; |
| 1398 |
|
// if(CAL1)cout<<"CAL1 "; |
| 1399 |
|
// if(CAL2)cout<<"CAL2 "; |
| 1400 |
|
// if(TOF)cout<<"TOF "; |
| 1401 |
|
// if(TRG)cout<<"TRG "; |
| 1402 |
|
// if(AC)cout<<"AC "; |
| 1403 |
|
// if(ND)cout<<"ND "; |
| 1404 |
|
// if(S4)cout<<"S4 "; |
| 1405 |
|
// if(ORB)cout<<"ORB "; |
| 1406 |
|
// cout << endl; |
| 1407 |
|
|
| 1408 |
return ; |
return ; |
| 1409 |
|
|
| 1452 |
|
|
| 1453 |
while( (key = (TKey*)next()) ){ |
while( (key = (TKey*)next()) ){ |
| 1454 |
|
|
| 1455 |
// cout << key->GetName() << endl; |
// cout << key->GetName() << ""<<key->GetClassName()<<endl; |
| 1456 |
// cout << " Get tree: " << f->Get(key->GetName())<<endl; |
// cout << " Get tree: " << f->Get(key->GetName())<<endl; |
| 1457 |
// nev_previous = nev; |
// nev_previous = nev; |
| 1458 |
// cout << " n.entries "<< nev <<endl; |
// cout << " n.entries "<< nev <<endl; |
| 1459 |
// if( key->GetClassName()=="TTree" && nev_previous && nev != nev_previous ){ |
// if( key->GetClassName()=="TTree" && nev_previous && nev != nev_previous ){ |
| 1577 |
|
|
| 1578 |
}; |
}; |
| 1579 |
|
|
| 1580 |
|
// cout<< "CheckLevel2File(TString): detector list --> "; |
| 1581 |
|
// if(TRK1__ok)cout<<"TRK1 "; |
| 1582 |
|
// if(TRK2__ok)cout<<"TRK2 "; |
| 1583 |
|
// if(TRKh__ok)cout<<"TRKH "; |
| 1584 |
|
// if(CAL1__ok)cout<<"CAL1 "; |
| 1585 |
|
// if(CAL2__ok)cout<<"CAL2 "; |
| 1586 |
|
// if(TOF__ok)cout<<"TOF "; |
| 1587 |
|
// if(TRG__ok)cout<<"TRG "; |
| 1588 |
|
// if(AC__ok)cout<<"AC "; |
| 1589 |
|
// if(ND__ok)cout<<"ND "; |
| 1590 |
|
// if(S4__ok)cout<<"S4 "; |
| 1591 |
|
// if(ORB__ok)cout<<"ORB "; |
| 1592 |
|
// cout << endl; |
| 1593 |
|
|
| 1594 |
|
|
| 1595 |
if(!RUN__ok) { |
if(!RUN__ok) { |
| 1634 |
return false; |
return false; |
| 1635 |
}; |
}; |
| 1636 |
|
|
| 1637 |
if(ND && !ND__ok){ |
if(ND && !ND__ok){ |
| 1638 |
cout << "File: "<< f->GetName() <<" discarded ---- Missing ND tree"<< endl; |
cout << "File: "<< f->GetName() <<" discarded ---- Missing ND tree"<< endl; |
| 1639 |
return false; |
return false; |
| 1640 |
}; |
}; |
| 1641 |
if(TRG && !TRG__ok){ |
if(TRG && !TRG__ok){ |
| 1642 |
cout << "File: "<< f->GetName() <<" discarded ---- Missing Trigger tree"<< endl; |
cout << "File: "<< f->GetName() <<" discarded ---- Missing Trigger tree"<< endl; |
| 1643 |
return false; |
return false; |
| 1644 |
}; |
}; |
| 1645 |
|
|
|
|
|
|
|
|
|
|
|
| 1646 |
|
|
| 1647 |
lk->Delete(); |
lk->Delete(); |
| 1648 |
f->Close(); |
f->Close(); |
| 1649 |
|
|
| 1650 |
|
// cout<< "CheckLevel2File(TString): detector list --> "; |
| 1651 |
|
// if(TRK1)cout<<"TRK1 "; |
| 1652 |
|
// if(TRK2)cout<<"TRK2 "; |
| 1653 |
|
// if(TRKh)cout<<"TRKH "; |
| 1654 |
|
// if(CAL1)cout<<"CAL1 "; |
| 1655 |
|
// if(CAL2)cout<<"CAL2 "; |
| 1656 |
|
// if(TOF)cout<<"TOF "; |
| 1657 |
|
// if(TRG)cout<<"TRG "; |
| 1658 |
|
// if(AC)cout<<"AC "; |
| 1659 |
|
// if(ND)cout<<"ND "; |
| 1660 |
|
// if(S4)cout<<"S4 "; |
| 1661 |
|
// if(ORB)cout<<"ORB "; |
| 1662 |
|
// cout << endl; |
| 1663 |
|
|
| 1664 |
return true; |
return true; |
| 1665 |
|
|