X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=HLT%2Fprograms%2Fread.cxx;h=f03d37127033cc3aefd8d2671891d63e5ce965dc;hp=66ed93236eae58326dfc6b6bba27dc502d73a911;hb=01ee3a4e4aed0d08b67d649754a38fb947f2546a;hpb=6f9dd32be6b0fd01d9f2158144716381e4004772 diff --git a/HLT/programs/read.cxx b/HLT/programs/read.cxx index 66ed93236ea..f03d3712703 100644 --- a/HLT/programs/read.cxx +++ b/HLT/programs/read.cxx @@ -13,8 +13,8 @@ Author: Constantin Loizides =0)&&(patch<6)) file.Init(slice,patch); else { Int_t srows[2]={0,175}; - file.Init(slice,0,srows); + patch=0; + file.Init(slice,patch,srows); } //Open the data file: @@ -94,14 +93,13 @@ int main(int argc,char **argv) //Loop over all digits on this padrow: for(UInt_t ndig=0; ndigfNDigit; ndig++) - //for(UInt_t ndig=digits->fNDigit;ndig>0;ndig--) { lrow=row; pad = dataPt[ndig].fPad; time = dataPt[ndig].fTime; charge = dataPt[ndig].fCharge; cout << "Padrow " << row << " pad " << (int)pad << " time " <<(int) time << " charge " << (int)charge << endl; - if(altroout) altromem.Write(row,pad,charge,time); + if(altroout) altromem.Write(row,pad,time,charge); } //Move the pointer to the next padrow: @@ -111,6 +109,33 @@ int main(int argc,char **argv) if(afile) { altromem.WriteFinal(); fclose(afile); + +#if 0 + //test Altro read + UShort_t rrow=0,rtime=0,rcharge=0; + UChar_t rpad=0; + afile=fopen(argv[4],"r"); + altromem.SetASCIIInput(afile); + while(altromem.Read(rrow,rpad,rtime,rcharge)){ + cout << "Padrow " << (int)rrow << " pad " << (int)rpad << " time " <<(int)rtime << " charge " << (int)rcharge << endl; + } + fclose(afile); +#endif +#if 0 + //test Altro read sequence + UShort_t rrow=0,rtime=0; + UChar_t rpad=0,n=100,i=100; + UShort_t *charges=new UShort_t[100]; + afile=fopen(argv[4],"r"); + altromem.SetASCIIInput(afile); + while(altromem.ReadSequence(rrow,rpad,rtime,i,&charges)){ + cout << "Padrow " << (int)rrow << " pad " << (int)rpad << " time " <<(int)rtime << " charges "; + for(UChar_t ii=0;ii