AliFMDAltroReader Class Reference

#include <FMD/AliFMDAltroIO.h>

Inheritance diagram for AliFMDAltroReader:

Inheritance graph
[legend]
Collaboration diagram for AliFMDAltroReader:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to read ALTRO formated raw data from an AliRawReader object.

    AliRawReader*    reader    = new AliRawReaderFile(0);
    AliFMDRawReader* fmdReader = new AliFMDRawReader(reader);
    TClonesArray*    array     = new TClonesArray("AliFMDDigit");
    fmdReader->ReadAdcs(array);

Definition at line 87 of file AliFMDAltroIO.h.

Public Member Functions

 AliFMDAltroReader (std::istream &stream)
virtual ~AliFMDAltroReader ()
Int_t ReadChannel (UShort_t &board, UShort_t &chip, UShort_t &channel, UShort_t &last, UShort_t *data)
Int_t ReadChannel (UShort_t &hwaddr, UShort_t &last, UShort_t *data)
Int_t ExtractTrailer (UShort_t &hwaddr, UShort_t &last)
Int_t ExtractBunches (UShort_t last, UShort_t *data)
Int_t ExtractFillWords (UShort_t last)
Int_t ExtractBunch (UShort_t *data)
Bool_t IsTrailer (W40_t x)
Bool_t IsBof ()

Protected Member Functions

virtual Int_t ReadW40 ()
virtual W10_t GetNextW10 ()
virtual W40_t GetNextW40 ()
 ClassDef (AliFMDAltroReader, 0)

Protected Attributes

std::istream & fInput
size_t fCurrent
size_t fBegin


Constructor & Destructor Documentation

AliFMDAltroReader::AliFMDAltroReader std::istream &  stream  ) 
 

Constructor

Parameters:
stream Stream to read from
Exceptions:
Int_t A negative error code in case of failure

virtual AliFMDAltroReader::~AliFMDAltroReader  )  [inline, virtual]
 

Definition at line 94 of file AliFMDAltroIO.h.


Member Function Documentation

AliFMDAltroReader::ClassDef AliFMDAltroReader  ,
[protected]
 

Int_t AliFMDAltroReader::ExtractBunch UShort_t *  data  ) 
 

Extract bunch information from data.

Parameters:
data An array to fill with the read data.
Returns:
negative error code on failure, otherwise number of 10 bit words read.

Int_t AliFMDAltroReader::ExtractBunches UShort_t  last,
UShort_t *  data
 

Extract bunches from data section of a channel.

Parameters:
last Pointer to last meaning full data entry.
data An array to fill with the read data.
Returns:
negative error code on failure, otherwise number of 10 bit words read.

Int_t AliFMDAltroReader::ExtractFillWords UShort_t  last  ) 
 

Extract possible fill words.

Parameters:
last Pointer to last meaning full data entry.
Returns:
Negative error code on failure, otherwise number of fill words read.

Int_t AliFMDAltroReader::ExtractTrailer UShort_t &  hwaddr,
UShort_t &  last
 

Extract the channel trailer.

Parameters:
hwaddr On return, the hardware address
last On return, the size of the data
Returns:
negative error code on failure, 0 if nothing is read, or the number of 10 bit words read.

virtual W10_t AliFMDAltroReader::GetNextW10  )  [protected, virtual]
 

Get a 10 bit word from the (buffered) input.

Returns:
10 bit word on success, negative error code on failure.

virtual W40_t AliFMDAltroReader::GetNextW40  )  [protected, virtual]
 

Get the next 40 bit word from the (buffered) input.

Returns:
The 40 bit word, or negative error code on failure

Bool_t AliFMDAltroReader::IsBof  ) 
 

Returns:
true if we're at the beginning of the file

Bool_t AliFMDAltroReader::IsTrailer W40_t  x  ) 
 

Check if x is a valid trailer

Parameters:
x 40 bit word to check.
Returns:
true if x is a valid trailer

Int_t AliFMDAltroReader::ReadChannel UShort_t &  hwaddr,
UShort_t &  last,
UShort_t *  data
 

Read one channel from the input file. Note, that channels are read from the back of the file.

Parameters:
hwaddr On return, the hardware address
last On return, the size of the data
data An array to fill with the data. note, this should be large enough to hold all the data (1024 is the maximum number of timebins that can be read, so that's a safe size).
Returns:
negative error code on failure, 0 if nothing is read, or the number of 10 bit words read.

Int_t AliFMDAltroReader::ReadChannel UShort_t &  board,
UShort_t &  chip,
UShort_t &  channel,
UShort_t &  last,
UShort_t *  data
 

Read one channel from the input file. Note, that channels are read from the back of the file.

Parameters:
board On return, the FEC board number
chip On return, the ALTRO chip number
channel On return, the ALTRO channel number
last On return, the size of the data
data An array to fill with the data. note, this should be large enough to hold all the data (1024 is the maximum number of timebins that can be read, so that's a safe size).
Returns:
negative error code on failure, 0 if nothing is read, or the number of 10 bit words read.

virtual Int_t AliFMDAltroReader::ReadW40  )  [protected, virtual]
 

Read a 40 bit word from the input.

Returns:
negative error code on failure, current position otherwise.


Member Data Documentation

size_t AliFMDAltroReader::fBegin [protected]
 

High water mark

Definition at line 153 of file AliFMDAltroIO.h.

size_t AliFMDAltroReader::fCurrent [protected]
 

Current position in file

Definition at line 151 of file AliFMDAltroIO.h.

std::istream& AliFMDAltroReader::fInput [protected]
 

Input stream

Definition at line 148 of file AliFMDAltroIO.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 24 17:11:22 2006 for ALICE FMD Off-line by  doxygen 1.4.6