--- PamelaDigitizer/Digitizer.h 2007/10/31 18:17:59 1.3 +++ PamelaDigitizer/Digitizer.h 2007/12/05 13:02:50 1.4 @@ -32,8 +32,10 @@ static const int fPSCUbuffer = 8; - static const int fTRIGGERbuffer = 153; //(bytes) + static const int fTRIGGERbuffer = 152; //(bytes) static const int fTOFbuffer = 276; //(bytes) + static const int fRunHeaderbuffer = 27; // ?? + static const int fRunTrailerbuffer = 17; static const int fACbuffer = 128; static const int fNDbuffer = 6; static const int fS4buffer = 3; @@ -69,13 +71,16 @@ UShort_t fDataPSCU[fPSCUbuffer]; UInt_t fCounter; + UInt_t fCounterPhys; UInt_t fOBT; UShort_t fDataPadding[fPADbuffer]; UInt_t fPadding; - UChar_t fDataTrigger[fTRIGGERbuffer]; + UShort_t fDataRunHeader[fRunHeaderbuffer]; + UShort_t fDataRunTrailer[fRunTrailerbuffer]; + UChar_t fDataTrigger[fTRIGGERbuffer]; UChar_t fDataTof[fTOFbuffer]; UShort_t fDataAC[fACbuffer]; @@ -375,9 +380,12 @@ - void DigitizePSCU(UInt_t, UChar_t); // digitizes the CPU header + // void DigitizePSCU(UInt_t, UChar_t); // digitizes the CPU header + void DigitizePSCU(UInt_t, UChar_t, UShort_t*); // digitizes the CPU header void AddPadding(); - void DigitizeTRIGGER(); // digitizes the trigger + void DigitizeRunHeader(); + void DigitizeRunTrailer(); + // void DigitizeTRIGGER(); // SO nov'07: included in DigitizeTOF Int_t DigitizeTOF(); // digitizes the tof void DigitizeAC(); // digitizes the anti-counter void DigitizeND(); // digitizes the ND @@ -402,6 +410,8 @@ UChar_t Bin2GrayTof(UChar_t, UChar_t); void Crc8Tof(UChar_t*, UChar_t*); + UChar_t EvaluateCrcTrigger(UChar_t*, Int_t); + UShort_t* GetDataAC(){return(fDataAC);}; // retrieve AC data (not used right now) UShort_t* GetDataCALO(){return(fDataCALO);}; // retrieve AC data (not used right now) @@ -417,6 +427,8 @@ Float_t SaturationTrack(Float_t ADC); // Saturation simulation // end methods for Tracker + void WriteRunHeader(); + void WriteRunTrailer(); void WriteData(); // writes data to file void ReadData();