X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDRawStream.h;h=68fda921335b5029b14b606dd333f76cf1103403;hb=fcb289102b9b5323c24bf4ec175fb97fcc0260b8;hp=9b31b4b606d2af383fd8ea27a9c0443c25e9a6ed;hpb=0d0e69953f8454e6bab7169b95440ec351979811;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDRawStream.h b/FMD/AliFMDRawStream.h index 9b31b4b606d..68fda921335 100644 --- a/FMD/AliFMDRawStream.h +++ b/FMD/AliFMDRawStream.h @@ -7,42 +7,49 @@ * * See cxx source for full Copyright notice */ +//____________________________________________________________________ +// +// Class to read ALTRO formated data from an AliRawReader. +// This class is mostly here to set AliAltroRawStream::fNoAltroMapping +// to false. Furthermore, it defines the utility function +// ReadChannel to read in a full ALTRO channel. The data is unpacked +// into the passed array. +// +/** @file AliFMDRawStream.h + @author Christian Holm Christensen + @date Tue Mar 28 12:53:26 2006 + @brief Class to read ALTRO formated data from an AliRawReader. +*/ #ifndef ALIALTRORAWSTREAM_H # include #endif -// TPC to FMD translations -// -// TPC FMD -// ----------+----------- -// pad+time | strip -// row | sector -// sector | ring -// +/** @class AliFMDRawStream + @brief Class to read ALTRO formated data from an AliRawReader. + This class is mostly here to set + AliAltroRawStream::fNoAltroMapping to false. Furthermore, it + defines the utility function ReadChannel to read in a full ALTRO + channel. The data is unpacked into the passed array. + */ class AliFMDRawStream : public AliAltroRawStream { -private: - UShort_t fSampleRate; // # of ALTRO samples per VA1_ALICE clock - Int_t fPrevTime; // Last time bin public: + /** Constructor + @param reader Raw reader to use */ AliFMDRawStream(AliRawReader* reader); + /** Destructor */ + virtual ~AliFMDRawStream() {} - Short_t Sector() const { return fRow; } - Char_t Ring() const { return (fSector == 0 ? 'I' : 'O'); } - Short_t Strip() const { return fPad + fTime / fSampleRate; } - Short_t PrevSector() const { return fPrevRow; } - Char_t PrevRing() const { return (fPrevSector == 0 ? 'I' : 'O'); } - Short_t PrevStrip() const { return fPrevPad + fPrevTime/fSampleRate; } - - Bool_t IsNewRing() const { return (fSector != fPrevSector); } - Bool_t IsNewSector() const { return (fRow != fPrevRow) || IsNewRing(); } - Bool_t IsNewStrip() const { return(Strip() != PrevStrip())||IsNewSector();} - - Short_t Count() const { return fSignal; } - Short_t SampleRate() const { return fSampleRate; } - - virtual Bool_t Next(); + /** Read one ALTRO channel from the raw reader + @param ddl On return, the DDL + @param addr On return, the hardware address + @param len On return, the number of entries filled in @a data + @param data On return, the read ADC channels. + @return @c true on success */ + virtual Bool_t ReadChannel(UInt_t& ddl, UInt_t& addr, + UInt_t& len, volatile UShort_t* data); +protected: ClassDef(AliFMDRawStream, 0) // Read raw FMD Altro data };