AliFMDAltroWriter Class Reference

#include <FMD/AliFMDAltroIO.h>

Inheritance diagram for AliFMDAltroWriter:

Inheritance graph
[legend]
Collaboration diagram for AliFMDAltroWriter:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class to write ALTRO formated raw data from an array of AliFMDDigit objects.

    AliFMDRawWriter* fmdWriter = new AliFMDRawWriter(0);
    TClonesArray*    array     = fmd->DigitArray();
    fmdWriter->WriteDigits(array);

Definition at line 178 of file AliFMDAltroIO.h.

Public Member Functions

 AliFMDAltroWriter (std::ostream &stream)
virtual ~AliFMDAltroWriter ()
void SetThreshold (UShort_t threshold)
Int_t Close ()
Int_t Flush ()
Int_t AddSignal (UShort_t adc)
Int_t AddChannelTrailer (UShort_t board, UShort_t chip, UShort_t channel)
Int_t AddChannelTrailer (UInt_t hwaddr)

Protected Member Functions

Int_t AddToBuffer (UShort_t x)
Int_t AddBunchTrailer ()
Int_t AddFillWords ()
 ClassDef (AliFMDAltroWriter, 0)

Protected Attributes

UShort_t fThreshold
UShort_t fTime
UShort_t fLength
UShort_t fLast
size_t fBegin
size_t fHeader
Long_t fTotal
std::ostream & fOutput


Constructor & Destructor Documentation

AliFMDAltroWriter::AliFMDAltroWriter std::ostream &  stream  ) 
 

Constructor.

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

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

Definition at line 185 of file AliFMDAltroIO.h.


Member Function Documentation

Int_t AliFMDAltroWriter::AddBunchTrailer  )  [protected]
 

Add a bunch trailer to output.

Returns:
number of 10 bit words written to disk, or negative error code on failure

Int_t AliFMDAltroWriter::AddChannelTrailer UInt_t  hwaddr  ) 
 

Write a channel trailer to output.

Parameters:
hwaddr Hardware address (channel address)
Returns:
Number of 10 bit words written, or negative error code on failure

Int_t AliFMDAltroWriter::AddChannelTrailer UShort_t  board,
UShort_t  chip,
UShort_t  channel
 

Write a channel trailer to output.

Parameters:
board The FEC board number (0-31)
chip The ALTRO chip number (0-7)
channel The ALTRO channel number (0-16)
Returns:
Number of 10 bit words written, or negative error code on failure

Int_t AliFMDAltroWriter::AddFillWords  )  [protected]
 

Add fill words as needed to output

Returns:
number of 10 bit words written to disk, or negative error code on failure

Int_t AliFMDAltroWriter::AddSignal UShort_t  adc  ) 
 

Add a signal to output. If the signal adc is less then the current threshold, a new bunch trailer is written.

Parameters:
adc Signal
Returns:
0 on success, or negative error code on failure

Int_t AliFMDAltroWriter::AddToBuffer UShort_t  x  )  [protected]
 

Add a value to output buffer.

Parameters:
x Value to add.
Returns:
number of 10 bit words written to disk, or negative error code on failure

AliFMDAltroWriter::ClassDef AliFMDAltroWriter  ,
[protected]
 

Int_t AliFMDAltroWriter::Close  ) 
 

Close the output, by writing the appropriate header. The actual stream should be called by the user.

Returns:
number of bytes written, or negative error code on failure

Int_t AliFMDAltroWriter::Flush  ) 
 

Flush buffered output to file (if there is any).

Returns:
0, or negative error code on failure

void AliFMDAltroWriter::SetThreshold UShort_t  threshold  )  [inline]
 

Parameters:
threshold Zero-suppresion threshold

Definition at line 187 of file AliFMDAltroIO.h.


Member Data Documentation

size_t AliFMDAltroWriter::fBegin [protected]
 

High-water mark (begining of file)

Definition at line 235 of file AliFMDAltroIO.h.

size_t AliFMDAltroWriter::fHeader [protected]
 

High-water mark (begining of file)

Definition at line 237 of file AliFMDAltroIO.h.

UShort_t AliFMDAltroWriter::fLast [protected]
 

Last meaning-full data

Definition at line 233 of file AliFMDAltroIO.h.

UShort_t AliFMDAltroWriter::fLength [protected]
 

Current bunch length

Definition at line 231 of file AliFMDAltroIO.h.

std::ostream& AliFMDAltroWriter::fOutput [protected]
 

output stream

Definition at line 241 of file AliFMDAltroIO.h.

UShort_t AliFMDAltroWriter::fThreshold [protected]
 

Zero suppression threshold

Definition at line 227 of file AliFMDAltroIO.h.

UShort_t AliFMDAltroWriter::fTime [protected]
 

Current time

Definition at line 229 of file AliFMDAltroIO.h.

Long_t AliFMDAltroWriter::fTotal [protected]
 

Total number of bytes written

Definition at line 239 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