119 |
|
|
120 |
run_obj = 0;//new GL_RUN(); |
run_obj = 0;//new GL_RUN(); |
121 |
soft_obj = 0;// Emiliano |
soft_obj = 0;// Emiliano |
122 |
irun = -1; |
irun = -1LL; |
123 |
runfirstentry = 0ULL; |
runfirstentry = 0LL; |
124 |
runlastentry = 0ULL; |
runlastentry = 0LL; |
125 |
|
|
126 |
l0_file = NULL; |
l0_file = NULL; |
127 |
l0_tree = NULL; |
l0_tree = NULL; |
130 |
|
|
131 |
prevshift = 0; |
prevshift = 0; |
132 |
|
|
|
irun = -1; |
|
133 |
run_tree = NULL; |
run_tree = NULL; |
134 |
run_tree_clone = NULL; |
run_tree_clone = NULL; |
135 |
sel_tree = NULL; |
sel_tree = NULL; |
136 |
sel_tree_clone = NULL; |
sel_tree_clone = NULL; |
137 |
|
|
138 |
irunentry = -1; |
irunentry = -1LL; |
139 |
pam_tree = NULL; |
pam_tree = NULL; |
140 |
for(Int_t i=0; i<NCLONES; i++ )pam_tree_clone[i]=NULL; |
for(Int_t i=0; i<NCLONES; i++ )pam_tree_clone[i]=NULL; |
141 |
|
|
244 |
// if(soft_obj) soft_obj->Clear(); |
// if(soft_obj) soft_obj->Clear(); |
245 |
|
|
246 |
if(h0_obj) h0_obj->Clear(); |
if(h0_obj) h0_obj->Clear(); |
247 |
if(trk0_obj) trk0_obj->Clear(); |
// if(trk0_obj) trk0_obj->Clear(); |
248 |
if(calo0_obj) calo0_obj->Clear(); |
if(calo0_obj) calo0_obj->Clear(); |
249 |
if(trk1_obj) trk1_obj->Clear(); |
if(trk1_obj) trk1_obj->Clear(); |
250 |
if(trk2_obj) trk2_obj->Clear(); |
if(trk2_obj) trk2_obj->Clear(); |
1520 |
* @param run Pointer to the chain/tree which contains run infos |
* @param run Pointer to the chain/tree which contains run infos |
1521 |
* @return true if a new run has been read, false if it is still the same run |
* @return true if a new run has been read, false if it is still the same run |
1522 |
*/ |
*/ |
1523 |
Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev){ |
Bool_t PamLevel2::UpdateRunInfo(TChain *run, Long64_t iev){ |
1524 |
// |
// |
1525 |
// check if we have already called once GetEntry, if not call it |
// check if we have already called once GetEntry, if not call it |
1526 |
// |
// |
1527 |
if ( run->GetEntries() <= 0 ) return(false); |
if ( run->GetEntries() <= 0 ) return(false); |
1528 |
// |
// |
1529 |
|
|
1530 |
Int_t oldrun = irun; |
// Int_t oldrun = irun; |
1531 |
|
Long64_t oldrun = irun; |
1532 |
// -------------------------------------- |
// -------------------------------------- |
1533 |
// if it is a full file (not preselected) |
// if it is a full file (not preselected) |
1534 |
// -------------------------------------- |
// -------------------------------------- |
1535 |
if(SELLI==0){ |
if(SELLI==0){ |
|
if ( irun < 0 ){ |
|
|
irun = 0; |
|
|
run->GetEntry(irun); |
|
|
runfirstentry = 0ULL; |
|
|
runlastentry += (ULong64_t)(this->GetRunInfo()->NEVENTS); |
|
|
if ( (ULong64_t)(this->GetRunInfo()->NEVENTS) > 0ULL ) runlastentry -= 1ULL; |
|
|
return(true); |
|
|
}; |
|
1536 |
|
|
1537 |
if( !GetOrbitalInfo() ){ |
if( !GetOrbitalInfo() ){ |
1538 |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing OrbitalInfo "<<endl; |
cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing OrbitalInfo "<<endl; |
1539 |
return(false); |
return(false); |
1540 |
} |
} |
1541 |
|
|
1542 |
|
if ( irun < 0 ){ |
1543 |
|
irun = 0; |
1544 |
|
run->GetEntry(irun); |
1545 |
|
runfirstentry = 0LL; |
1546 |
|
runlastentry += (Long64_t)(this->GetRunInfo()->NEVENTS); |
1547 |
|
if ( (Long64_t)(this->GetRunInfo()->NEVENTS) > 0LL ) runlastentry -= 1LL; |
1548 |
|
// cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1549 |
|
// cout << "runfirstentry "<<runfirstentry<<endl; |
1550 |
|
// return(true); |
1551 |
|
}; |
1552 |
|
|
1553 |
// modificato il controllo sull'aggiornamento del run, per evitare problemi |
// modificato il controllo sull'aggiornamento del run, per evitare problemi |
1554 |
// dovuti agli eventi annidati (NB! NEVENTS conta anche questi!!) |
// dovuti agli eventi annidati (NB! NEVENTS conta anche questi!!) |
1555 |
// |
// |
1556 |
bool fromfirst = true; |
bool fromfirst = true; |
1557 |
// |
// |
1558 |
while ( !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME) && irun < run->GetEntries() ){ |
while ( !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME) && irun < run->GetEntries()-1 ){ |
1559 |
// while ( iev > (runfirstentry+(ULong64_t)(this->GetRunInfo()->NEVENTS-1)) && irun < run->GetEntries() ){ |
// while ( iev > (runfirstentry+(ULong64_t)(this->GetRunInfo()->NEVENTS-1)) && irun < run->GetEntries() ){ |
1560 |
irun++; |
irun++; |
1561 |
run->GetEntry(irun); |
run->GetEntry(irun); |
1562 |
runfirstentry = runlastentry; |
runfirstentry = runlastentry; |
1563 |
if ( (ULong64_t)(this->GetRunInfo()->NEVENTS) > 0ULL ) runfirstentry += 1ULL; |
if ( (Long64_t)(this->GetRunInfo()->NEVENTS) > 0LL ) runfirstentry += 1LL; |
1564 |
runlastentry += (ULong64_t)(this->GetRunInfo()->NEVENTS); |
runlastentry += (Long64_t)(this->GetRunInfo()->NEVENTS); |
1565 |
|
// cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1566 |
|
// cout << "runfirstentry "<<runfirstentry<<endl; |
1567 |
// printf(" iev %llu %u %llu \n",iev,this->GetRunInfo()->NEVENTS,(ULong64_t)(runfirstentry+(ULong64_t)(this->GetRunInfo()->NEVENTS))); |
// printf(" iev %llu %u %llu \n",iev,this->GetRunInfo()->NEVENTS,(ULong64_t)(runfirstentry+(ULong64_t)(this->GetRunInfo()->NEVENTS))); |
1568 |
// printf(" abstime %u trailertime %u \n",GetOrbitalInfo()->absTime,GetRunInfo()->RUNTRAILER_TIME); |
// printf(" abstime %u trailertime %u \n",GetOrbitalInfo()->absTime,GetRunInfo()->RUNTRAILER_TIME); |
1569 |
// printf(" IDRUN %u \n",GetRunInfo()->ID); |
// printf(" IDRUN %u \n",GetRunInfo()->ID); |
1570 |
// |
// |
1571 |
prevshift = 0; |
// prevshift = 0; |
1572 |
// |
// |
1573 |
if ( irun == run->GetEntries()-1 && fromfirst && !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME)){ |
if ( irun == run->GetEntries()-1 && fromfirst && !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME)){ |
1574 |
// printf(" resetting irun \n"); |
printf(" resetting irun (it should NOT happen!!!)\n"); |
1575 |
fromfirst = false; |
fromfirst = false; |
1576 |
irun = 0; |
irun = 0; |
1577 |
run->GetEntry(irun); |
run->GetEntry(irun); |
1578 |
runfirstentry = 0ULL; |
runfirstentry = 0ULL; |
1579 |
runlastentry += (ULong64_t)(this->GetRunInfo()->NEVENTS); |
runlastentry += (Long64_t)(this->GetRunInfo()->NEVENTS); |
1580 |
if ( (ULong64_t)(this->GetRunInfo()->NEVENTS) > 0ULL ) runlastentry -= 1ULL; |
if ( (Long64_t)(this->GetRunInfo()->NEVENTS) > 0LL ) runlastentry -= 1LL; |
1581 |
}; |
}; |
1582 |
// |
// |
1583 |
}; |
}; |
1584 |
// |
// |
1585 |
if ( !fromfirst && !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME) ) printf(" Something very wrong here: cannot find RUN containing absolute time %u \n",GetOrbitalInfo()->absTime); |
if ( !fromfirst && |
1586 |
|
!(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && |
1587 |
|
GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME) |
1588 |
|
) { |
1589 |
|
printf(" Something very wrong here: cannot find RUN containing absolute time %u \n",GetOrbitalInfo()->absTime); |
1590 |
|
return false; |
1591 |
|
} |
1592 |
// |
// |
1593 |
if ( irun == oldrun || irun >= run->GetEntries() ) return(false); |
if ( irun == oldrun || irun >= run->GetEntries() ) return(false); |
1594 |
// |
// |
1595 |
// printf(" iev %llu irun %i nevents %u 1st %llu last %llu \n",iev,irun,this->GetRunInfo()->NEVENTS,(ULong64_t)runfirstentry,(ULong64_t)runlastentry); |
// printf(" iev %llu irun %i nevents %u 1st %llu last %llu \n",iev,irun,this->GetRunInfo()->NEVENTS,(ULong64_t)runfirstentry,(ULong64_t)runlastentry); |
1596 |
// |
// |
1597 |
|
prevshift = 0; |
1598 |
|
cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1599 |
|
cout << "runfirstentry "<<runfirstentry<<endl; |
1600 |
return(true); |
return(true); |
1601 |
}; |
}; |
1602 |
// ---------------------------------------------------- |
// ---------------------------------------------------- |
1607 |
sel_tree->GetEntry(iev); |
sel_tree->GetEntry(iev); |
1608 |
if(irun != oldrun){ |
if(irun != oldrun){ |
1609 |
run->GetEntry(irun); |
run->GetEntry(irun); |
1610 |
|
cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1611 |
|
prevshift = 0; |
1612 |
return true; |
return true; |
1613 |
} |
} |
1614 |
return false; |
return false; |
1617 |
return false; |
return false; |
1618 |
// |
// |
1619 |
}; |
}; |
1620 |
|
|
1621 |
|
// Bool_t PamLevel2::UpdateRunInfo(ULong64_t iev){ |
1622 |
|
// // |
1623 |
|
// // check if we have already called once GetEntry, if not call it |
1624 |
|
// // |
1625 |
|
// if(!run_tree){ |
1626 |
|
// cout << " Bool_t PamLevel2::UpdateRunInfo(ULong64_t iev) -- ERROR -- run tree not loaded"<<endl; |
1627 |
|
// return false; |
1628 |
|
// } |
1629 |
|
// if ( run_tree->GetEntries() <= 0 ) { |
1630 |
|
// cout << " Bool_t PamLevel2::UpdateRunInfo(ULong64_t iev) -- ERROR -- run tree is empty"<<endl; |
1631 |
|
// return(false); |
1632 |
|
// } |
1633 |
|
// // |
1634 |
|
|
1635 |
|
// Int_t oldrun = irun; |
1636 |
|
// // -------------------------------------- |
1637 |
|
// // if it is a full file (not preselected) |
1638 |
|
// // -------------------------------------- |
1639 |
|
// if(SELLI==0){ |
1640 |
|
|
1641 |
|
// if( !GetOrbitalInfo() ){ |
1642 |
|
// cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- missing OrbitalInfo "<<endl; |
1643 |
|
// return(false); |
1644 |
|
// } |
1645 |
|
|
1646 |
|
// if ( irun < 0 ){ |
1647 |
|
// irun = 0; |
1648 |
|
// run_tree->GetEntry(irun); |
1649 |
|
// runfirstentry = iev; |
1650 |
|
// if( iev != 0){ |
1651 |
|
// cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- WARNING -- "<<endl; |
1652 |
|
// } |
1653 |
|
// }; |
1654 |
|
|
1655 |
|
// bool fromfirst = true; |
1656 |
|
|
1657 |
|
// while ( !(GetOrbitalInfo()->absTime >= GetRunInfo()->RUNHEADER_TIME && GetOrbitalInfo()->absTime <= GetRunInfo()->RUNTRAILER_TIME) && irun < run->GetEntries() ){ |
1658 |
|
// irun++; |
1659 |
|
// if( irun == run->GetEntries() ){ |
1660 |
|
// if(!fromfirst){ |
1661 |
|
// cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- event entry #"<<iev<<" does not belong to any run (should not happen)" <<endl; |
1662 |
|
// return false; |
1663 |
|
// } |
1664 |
|
// cout << "Bool_t PamLevel2::UpdateRunInfo(TChain *run, ULong64_t iev) -- ERROR -- reached end of run tree. searchin again from beginning (should not happen)" <<endl; |
1665 |
|
// fromfirst = false; |
1666 |
|
// irun =0; |
1667 |
|
// } |
1668 |
|
// run_tree->GetEntry(irun); |
1669 |
|
// runfirstentry = iev; |
1670 |
|
// }; |
1671 |
|
// // |
1672 |
|
// if ( irun == oldrun ) return(false); |
1673 |
|
// // |
1674 |
|
// cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1675 |
|
// cout << "runfirstentry "<<runfirstentry<<endl; |
1676 |
|
// prevshift = 0; |
1677 |
|
// return(true); |
1678 |
|
// }; |
1679 |
|
// // ---------------------------------------------------- |
1680 |
|
// // if it is a preselected file (there is SelectionList) |
1681 |
|
// // NBNB - the event tree MUST be read first |
1682 |
|
// // ---------------------------------------------------- |
1683 |
|
// if(SELLI==1){ |
1684 |
|
// sel_tree->GetEntry(iev); |
1685 |
|
// if(irun != oldrun){ |
1686 |
|
// run->GetEntry(irun); |
1687 |
|
// cout << " ))))) UPDATE RUN INFO ((((( @iev "<<iev<<" run "<<GetRunInfo()->ID<<" irun "<<irun<<endl; |
1688 |
|
// prevshift = 0; |
1689 |
|
// return true; |
1690 |
|
// } |
1691 |
|
// return false; |
1692 |
|
// } |
1693 |
|
|
1694 |
|
// return false; |
1695 |
|
// // |
1696 |
|
// }; |
1697 |
/** |
/** |
1698 |
* Update the runinfo informations (to be used to have Run infos event by event basis) |
* Update the runinfo informations (to be used to have Run infos event by event basis) |
1699 |
* @param run Pointer to the chain/tree which contains run infos |
* @param run Pointer to the chain/tree which contains run infos |
1700 |
* @return true if a new run has been read, false if it is still the same run |
* @return true if a new run has been read, false if it is still the same run |
1701 |
*/ |
*/ |
1702 |
Bool_t PamLevel2::UpdateRunInfo(TTree *run, ULong64_t iev){ |
Bool_t PamLevel2::UpdateRunInfo(TTree *run, Long64_t iev){ |
1703 |
return(UpdateRunInfo((TChain*)run,iev)); |
return(UpdateRunInfo((TChain*)run,iev)); |
1704 |
}; |
}; |
1705 |
|
|
2479 |
/** |
/** |
2480 |
* Method to get level2-trees entry, the corresponding run entry and (if required) the level0 entry. |
* Method to get level2-trees entry, the corresponding run entry and (if required) the level0 entry. |
2481 |
*/ |
*/ |
2482 |
Int_t PamLevel2::GetEntry(Int_t iee){ |
//Int_t PamLevel2::GetEntry(Int_t iee){ |
2483 |
|
Int_t PamLevel2::GetEntry(Long64_t iee){ |
2484 |
|
|
2485 |
if(!pam_tree){ |
if(!pam_tree){ |
2486 |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loaded"<<endl; |
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- level2 trees not loaded"<<endl; |
2496 |
// return 0; |
// return 0; |
2497 |
// } |
// } |
2498 |
|
|
2499 |
Int_t ii=0; |
Long64_t ii=0; |
2500 |
//------------------------------- |
//------------------------------- |
2501 |
ii = iee; |
ii = iee; |
2502 |
if( !pam_tree->GetEntry(ii) ) return 0; |
if( !pam_tree->GetEntry(ii) ){ |
2503 |
|
cout << " Int_t PamLevel2::GetEntry(Int_t) -- ERROR -- error reading pam tree"<<endl; |
2504 |
|
return 0; |
2505 |
|
} |
2506 |
// |
// |
2507 |
// ... that's way I put it here. Notice that nothing change in the code (is backward compatible) since in any case you return with 0. |
// ... that's way I put it here. Notice that nothing change in the code (is backward compatible) since in any case you return with 0. |
2508 |
// in theory one would like to return 1 if run is not loaded but now I don't have the will to add that 2 lines of code and it is not |
// in theory one would like to return 1 if run is not loaded but now I don't have the will to add that 2 lines of code and it is not |
2519 |
|
|
2520 |
//------------------------------- |
//------------------------------- |
2521 |
ii = iee; |
ii = iee; |
2522 |
Bool_t UPDATED = UpdateRunInfo(run_tree,ii); |
// Bool_t UPDATED = UpdateRunInfo(run_tree,ii); |
2523 |
|
Bool_t UPDATED = UpdateRunInfo(ii); |
2524 |
if(SELLI==0)irunentry = iee-runfirstentry; |
if(SELLI==0)irunentry = iee-runfirstentry; |
2525 |
if(UPDATED && run_tree_clone)run_tree_clone->Fill(); |
if(UPDATED && run_tree_clone)run_tree_clone->Fill(); |
2526 |
|
|
2633 |
cout << " TTree* PamLevel2::GetYodaTree( ) -- no DB connected... hai fatto qualche cazzata "<<endl; |
cout << " TTree* PamLevel2::GetYodaTree( ) -- no DB connected... hai fatto qualche cazzata "<<endl; |
2634 |
} |
} |
2635 |
|
|
2636 |
if ( TRK0 ) TrkParams::SetCalib(run_obj,dbc); |
if ( TRK0 ){ |
2637 |
|
TrkParams::Load(6); |
2638 |
|
if( !TrkParams::IsLoaded(6) ){ |
2639 |
|
cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- VK-mask not loaded"<<endl; |
2640 |
|
}; |
2641 |
|
TrkParams::SetCalib(run_obj,dbc); |
2642 |
|
TrkParams::LoadCalib( ); |
2643 |
|
if( !TrkParams::CalibIsLoaded() ){ |
2644 |
|
cout << " TTree* PamLevel2::GetYodaTree( ) -- WARNING -- Calibration not loaded"<<endl; |
2645 |
|
}; |
2646 |
|
} |
2647 |
|
|
2648 |
// cout << l0_tree << endl; |
// cout << l0_tree << endl; |
2649 |
|
|
2660 |
if(!GetYodaTree())return 0; |
if(!GetYodaTree())return 0; |
2661 |
|
|
2662 |
// patch |
// patch |
2663 |
if( (Int_t)irunentry < 0){ |
if( irunentry < 0){ |
2664 |
cout << "Int_t PamLevel2::GetYodaEntry() -- ATTENZIONE -- irunentry negativo?!?! "<<(Int_t)irunentry<<endl; |
cout << "Int_t PamLevel2::GetYodaEntry() -- ATTENZIONE -- irunentry negativo?!?! "<<(Int_t)irunentry<<endl; |
2665 |
irunentry=0; |
irunentry=0LL; |
2666 |
} |
} |
2667 |
// --------------------------------- |
// --------------------------------- |
2668 |
// if file is NOT a preselected file |
// if file is NOT a preselected file |
2669 |
// --------------------------------- |
// --------------------------------- |
2670 |
UInt_t quellagiusta = irunentry + run_obj->EV_FROM; |
Long64_t quellagiusta = irunentry + (Long64_t)(run_obj->EV_FROM); |
2671 |
|
|
2672 |
|
|
2673 |
// cout << " irun "<< irun << " irunentry "<< irunentry<<" run_obj->EV_FROM "<<run_obj->EV_FROM <<" quella giusta "<<quellagiusta << endl; |
// cout << " irun "<< irun << " irunentry "<< irunentry<<" run_obj->EV_FROM "<<run_obj->EV_FROM <<" quella giusta "<<quellagiusta << endl; |
2696 |
// printf(" siamo qui %i %i \n",shift,prevshift); |
// printf(" siamo qui %i %i \n",shift,prevshift); |
2697 |
do{ |
do{ |
2698 |
if(shift>0){ |
if(shift>0){ |
2699 |
cout << " level0 <--> level2 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" )"<<endl; |
cout << " level0 <--> level2 mismatch ( irun "<<irun<<" irunentry "<<irunentry<<" shift "<<shift<<" prevshift "<<prevshift<<" )"<<endl; |
2700 |
} |
} |
2701 |
answer = l0_tree->GetEntry(quellagiusta+shift+prevshift); |
answer = l0_tree->GetEntry(quellagiusta+(Long64_t)shift+(Long64_t)prevshift); |
2702 |
shift++; |
shift++; |
2703 |
if( !GetEventHeader() ){ |
if( !GetEventHeader() ){ |
2704 |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl; |
cout << "Int_t PamLevel2::GetYodaEntry() -- ERROR -- missing EventHeader "<<endl; |
2705 |
return 0; |
return 0; |
2706 |
} |
} |
2707 |
|
cout << "PKTNUM "<<shift<<" == L2 --- "<< GetOrbitalInfo()->pkt_num << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetCounter()<<endl; |
2708 |
|
// cout << " L2 --- "<< GetOrbitalInfo()->OBT << " --- L0 --- "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime()<<endl; |
2709 |
// if( (quellagiusta+shift) == l0_tree->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl; |
// if( (quellagiusta+shift) == l0_tree->GetEntries()+1 )cout << ">>> end of level0 tree <<<"<<endl; |
2710 |
// cout << " GetOrbitalInfo()->OBT "<< GetOrbitalInfo()->OBT << endl; |
// cout << " GetOrbitalInfo()->OBT "<< GetOrbitalInfo()->OBT << endl; |
2711 |
// cout << " GetEventHeader()->GetPscuHeader()->GetOrbitalTime() "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime() << endl; |
// cout << " GetEventHeader()->GetPscuHeader()->GetOrbitalTime() "<< GetEventHeader()->GetPscuHeader()->GetOrbitalTime() << endl; |
2713 |
// cout << " GetEventHeader()->GetPscuHeader()->GetCounter() "<< GetEventHeader()->GetPscuHeader()->GetCounter() << endl; |
// cout << " GetEventHeader()->GetPscuHeader()->GetCounter() "<< GetEventHeader()->GetPscuHeader()->GetCounter() << endl; |
2714 |
// printf(" IDRUN %u \n",GetRunInfo()->ID); |
// printf(" IDRUN %u \n",GetRunInfo()->ID); |
2715 |
// |
// |
2716 |
if ( prevshift != 0 && (quellagiusta+shift) == GetYodaTree()->GetEntries() ){ |
if ( prevshift != 0 && (quellagiusta+(Long64_t)shift) == GetYodaTree()->GetEntries() ){ |
2717 |
prevshift = 0; |
prevshift = 0; |
2718 |
shift = -1; |
shift = -1; |
2719 |
}; |
}; |
2720 |
|
|
2721 |
}while( ( GetOrbitalInfo()->OBT != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetOrbitalTime()) || GetOrbitalInfo()->pkt_num != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetCounter())) && (quellagiusta+shift) < GetYodaTree()->GetEntries() ); |
}while( ( GetOrbitalInfo()->OBT != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetOrbitalTime()) || GetOrbitalInfo()->pkt_num != (UInt_t)(GetEventHeader()->GetPscuHeader()->GetCounter())) && (quellagiusta+(Long64_t)shift) < GetYodaTree()->GetEntries() ); |
2722 |
|
|
2723 |
if ( (quellagiusta+shift) == GetYodaTree()->GetEntries() ) cout << " Big trouble here, no such event in Level0 data! " <<endl; |
if ( (quellagiusta+(Long64_t)shift) == GetYodaTree()->GetEntries() ) cout << " Big trouble here, no such event in Level0 data! " <<endl; |
2724 |
|
|
2725 |
// cout << "LA ENTRY GIUSTA E`: "<<quellagiusta<<" (spero...)"<<endl; |
// cout << "LA ENTRY GIUSTA E`: "<<quellagiusta<<" (spero...)"<<endl; |
2726 |
// return GetYodaTree()->GetEntry(quellagiusta); |
// return GetYodaTree()->GetEntry(quellagiusta); |