class HTrbBaseUnpacker: public HldUnpack

_HADES_CLASS_DESCRIPTION

                     HTrbBaseUnpacker
            Base class for TRB data unpacking.
  Any detector connected to TRB board should use this class to decode the subevent.
  Decode() method fills the arrays with information about:
  channel number (0-127),
  measured time,
  measured ADC.

  The goal is to provide data which can be directly used by subsystems
  (tof, start, hodo, wall) in order to directly fill raw categories.

  The most important information is stored in:
  trbLeadingTime[ TrbChanNb ][ hitNb ],
  trbADC[ TrbChanNb ][ hitNb ].
  trbLeadingMult[ TrbChanNb ]

  In case of Leading and Trailing mode the leading time and trailing time
  are delivered in separate data words. In this mode it can happen that
  a trailing time is missing. In such case trailing time is set to -1000000
  and ADC is set to -1.

  The information in Arrays is ordered in following way:
  1. Leading Time has to exist -> fill trbLeadingTime[ TrbChanNb ][ hitNb ];
  2. If Trailing time is found we try to marge it with last Leading Time.
     If Trailing time does not exist trbLeadingTime[ TrbChanNb ][ hitNb ] = -1000000
     If more than 1 Trailing time exist for one Leading Time the last one is used.
  3. ADC is calculated only if Trailing time exist.

  Max. number of hits per channel is currently set to 10.


  In addition this class should perform basic data corrections and error handling.
  (in preparation)

Function Members (Methods)

public:
HTrbBaseUnpacker(const HTrbBaseUnpacker&)
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
voidclearAll()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual Int_tcorrectOverflow()
virtual Int_tcorrectRefTimeCh127()
virtual Int_tcorrectRefTimeCh31()
virtual Int_tdecode()
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual Int_texecute()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
Bool_tfill_lead(Int_t ch, Int_t d)
Bool_tfill_pair(Int_t ch, Int_t time, Int_t length)
Bool_tfill_trail(Int_t ch, Int_t d)
virtual Bool_tHldUnpack::finalize()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Int_tgetDebugFlag()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
HldUnpack::HPPHldUnpack::getpSubEvt()
virtual Int_tgetSubEvtId() const
virtual const char*TObject::GetTitle() const
Int_tgetTrbDataVer() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual Bool_tinit()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HTrbBaseUnpacker&operator=(const HTrbBaseUnpacker&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
voidPrintTdcError(UInt_t e, UInt_t trbId)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Bool_tHldUnpack::reinit()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidHldUnpack::setCategory(HCategory* aCat)
voidsetDebugFlag(Int_t db)
voidsetDebugFlag1(Int_t db)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetQuietMode()
voidsetReportCritical()
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
HTrbBaseUnpacker(UInt_t id = 0)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
(unknown)()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Int_tdebugFlag! allows to print subevent information
Int_tdebugFlag1! used for special purpuses
HTrbLookup*lookup
HCategory*HldUnpack::pRawCat! pointer to category where data will be stored;
HldSubEvt*HldUnpack::pSubEvt! pointer to subevent where data are read from
Bool_tquietMode! do not print errors!
Bool_treportCritical! report critical errors!
UInt_tsubEvtId
Int_ttrbADC[128][10]
Int_ttrbDataExtension[128]
Bool_ttrbDataPairFlag
Int_ttrbDataVerdata structure version:
Int_ttrbExtensionSize
Int_ttrbLeadingMult[128]
Int_ttrbLeadingTime[128][10]
Int_ttrbTrailingMult[128]
Int_ttrbTrailingTime[128][10]
Int_ttrbTrailingTotalMult[128]FIXME: Pablos private version; total multiplicity for trailings

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HTrbBaseUnpacker(UInt_t id)
 constructor
void clearAll(void)
Int_t correctRefTimeCh31(void)

 Reference signal from channel 31 of TDC
 ist used for correction of corresponding TDC chns
 this is not the final version of
 hardware design
 call this function only if channel 31 contains
 reference time

Int_t correctRefTimeCh127(void)

 Reference signal from channel 127 (last in TRB)
 ist used for correction of ALL TDCs
 this is not the final version of
 hardware design
 call this function only if channel 127 contains
 reference time

Int_t correctOverflow(void)
 TDC overflow has to be corrected

 This is not necessary if the substract window bit is set in the TDCs
Bool_t fill_pair(Int_t ch, Int_t time, Int_t length)
 Stores the given time in the next data element
 and sets the multiplicity.
 Return false if 10 hits are already stored.

Bool_t fill_lead(Int_t ch, Int_t d)
 Stores the given time in the next data element
 and sets the multiplicity.
 Return false if 10 hits are already stored.

Bool_t fill_trail(Int_t ch, Int_t d)
 Calculates the time between trailing and LAST(!) leading hit.
 No other check if its really the right one,
 i am depending on the TDC to deliver the right order
 Return kFALSE if no leading yet or more than 4 Hits

void PrintTdcError(UInt_t e, UInt_t trbId)
Int_t decode(void)
HTrbBaseUnpacker(UInt_t id=0)
Int_t getSubEvtId(void)
{ return subEvtId; }
Int_t getTrbDataVer(void)
{ return trbDataVer; }
Int_t execute(void)
{ return 0;}
Bool_t init(void)
{ return kFALSE; }
void setQuietMode(void)
{quietMode=kTRUE;}
void setReportCritical(void)
{reportCritical=kTRUE;}
void setDebugFlag(Int_t db)
{ debugFlag = db;}
void setDebugFlag1(Int_t db)
{ debugFlag1 = db;}
Int_t getDebugFlag()
{ return debugFlag;}

Last change: Sat May 22 13:17:01 2010
Last generated: 2010-05-22 13:17

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.