660 |
UInt_t tjump = 50000; |
UInt_t tjump = 50000; |
661 |
//UInt_t tjump = 100; |
//UInt_t tjump = 100; |
662 |
while ( tjump > 0 ){ |
while ( tjump > 0 ){ |
663 |
pktlast = numeric_limits<UInt_t>::max(); |
// pktlast = numeric_limits<UInt_t>::max(); |
664 |
while ( pktlast > chpktmax && (Int_t)(nevent-1-it) >= 0 ){ |
pktlast = chpktmax + 1; |
665 |
|
while ( PKT(pktlast) > PKT(chpktmax) && (Int_t)(nevent-1-it) >= 0 ){ |
666 |
if ( (Int_t)(nevent-1-it) >= 0 ){ |
if ( (Int_t)(nevent-1-it) >= 0 ){ |
667 |
T->GetEntry(nevent-1-it); |
T->GetEntry(nevent-1-it); |
668 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
670 |
} else { |
} else { |
671 |
pktlast = chpktmax + 1; |
pktlast = chpktmax + 1; |
672 |
}; |
}; |
673 |
if ( (!(it%1000) || abs((int)pktlast - (int)chpktmax)<1000 ) && debug ) printf(" look for up %i %i %i nevent %u (nevent-1-it) %i \n",it,pktlast,chpktmax,nevent,(Int_t)(nevent-1-it)); |
if ( (!(it%1000) || abs((int)(PKT(pktlast) - PKT(chpktmax)))<1000 ) && debug ) printf(" look for up %i %i %i nevent %u (nevent-1-it) %i \n",it,pktlast,chpktmax,nevent,(Int_t)(nevent-1-it)); |
674 |
it += tjump; |
it += tjump; |
675 |
}; |
}; |
676 |
if ( tjump > 1 ) it -= 2*tjump; |
if ( tjump > 1 ) it -= 2*tjump; |
694 |
tjump = 50000; |
tjump = 50000; |
695 |
//tjump = 100; |
//tjump = 100; |
696 |
while ( tjump > 0 ){ |
while ( tjump > 0 ){ |
697 |
pktlast = 0; |
// pktlast = 0; |
698 |
while ( pktlast < chpktmin && it < (Int_t)nevent ){ |
pktlast = chpktmin - 1; |
699 |
|
if ( debug ) printf("LLlook for down %i %i %llu %llu \n",it,pktlast,PKT(pktlast),PKT(chpktmin)); |
700 |
|
while ( PKT(pktlast) < PKT(chpktmin) && it < (Int_t)nevent ){ |
701 |
if ( it < (Int_t)nevent ){ |
if ( it < (Int_t)nevent ){ |
702 |
T->GetEntry(it); |
T->GetEntry(it); |
703 |
ph = eh->GetPscuHeader(); |
ph = eh->GetPscuHeader(); |
4895 |
// |
// |
4896 |
}; |
}; |
4897 |
// |
// |
4898 |
|
|
4899 |
|
if( !(MISSING_pkt1&MISSING_pkt2) ){ |
4900 |
|
this->HandleTRK_CALIB(!MISSING_pkt1,!MISSING_pkt2); |
4901 |
|
ncalib++; |
4902 |
|
if( MISSING_pkt1||MISSING_pkt2||!valid )try_to_recover=true; |
4903 |
|
} |
4904 |
|
|
4905 |
|
|
4906 |
} else { |
} else { |
4907 |
// |
// |
4908 |
if ( IsDebug() ) printf(" Trk calibration1 at time %u obt %u pkt %u OUTSIDE the considered time interval \n",fromtime,obt1,pkt1); |
if ( IsDebug() ) printf(" Trk calibration1 at time %u obt %u pkt %u OUTSIDE the considered time interval \n",fromtime,obt1,pkt1); |
4909 |
// if ( PEDANTIC ) throw -79; |
// if ( PEDANTIC ) throw -79; |
4910 |
// |
// |
4911 |
}; |
}; |
4912 |
// |
// |
4913 |
|
|
|
if( !(MISSING_pkt1&MISSING_pkt2) ){ |
|
|
this->HandleTRK_CALIB(!MISSING_pkt1,!MISSING_pkt2); |
|
|
ncalib++; |
|
|
if( MISSING_pkt1||MISSING_pkt2||!valid )try_to_recover=true; |
|
|
} |
|
|
|
|
4914 |
}; //end loop on pkt1 |
}; //end loop on pkt1 |
4915 |
|
|
4916 |
|
|
5135 |
// ------------------------------------------------------ |
// ------------------------------------------------------ |
5136 |
// ... retrieve the calibration packets. |
// ... retrieve the calibration packets. |
5137 |
// ------------------------------------------------------ |
// ------------------------------------------------------ |
5138 |
TFile *file = new TFile((TString)gSystem->ExpandPathName(path)+"/"+name); // EM, path could be symbolic and we must expand it |
if ( IsDebug() ) printf(" file is %s/%s \n",((TString)gSystem->ExpandPathName(path.Data())).Data(),name.Data()); |
5139 |
|
TFile *file = new TFile(((TString)gSystem->ExpandPathName(path.Data()))+"/"+name); // EM, path could be symbolic and we must expand it |
5140 |
if(!file)throw -100; |
if(!file)throw -100; |
5141 |
if(file->IsZombie())throw -100; |
if(file->IsZombie())throw -100; |
5142 |
// |
// |