X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=FMD%2FAliFMDRawStream.h;h=68fda921335b5029b14b606dd333f76cf1103403;hb=af393682fbc19535cad91707d8919b4bf2759239;hp=413874702cbb8180e7421d1b61214a113222821d;hpb=1e8f773ec10afa84ca5d4a654a27b44759f36097;p=u%2Fmrichter%2FAliRoot.git diff --git a/FMD/AliFMDRawStream.h b/FMD/AliFMDRawStream.h index 413874702cb..68fda921335 100644 --- a/FMD/AliFMDRawStream.h +++ b/FMD/AliFMDRawStream.h @@ -7,56 +7,50 @@ * * 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 { public: - AliFMDRawStream(AliRawReader* reader, UShort_t sampleRate=0); + /** 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 Sample() const { return 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(); - virtual Bool_t ReadChannel(UInt_t& addr, UInt_t& len, UShort_t* data); - virtual Bool_t DumpData(); + /** 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: - virtual Int_t ReadIntoBuffer(); - virtual Int_t ReadTrailer(UInt_t& head, UInt_t& len); - virtual Int_t ReadFillWords(UInt_t len); - virtual Int_t ReadBunch(UShort_t* data); - virtual UShort_t Get10BitWord(); - UShort_t fSampleRate; // # of ALTRO samples per VA1_ALICE clock - Int_t fPrevTime; // Last time bin - Bool_t fExplicitSampleRate; // True if the sample rate was set externally - Int_t fPos; - Int_t fCur; - UChar_t* fRead; ClassDef(AliFMDRawStream, 0) // Read raw FMD Altro data };