emcRawDataObject Class Reference

#include <emcRawDataObject.h>

Inherits emcDataObject.

Inheritance diagram for emcRawDataObject:

Inheritance graph
[legend]
List of all members.

Detailed Description

Common RawDataObject to be used on- and off-line.

Purpose: encapsulate the "flat" arrays of the Dynamic classes (online) and replace the STAF table mEmcRawData (offline).

It derives from TObject so it can be written in a TTree using the PHNodeIOManager of PHOOL.

FIXME ? Here are some things to keep in mind :

Definition at line 46 of file emcRawDataObject.h.

Public Member Functions

 emcRawDataObject ()
 emcRawDataObject (Int_t thesize, Int_t *datamap, Float_t *tac, Float_t *hgpost, Float_t *lgpost, Float_t *hgpre, Float_t *lgpre, const cells *amucells, int *dataerrors=0)
virtual ~emcRawDataObject ()
void SetCells (int iSM, int ctac, int cpre, int cpost)
void GetCells (int index, int &ctac, int &cpre, int &cpost) const
int GetTACCell (int index) const
void Set (const int index, const int &tac, const int &hgpost, const int &lgpost, const int &hgpre, const int &lgpre, const int &dataerror)
 Set content of the channel (used with new emcDataFormatter).
void Get (Int_t index, Float_t &tac, Float_t &hgpost, Float_t &lgpost, Float_t &hgpre, Float_t &lgpre, int &amupre, int &amupost, int &amutac, int &dataerror) const
 Get information for one channel = 1 TAC + 4 ADC + Amu cells + data-readout-error.
void Get (Int_t index, Float_t &tac, Float_t &hgpost, Float_t &lgpost, Float_t &hgpre, Float_t &lgpre, int &dataerror) const
Float_t GetHGPost (Int_t index) const
 Get High Gain Post value for one channel or -9999 if index is not valid.
Float_t GetHGPre (Int_t index) const
 Get High Gain Pre value for one channel or -9999 if index is not valid.
int GetIndexByTowerId (int towerid) const
 Get index from towerId.
Float_t GetLGPost (Int_t index) const
 Get Low Gain Post value for one channel or -9999 if index is not valid.
Float_t GetLGPre (Int_t index) const
 Get Low Gain Pre value for one channel or -9999 if index is not valid.
Float_t GetTAC (Int_t index) const
 Get TAC value for one channel or -9999 if index is not valid.
void resetAMUAddresses (const int fem) const
 Reset AMU cells to "zero".
Int_t GetAMUPost (Int_t index) const
 Get AMU Post value for one channel or 255 if index is not valid.
Int_t GetAMUPre (Int_t index) const
 Get AMU Pre value for one channel or 255 if tower_index is not valid.
Int_t GetAMUTAC (Int_t index) const
 Get AMU TAC value for one channel or 255 if index is not valid.
Int_t GetNumberOfWordsPerFEM (void) const
 Get number of words per FEM (should be 144 most of the time, but could be 192 for some online use cases).
bool IsZero (Int_t index) const
 Tells if channel is zero.

Private Member Functions

 emcRawDataObject (const emcRawDataObject &obj)
emcRawDataObjectoperator= (const emcRawDataObject &obj)

Private Attributes

Float_t * fTAC
 Time.
Float_t * fHGPost
 High gain post.
Float_t * fLGPost
 Low gain post.
Float_t * fHGPre
 High gain pre.
Float_t * fLGPre
 Low gain pre.
cellsfAMUcells
 AMU cells array.
bool fOwnAllocation
 Indicates if WE are allocating the tower data arrays or not (true if reading from Root file, false in any other cases).
Int_t fNumberOfWordsPerFEM
 Number of words per FEM (144 except for some online purposes=192).
std::map< int, int > fIndexMap
 Used to recover index number from TowerId number.

Friends

ostream & operator<< (ostream &, const emcRawDataObject &)


Constructor & Destructor Documentation

emcRawDataObject::emcRawDataObject  ) 
 

emcRawDataObject::emcRawDataObject Int_t  thesize,
Int_t *  datamap,
Float_t *  tac,
Float_t *  hgpost,
Float_t *  lgpost,
Float_t *  hgpre,
Float_t *  lgpre,
const cells amucells,
int *  dataerrors = 0
 

emcRawDataObject::~emcRawDataObject  )  [virtual]
 

Definition at line 86 of file emcRawDataObject.C.

References fAMUcells, emcDataObject::fDataMap, fHGPost, fHGPre, fLGPost, fLGPre, fOwnAllocation, and fTAC.

emcRawDataObject::emcRawDataObject const emcRawDataObject obj  )  [private]
 

Definition at line 69 of file emcRawDataObject.C.


Member Function Documentation

void emcRawDataObject::Get Int_t  index,
Float_t &  tac,
Float_t &  hgpost,
Float_t &  lgpost,
Float_t &  hgpre,
Float_t &  lgpre,
int &  dataerror
const
 

Definition at line 161 of file emcRawDataObject.C.

References emcDataObject::fDataErrors, fHGPost, fHGPre, fLGPost, fLGPre, and fTAC.

void emcRawDataObject::Get Int_t  index,
Float_t &  tac,
Float_t &  hgpost,
Float_t &  lgpost,
Float_t &  hgpre,
Float_t &  lgpre,
int &  amupre,
int &  amupost,
int &  amutac,
int &  dataerror
const
 

Get information for one channel = 1 TAC + 4 ADC + Amu cells + data-readout-error.

Definition at line 137 of file emcRawDataObject.C.

References fAMUcells, emcDataObject::fDataErrors, fHGPost, fHGPre, fLGPost, fLGPre, fNumberOfWordsPerFEM, fTAC, cells::post, cells::pre, and cells::tac.

Referenced by emcPatch::event(), and emcRawDataCalibratorV2::printData().

Int_t emcRawDataObject::GetAMUPost Int_t  index  )  const [inline]
 

Get AMU Post value for one channel or 255 if index is not valid.

Definition at line 128 of file emcRawDataObject.h.

References fAMUcells, fNumberOfWordsPerFEM, cells::post, and emcDataObject::ValidIndex().

Referenced by operator<<().

Int_t emcRawDataObject::GetAMUPre Int_t  index  )  const [inline]
 

Get AMU Pre value for one channel or 255 if tower_index is not valid.

Definition at line 135 of file emcRawDataObject.h.

References fAMUcells, fNumberOfWordsPerFEM, cells::pre, and emcDataObject::ValidIndex().

Referenced by operator<<().

Int_t emcRawDataObject::GetAMUTAC Int_t  index  )  const [inline]
 

Get AMU TAC value for one channel or 255 if index is not valid.

Definition at line 143 of file emcRawDataObject.h.

References fAMUcells, fNumberOfWordsPerFEM, cells::tac, and emcDataObject::ValidIndex().

Referenced by operator<<().

void emcRawDataObject::GetCells int  index,
int &  ctac,
int &  cpre,
int &  cpost
const
 

Float_t emcRawDataObject::GetHGPost Int_t  index  )  const [inline]
 

Get High Gain Post value for one channel or -9999 if index is not valid.

Definition at line 87 of file emcRawDataObject.h.

References fHGPost, and emcDataObject::ValidIndex().

Float_t emcRawDataObject::GetHGPre Int_t  index  )  const [inline]
 

Get High Gain Pre value for one channel or -9999 if index is not valid.

Definition at line 94 of file emcRawDataObject.h.

References fHGPre, and emcDataObject::ValidIndex().

int emcRawDataObject::GetIndexByTowerId int  towerid  )  const
 

Get index from towerId.

Definition at line 181 of file emcRawDataObject.C.

References fIndexMap.

Referenced by emcPatch::event().

Float_t emcRawDataObject::GetLGPost Int_t  index  )  const [inline]
 

Get Low Gain Post value for one channel or -9999 if index is not valid.

Definition at line 104 of file emcRawDataObject.h.

References fLGPost, and emcDataObject::ValidIndex().

Float_t emcRawDataObject::GetLGPre Int_t  index  )  const [inline]
 

Get Low Gain Pre value for one channel or -9999 if index is not valid.

Definition at line 111 of file emcRawDataObject.h.

References fLGPre, and emcDataObject::ValidIndex().

Int_t emcRawDataObject::GetNumberOfWordsPerFEM void   )  const [inline]
 

Get number of words per FEM (should be 144 most of the time, but could be 192 for some online use cases).

Definition at line 150 of file emcRawDataObject.h.

References fNumberOfWordsPerFEM.

Float_t emcRawDataObject::GetTAC Int_t  index  )  const [inline]
 

Get TAC value for one channel or -9999 if index is not valid.

Definition at line 118 of file emcRawDataObject.h.

References fTAC, and emcDataObject::ValidIndex().

int emcRawDataObject::GetTACCell int  index  )  const
 

bool emcRawDataObject::IsZero Int_t  index  )  const
 

Tells if channel is zero.

Definition at line 202 of file emcRawDataObject.C.

References emcDataObject::fDataErrors.

emcRawDataObject & emcRawDataObject::operator= const emcRawDataObject obj  )  [private]
 

Definition at line 78 of file emcRawDataObject.C.

void emcRawDataObject::resetAMUAddresses const int  fem  )  const
 

Reset AMU cells to "zero".

The reason to do it - whenever the packet is missing - it is otherwise left uninitiated

Definition at line 193 of file emcRawDataObject.C.

References fAMUcells, cells::post, cells::pre, and cells::tac.

void emcRawDataObject::Set const int  index,
const int &  tac,
const int &  hgpost,
const int &  lgpost,
const int &  hgpre,
const int &  lgpre,
const int &  dataerror
 

Set content of the channel (used with new emcDataFormatter).

Definition at line 123 of file emcRawDataObject.C.

References emcDataObject::fDataErrors, fHGPost, fHGPre, fLGPost, fLGPre, and fTAC.

Referenced by emcDataFormatter::empty(), and emcDataFormatter::fillRDO().

void emcRawDataObject::SetCells int  iSM,
int  ctac,
int  cpre,
int  cpost
 

Definition at line 102 of file emcRawDataObject.C.

References fAMUcells, cells::post, cells::pre, and cells::tac.

Referenced by emcDataFormatter::fillRDO().


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const emcRawDataObject rdo
[friend]
 

Definition at line 328 of file emcRawDataObject.C.


Member Data Documentation

cells* emcRawDataObject::fAMUcells [private]
 

AMU cells array.

Definition at line 172 of file emcRawDataObject.h.

Referenced by Get(), GetAMUPost(), GetAMUPre(), GetAMUTAC(), resetAMUAddresses(), SetCells(), and ~emcRawDataObject().

Float_t* emcRawDataObject::fHGPost [private]
 

High gain post.

Definition at line 164 of file emcRawDataObject.h.

Referenced by Get(), GetHGPost(), operator<<(), Set(), and ~emcRawDataObject().

Float_t* emcRawDataObject::fHGPre [private]
 

High gain pre.

Definition at line 168 of file emcRawDataObject.h.

Referenced by Get(), GetHGPre(), operator<<(), Set(), and ~emcRawDataObject().

std::map<int, int> emcRawDataObject::fIndexMap [private]
 

Used to recover index number from TowerId number.

Definition at line 178 of file emcRawDataObject.h.

Referenced by GetIndexByTowerId().

Float_t* emcRawDataObject::fLGPost [private]
 

Low gain post.

Definition at line 166 of file emcRawDataObject.h.

Referenced by Get(), GetLGPost(), operator<<(), Set(), and ~emcRawDataObject().

Float_t* emcRawDataObject::fLGPre [private]
 

Low gain pre.

Definition at line 170 of file emcRawDataObject.h.

Referenced by Get(), GetLGPre(), operator<<(), Set(), and ~emcRawDataObject().

Int_t emcRawDataObject::fNumberOfWordsPerFEM [private]
 

Number of words per FEM (144 except for some online purposes=192).

Definition at line 176 of file emcRawDataObject.h.

Referenced by Get(), GetAMUPost(), GetAMUPre(), GetAMUTAC(), and GetNumberOfWordsPerFEM().

bool emcRawDataObject::fOwnAllocation [private]
 

Indicates if WE are allocating the tower data arrays or not (true if reading from Root file, false in any other cases).

Definition at line 174 of file emcRawDataObject.h.

Referenced by ~emcRawDataObject().

Float_t* emcRawDataObject::fTAC [private]
 

Time.

Definition at line 162 of file emcRawDataObject.h.

Referenced by Get(), GetTAC(), operator<<(), Set(), and ~emcRawDataObject().


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