//#-*- Mode: c++ -*- // $Id$ #ifndef ALIALTRODECODER_H #define ALIALTRODECODER_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /** @file AliAltroDocoder.h @author Per Thomas Hille, Oystein Djuvsland @date @brief High performance decoder class for the RCU/Altro data format */ /////////////////////////////////////////////////////////////////////////////// /// /// This is the class for fast decoding of TPC/PHOS/EMCAL raw data // see .cxx file for more detailed comments. /// /////////////////////////////////////////////////////////////////////////////// #define DECODERERROR -3 #include #include using namespace std; #define DDL_32BLOCK_SIZE 5 #define MAX_BRANCHES 2 #define MAX_FEE_PER_BRANCH 16 #define MAX_ALTROS_PER_FEE 8 #define CHANNELS_PER_ALTRO 16 #define MAX_SAMPLES_PER_CHANNEL 1024 #define ALTRO_TRAILER_SIZE 4 #define MAX_TRAILER_WORDS 3 class AliAltroData; class AliAltroDecoder: public TObject { public: AliAltroDecoder(); virtual ~AliAltroDecoder(); Bool_t Decode(); Bool_t NextChannel(AliAltroData *altroDataPtr); /** * Copy the original 10/40 bit encecoded data of the current channel. * The funtions copies the data to the end of the provided buffer. * @param pBuffer target buffer * @param bufferSize size of target buffer * @return number of copied bytes, neg. error code if failed */ Int_t CopyBackward(Byte_t* pBuffer, Int_t bufferSize); /* * DONT use ! * For debugging purphoses only, will be removed in near future **/ template void DumpData(T *array, Int_t N, Int_t nPerLine) { cout << "DumpData N= " << N <