AliRoot Core  3dc7879 (3dc7879)
AliFMDRawReader Class Reference

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

#include <AliFMDRawReader.h>

Inheritance diagram for AliFMDRawReader:

Public Types

enum  { kNDDL = 3 }
 
enum  { kBadSignal = 0x7FFF }
 

Public Member Functions

 AliFMDRawReader (AliRawReader *reader, TTree *array)
 
virtual ~AliFMDRawReader ()
 
void SetVerbose (Bool_t verb=kTRUE)
 
virtual void Exec (Option_t *option="")
 
virtual Bool_t ReadAdcs (TClonesArray *array)
 
virtual Bool_t ReadAdcs (AliFMDUShortMap &map)
 
virtual Bool_t ReadSODevent (AliFMDCalibSampleRate *samplerate, AliFMDCalibStripRange *striprange, TArrayS &pulseSize, TArrayS &pulseLength, Bool_t *detectors=0)
 
Bool_t IsZeroSuppressed (UShort_t ddl) const
 
UShort_t NoiseFactor (UShort_t ddl) const
 
Int_t NextSample (UShort_t &det, Char_t &rng, UShort_t &sec, UShort_t &str, UShort_t &sam, UShort_t &rat, Short_t &adc, Bool_t &zs, UShort_t &fac)
 
Int_t NextSignal (UShort_t &det, Char_t &rng, UShort_t &sec, UShort_t &str, Short_t &adc, Bool_t &zs, UShort_t &fac)
 
UShort_t GetNErrors (UShort_t ddl) const
 
UShort_t GetL1Phase (UShort_t ddl) const
 

Static Public Member Functions

static Bool_t SelectSample (UShort_t samp, UShort_t rate)
 

Protected Member Functions

 AliFMDRawReader (const AliFMDRawReader &o)
 
AliFMDRawReaderoperator= (const AliFMDRawReader &)
 
Int_t NewDDL (AliAltroRawStreamV3 &input, UShort_t &det)
 
Int_t NewChannel (const AliAltroRawStreamV3 &input, UShort_t det, Char_t &ring, UShort_t &sec, Short_t &strbase)
 
Bool_t NewBunch (const AliAltroRawStreamV3 &input, UShort_t &start, UShort_t &length)
 
Int_t NewSample (const AliAltroRawStreamV3 &input, Int_t i, UShort_t t, UShort_t sec, UShort_t strbase, Short_t &str, UShort_t &samp)
 
ULong_t GetNwords () const
 
UInt_t Get32bitWord (Int_t idx)
 
Int_t GetHalfringIndex (UShort_t det, Char_t ring, UShort_t board) const
 
void AddError (Int_t ddl, Int_t hwaddr)
 
void ReadbackError (const AliAltroRawStreamV3 &input, const char *format,...)
 

Protected Attributes

TTree * fTree
 
AliRawReader * fReader
 Pointer to tree to read into. More...
 
UShort_t fSampleRate [kNDDL]
 Pointer to raw reader. More...
 
UChar_t * fData
 
ULong_t fNbytes
 
Bool_t fZeroSuppress [kNDDL]
 
UShort_t fNoiseFactor [kNDDL]
 
UShort_t fMinStrip
 
UShort_t fMaxStrip
 
UShort_t fPreSamp
 
AliFMDUShortMap fSeen
 
UShort_t fNErrors [kNDDL]
 
UShort_t fL1Phase [kNDDL]
 
Bool_t fVerbose
 
TClonesArray fErrors
 
UShort_t fNErrChanLen
 
UShort_t fNErrAddress
 

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 48 of file AliFMDRawReader.h.

Member Enumeration Documentation

anonymous enum

Number of possible DDLs

Enumerator
kNDDL 

Definition at line 52 of file AliFMDRawReader.h.

anonymous enum
Enumerator
kBadSignal 

Definition at line 55 of file AliFMDRawReader.h.

Constructor & Destructor Documentation

AliFMDRawReader::AliFMDRawReader ( AliRawReader *  reader,
TTree *  array 
)

CTOR

Parameters
readerRaw reader
arrayOutput tree

Definition at line 79 of file AliFMDRawReader.cxx.

virtual AliFMDRawReader::~AliFMDRawReader ( )
inlinevirtual

DTOR

Definition at line 68 of file AliFMDRawReader.h.

AliFMDRawReader::AliFMDRawReader ( const AliFMDRawReader o)
inlineprotected

Copy constructor

Parameters
oObject to construct from

Definition at line 204 of file AliFMDRawReader.h.

Member Function Documentation

void AliFMDRawReader::AddError ( Int_t  ddl,
Int_t  hwaddr 
)
protected

Definition at line 127 of file AliFMDRawReader.cxx.

Referenced by GetNwords(), and ReadbackError().

void AliFMDRawReader::Exec ( Option_t *  option = "")
virtual

Read in, and store in output tree

Parameters
optionNot used

Definition at line 107 of file AliFMDRawReader.cxx.

Referenced by SetVerbose().

UInt_t AliFMDRawReader::Get32bitWord ( Int_t  idx)
protected

Get the next 32bit word from payload

Parameters
idxWhich 32bit word to get
Returns

Definition at line 1172 of file AliFMDRawReader.cxx.

Referenced by GetNwords().

Int_t AliFMDRawReader::GetHalfringIndex ( UShort_t  det,
Char_t  ring,
UShort_t  board 
) const
protected

Get short index for a given half-ring

Parameters
detDetector number
ringRing identifer
boardBoard number
Returns

Definition at line 1201 of file AliFMDRawReader.cxx.

Referenced by GetNwords(), and ReadSODevent().

UShort_t AliFMDRawReader::GetL1Phase ( UShort_t  ddl) const
inline

Get the phase of the L1 signal

Parameters
ddlDDL number ([0,kNDDL-1])
Returns
Phase of the L1 signal in steps of 25ns.

Definition at line 188 of file AliFMDRawReader.h.

UShort_t AliFMDRawReader::GetNErrors ( UShort_t  ddl) const
inline

Get number of read-out errors. Note, that a channel marked as bad counts as 10 errors

Parameters
ddlDDL off set ([0,kNDDL-1])
Returns
Number of seen errors

Definition at line 180 of file AliFMDRawReader.h.

Referenced by AliFMDQADataMakerRec::MakeRaws().

ULong_t AliFMDRawReader::GetNwords ( ) const
inlineprotected

Get the number of words

Returns
Number of 32bit words

Definition at line 284 of file AliFMDRawReader.h.

Bool_t AliFMDRawReader::IsZeroSuppressed ( UShort_t  ddl) const
inline

Check of the data from DDL ddl is zero-suppressed

Parameters
ddlDDL number (0-2)
Returns
true if the data from this DDL is zero-suppressed.

Definition at line 114 of file AliFMDRawReader.h.

Referenced by AliFMDReconstructor::ConvertDigits(), AliFMDDisplay::GetADCThreshold(), AliFMDReconstructor::ProcessDigits(), and DrawCalibRaw::ProcessRawCalibDigit().

Bool_t AliFMDRawReader::NewBunch ( const AliAltroRawStreamV3 &  input,
UShort_t &  start,
UShort_t &  length 
)
protected

Process a new bunch.

Parameters
inputInput stream
startOn input, the old start time. On return, the start time
lengthOn return, the bunch length
Returns
true on success, false otherwise

Definition at line 348 of file AliFMDRawReader.cxx.

Referenced by NextSample(), operator=(), and ReadAdcs().

Int_t AliFMDRawReader::NewChannel ( const AliAltroRawStreamV3 &  input,
UShort_t  det,
Char_t &  ring,
UShort_t &  sec,
Short_t &  strbase 
)
protected

Processs a new channel. Sets the internal data members fMinStrip, fMaxStrip, and fPreSamp.

Parameters
inputInput stream
detDetector number
ringOn return, the ring identifier
secOn return, the sector number
strbaseOn return, the strip base
Returns
negative value in case of problems, hardware address otherwise

Definition at line 295 of file AliFMDRawReader.cxx.

Referenced by NextSample(), operator=(), and ReadAdcs().

Int_t AliFMDRawReader::NewDDL ( AliAltroRawStreamV3 &  input,
UShort_t &  det 
)
protected

Process a new DDL. Sets the internal data members fZeroSuppress, fSampleRate, and fNoiseFactor based on information in the RCU trailer.

Parameters
inputInput stream
detOn return, the detector number
Returns
negative value in case of problems, the DDL number otherwise

Definition at line 162 of file AliFMDRawReader.cxx.

Referenced by NextSample(), operator=(), and ReadAdcs().

Int_t AliFMDRawReader::NewSample ( const AliAltroRawStreamV3 &  input,
Int_t  i,
UShort_t  t,
UShort_t  sec,
UShort_t  strbase,
Short_t &  str,
UShort_t &  samp 
)
protected

Process a new timebin

Parameters
inputInput stream
iIndex into bunch data
tTime
secSector number
strbaseBase of strip numbers for this channel
strOn return, the strip number
sampOn return, the sample number
Returns
negative value in case of problems, ADC value otherwise

Definition at line 387 of file AliFMDRawReader.cxx.

Referenced by NextSample(), operator=(), and ReadAdcs().

Int_t AliFMDRawReader::NextSample ( UShort_t &  det,
Char_t &  rng,
UShort_t &  sec,
UShort_t &  str,
UShort_t &  sam,
UShort_t &  rat,
Short_t &  adc,
Bool_t &  zs,
UShort_t &  fac 
)

Get the next signal

Parameters
detOn return, the detector
rngOn return, the ring
secOn return, the sector
strOn return, the strip
samOn return, the sample
ratOn return, the sample rate
adcOn return, the ADC value
zsOn return, whether zero-supp. is enabled
facOn return, the usd noise factor
Returns
0 if there's no more data. -1 if the read sample corresponds to a bad bunch in the channel. Positive return values represent a bit mask of
  • 0x1 New DDL
  • 0x2 New Channel
  • 0x4 New Bunch
  • 0x8 New Sample

Definition at line 446 of file AliFMDRawReader.cxx.

Referenced by AliFMDReconstructor::Digitize(), NextSignal(), and NoiseFactor().

Int_t AliFMDRawReader::NextSignal ( UShort_t &  det,
Char_t &  rng,
UShort_t &  sec,
UShort_t &  str,
Short_t &  adc,
Bool_t &  zs,
UShort_t &  fac 
)

Get the next signal

Parameters
detOn return, the detector
rngOn return, the ring
secOn return, the sector
strOn return, the strip
adcOn return, the ADC value
zsOn return, whether zero-supp. is enabled
facOn return, the usd noise factor
Returns
0 if there's no more data. -1 if the read sample corresponds to a bad bunch in the channel. Positive return values represent a bit mask of
  • 0x1 New DDL
  • 0x2 New Channel
  • 0x4 New Bunch
  • 0x8 New Sample

Definition at line 596 of file AliFMDRawReader.cxx.

Referenced by NoiseFactor(), AliFMDReconstructor::Reconstruct(), and TestRawReader().

UShort_t AliFMDRawReader::NoiseFactor ( UShort_t  ddl) const
inline

The factor used to multiply the noise when making on-line pedestal subtraction.

Parameters
ddlDDL number (0-2)
Returns
The factor used.

Definition at line 123 of file AliFMDRawReader.h.

Referenced by AliFMDReconstructor::ConvertDigits(), AliFMDDisplay::GetADCThreshold(), AliFMDReconstructor::ProcessDigits(), and DrawCalibRaw::ProcessRawCalibDigit().

AliFMDRawReader& AliFMDRawReader::operator= ( const AliFMDRawReader )
inlineprotected

Assignment operator

Returns
Reference to this object

Definition at line 224 of file AliFMDRawReader.h.

Bool_t AliFMDRawReader::ReadAdcs ( TClonesArray *  array)
virtual

Read ADC's into a TClonesArray of AliFMDDigit objects.

Parameters
arrayArray to read into
Returns
true on success

Definition at line 648 of file AliFMDRawReader.cxx.

Referenced by AliFMDInput::Begin(), AliFMDReconstructor::ConvertDigits(), Exec(), AliFMDQADataMakerRec::MakeRaws(), ReadRaw(), AliFMDBaseDA::Run(), SetVerbose(), and TestRawIO().

Bool_t AliFMDRawReader::ReadAdcs ( AliFMDUShortMap map)
virtual

Read ADCs into a unsigned short map.

Parameters
mapMap to read into
Returns
true on success

Definition at line 784 of file AliFMDRawReader.cxx.

void AliFMDRawReader::ReadbackError ( const AliAltroRawStreamV3 &  input,
const char *  format,
  ... 
)
protected

Definition at line 135 of file AliFMDRawReader.cxx.

Referenced by GetNwords(), NewBunch(), NewChannel(), and NewDDL().

Bool_t AliFMDRawReader::ReadSODevent ( AliFMDCalibSampleRate samplerate,
AliFMDCalibStripRange striprange,
TArrayS &  pulseSize,
TArrayS &  pulseLength,
Bool_t *  detectors = 0 
)
virtual

Read SOD event into passed objects.

Parameters
samplerateThe sample rate object to fill
striprangeThe strip range object to fill
pulseSizeThe pulse size object to fill
pulseLengthThe pulse length (in events) object to fill
Returns
true on success

Definition at line 865 of file AliFMDRawReader.cxx.

Referenced by SetVerbose(), and AliFMDBaseDA::WriteConditionsData().

Bool_t AliFMDRawReader::SelectSample ( UShort_t  samp,
UShort_t  rate 
)
static

Whether to keep a sample based on the rate used.

Parameters
sampSample number
rateOver sampling rate
Returns
Whether to keep the sample or not

Definition at line 631 of file AliFMDRawReader.cxx.

Referenced by AliFMDReconstructor::Digitize(), GetL1Phase(), NextSignal(), and ReadAdcs().

void AliFMDRawReader::SetVerbose ( Bool_t  verb = kTRUE)
inline

Definition at line 69 of file AliFMDRawReader.h.

Referenced by ReadRaw().

Member Data Documentation

UChar_t* AliFMDRawReader::fData
protected

Definition at line 309 of file AliFMDRawReader.h.

Referenced by Get32bitWord().

TClonesArray AliFMDRawReader::fErrors
protected

Definition at line 320 of file AliFMDRawReader.h.

Referenced by AddError(), and ReadAdcs().

UShort_t AliFMDRawReader::fL1Phase[kNDDL]
protected

Definition at line 318 of file AliFMDRawReader.h.

Referenced by AliFMDRawReader(), GetL1Phase(), and NewDDL().

UShort_t AliFMDRawReader::fMaxStrip
protected

Definition at line 314 of file AliFMDRawReader.h.

Referenced by NewChannel(), and NewSample().

UShort_t AliFMDRawReader::fMinStrip
protected

Definition at line 313 of file AliFMDRawReader.h.

Referenced by NewChannel(), and NewSample().

ULong_t AliFMDRawReader::fNbytes
protected

Definition at line 310 of file AliFMDRawReader.h.

Referenced by GetNwords().

UShort_t AliFMDRawReader::fNErrAddress
protected

Definition at line 322 of file AliFMDRawReader.h.

Referenced by NewDDL(), and ReadAdcs().

UShort_t AliFMDRawReader::fNErrChanLen
protected

Definition at line 321 of file AliFMDRawReader.h.

Referenced by NewDDL(), and ReadAdcs().

UShort_t AliFMDRawReader::fNErrors[kNDDL]
protected

Definition at line 317 of file AliFMDRawReader.h.

Referenced by AliFMDRawReader(), GetNErrors(), NextSample(), ReadAdcs(), and ReadbackError().

UShort_t AliFMDRawReader::fNoiseFactor[kNDDL]
protected

Definition at line 312 of file AliFMDRawReader.h.

Referenced by AliFMDRawReader(), NewDDL(), NextSample(), and NoiseFactor().

UShort_t AliFMDRawReader::fPreSamp
protected

Definition at line 315 of file AliFMDRawReader.h.

Referenced by NewBunch(), NewChannel(), and NewSample().

AliRawReader* AliFMDRawReader::fReader
protected

Pointer to tree to read into.

Definition at line 307 of file AliFMDRawReader.h.

Referenced by NextSample(), ReadAdcs(), ReadbackError(), and ReadSODevent().

UShort_t AliFMDRawReader::fSampleRate[kNDDL]
protected

Pointer to raw reader.

Definition at line 308 of file AliFMDRawReader.h.

Referenced by AliFMDRawReader(), NewChannel(), NewDDL(), NewSample(), NextSample(), and ReadAdcs().

AliFMDUShortMap AliFMDRawReader::fSeen
protected

Definition at line 316 of file AliFMDRawReader.h.

Referenced by ReadAdcs().

TTree* AliFMDRawReader::fTree
protected

Definition at line 306 of file AliFMDRawReader.h.

Referenced by Exec().

Bool_t AliFMDRawReader::fVerbose
protected

Definition at line 319 of file AliFMDRawReader.h.

Referenced by ReadAdcs(), and SetVerbose().

Bool_t AliFMDRawReader::fZeroSuppress[kNDDL]
protected

Definition at line 311 of file AliFMDRawReader.h.

Referenced by AliFMDRawReader(), IsZeroSuppressed(), NewDDL(), and NextSample().


The documentation for this class was generated from the following files: