infile>>tName>>nSigCut; pM->SetUniqueID(nSigCut); //n. of pedestal distribution sigmas used to create zero suppresion table
while(!infile.eof()){
infile>>dec>>r>>d>>a>>mean>>sigma>>hex>>hard;
+ if(rs.GetPad(iddl,r,d,a)>=0){ //the GetPad returns meaningful abs pad number
dig.SetPad(rs.GetPad(iddl,r,d,a));
dig.SetQ((Int_t)mean);
(*pM)(dig.PadChX(),dig.PadChY()) = sigma;
+ }
}
infile.close();
Log(Form("Pedestal file for DDL %i read successfully",iddl));
UInt_t pad = (fWord >> kbit12) & 0x3f; //pad info in raw word is between bits: 12...17
if(!CheckPad(pad)) continue;
Int_t charge = fWord & 0xfff;
+ if(GetPad(fDDLNumber,row,dilogic,pad)<0) continue;
fPad[fNPads] = GetPad(fDDLNumber,row,dilogic,pad);
fCharge[fNPads] = charge;
fNPads++;
// in case the charge from the channels
// has not been read or invalid arguments
- assert(0<=ddl&&ddl<=13);
- assert(1<=row&&row<=24);
- assert(1<=dil&&dil<=10);
- assert(0<=pad&&pad<=47);
-
+ //assert(0<=ddl&&ddl<=13); assert(1<=row&&row<=24); assert(1<=dil&&dil<=10); assert(0<=pad&&pad<=47);
+ /* clm */ //corrupted data from ddl aborts the pedestal run at the assert
+ if(ddl<0 || ddl >13 || row<1 || row >25 || dil<1 || dil >10 || pad<0 || pad >47 ) return -1;
+ /* clm */
Int_t a2y[6]={3,2,4,1,5,0}; //pady for a given padress (for single DILOGIC chip)
Int_t ch=ddl/2;
Int_t tmp=(24-row)/8;
Int_t pc=(ddl%2)?5-2*tmp:2*tmp;
-// Int_t px=(dil-1)*8+pad/6;
Int_t px=dil*8-pad/6-1; //flip according to Paolo (26-3-2008)
tmp=(ddl%2)?row-1:(24-row);