ROOT logo
HYDRA - THE HADES ANALYSIS PACKAGE » (UNKNOWN) » HMdcUnpacker

class HMdcUnpacker: public HldUnpack

 File: $RCSfile: $

 Author: Joern Wuestenfeld

 Version: $Revision $
 Modified by $Author $



_HADES_CLASS_DESCRIPTION

 HMdcUnpacker

 setDoBitFlipCorr(Bool_t do=kTRUE,TString version="auto") enables (default) or
 disables the bit flip corrections. By default the version is recognized by
 the filename (year,dayOfYear) ("auto"). The versions can be set manually
  version :   "auto"   by filename (works on standard file names like
               be1222210203001.hld (containing evtbuilder),
               be12222102030_10.hld (grep files, no evtbuilder but _xx*.hld)
               and an of the above with .hld.f_ (filtered files))
              "apr12"  for beam data apr12  (does no analyze filenames)

Function Members (Methods)

public:
HMdcUnpacker(HMdcUnpacker& unp)
HMdcUnpacker(Int_t id, Bool_t dbg = kFALSE, Bool_t consisCheck = kFALSE)
virtual~HMdcUnpacker()
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* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Int_tHldUnpack::decodeTrbNet(UInt_t* data, Int_t subEventId = 0)
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
virtual Bool_tfinalize()
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Bool_tgetDebugMode() const
UInt_tgetDecodeVersion()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
HldEvt*HldUnpack::getHldEvt()
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
HldSubEvt**HldUnpack::getpSubEvt()
virtual Int_tgetSubEvtId()
Int_tgetTdcMode()
virtual const char*TObject::GetTitle() 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()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
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)
HMdcUnpacker&operator=(const HMdcUnpacker&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Bool_treinit()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidHldUnpack::setCategory(HCategory* aCat)
voidsetDoBitFlipCorr(Bool_t corr = kTRUE, TString version = "auto")
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetFillDataWord(Bool_t b)
voidsetFillOepStatus(Bool_t b)
voidHldUnpack::setHldEvt(HldEvt* evt)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetPersistencyDataword(Bool_t b = kTRUE)
voidsetPersistencyOepStatusData(Bool_t b = kTRUE)
voidsetQuietMode(Bool_t quiet = kTRUE, Bool_t warn = kTRUE)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_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:
Bool_tcheckConsistency(Int_t sector, Int_t module, Int_t mbo, Int_t tdc, Int_t channel)
voidcorrectBitFlip(HMdcRaw*, Int_t year, Int_t month, Int_t day)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tfillData()
Int_tfillMdcDataWord(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
Int_tfillStatus()
Bool_tgetContinueDecodingAfterInconsistency()
Bool_tgetDebug()
Bool_tgetDoAddrCorrection()
HMdcRaw*getFreeOrExistingSlot(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
HCategory*initCategory(Cat_t cat, const char* catname = " ", const char* detector = "Mdc")
voidTObject::MakeZombie()
voidsetContinueDecodingAfterInconsistency(Bool_t cont = kTRUE)
voidsetDefaults()
voidsetDoAddrCorrection(Bool_t val)

Data Members

protected:
HMdcOepAddrCorrPar*addrCorrPar! Pointer to OEP address correction map
Int_tbadEventsCounter! Counter for events wich have errors and get skipped
TStringbitFlipVersion! default = "auto"
Bool_tconsistencyCheck! enable consistency check on data
Bool_tcontinueDecodingAfterInconsistency! Flag to enable stubborn behaviour of unpacker
HMdcDataword*dataword! Pointer to dataword
Bool_tdebugMode! switch on debugging mode of unpacker
Int_tdecodeVersion! Version number of data word decoding
Bool_tdoAddrCorrection! enable address correction of OEP's
Bool_tdoBitFlipCorr! correct known bitflips of MBos
Bool_tdoMapOutUnusedChannels! enable mapping of unused channels
Bool_tfillDataWord! Flag to enable filling of the dataword
Bool_tfillOepStatus! Flag to enable oepstatus word filling
HMdcLookupGeom*lookupGeom! Pointer to lookup table channel to wire number
Bool_tmdcDataWordCatPersistency! Flag for persistency of HMdcDataWord category
Bool_tmdcOepStatusCatPersistency! Flag for persistency of HMdcOepStatusData category
Int_tmodule! Module handled.
Bool_tnoComment! Flag to enable basic debug printouts
HDetector*pDetector! Pointer to Detector
HldEvt*HldUnpack::pEvt!
HCategory*pMdcDataWordCat! Pointer to category to store raw event information in
HCategory*pMdcOepStatusCat! Pointer to category to store Oep Status words in
HCategory*HldUnpack::pRawCat! pointer to category where data will be stored;
HldSubEvt*HldUnpack::pSubEvt! pointer to subevent where data are read from
HMdcUnpackerPar*pUnpackerPar! Pointer to unpacker parameters for data recovery
HMdcRawStruct*rawc! Pointer to lookup table
Int_tsector! Sector handled.
Int_tsubEvtId! Sub event Id this unpacker is responsible for.
Int_ttdcMode! tdcMode defines the mode the tdc has taken data:
HTrbNetUnpacker*trbNetUnpacker!
HTrbNetUnpacker*HldUnpack::trbNetUnpacker! Poinetr to unpacker for TRB Net data structures

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcUnpacker(Int_t id, Bool_t dbg = kFALSE, Bool_t consisCheck = kFALSE)
 Default constructor.
 id = sub event id for which the unpacker is called
 dbg = debug flag
 consisCheck = enable consistency checking of dataword
HMdcUnpacker(HMdcUnpacker& unp)
 Copy constructor
~HMdcUnpacker(void)
 Destructor
Bool_t init(void)
 Initialization routine.
 Retrieves pointers to the following objects:
			- unpacker parameters
			- raw structure
			- address correction table
			- category for raw - level information
			- category for debug information (if requested)
Bool_t reinit(void)
 reinit function, called for every new file once.
 Creates dataword depending on data version
Int_t execute(void)
 This function is called for each event
 It does the unpacking of the data from the hld file into the RAW category.

 return values: always 1 (philosophy: a wrong sub event should not affect the other sub events)
Bool_t finalize(void)
 Called at the end of the event loop.
 Should do nothing!
void correctBitFlip(HMdcRaw* , Int_t year, Int_t month, Int_t day)
HCategory * initCategory(Cat_t cat, const char* catname = " ", const char* detector = "Mdc")
 inits the container cat
 looks first whether it already exists
 otherwise it is created
 default for detector is "Mdc"
 catname is used for Error handling
Int_t fillData(void)
 Converts the content of the already decoded dataword via the lookup table HMdcEvReadout
 to sector/module/mbo/tdc coordinates.
 Then, if available the information is stored in a new or added to an existing
 data slot of HMdcRaw
 If activated, the raw data is written by fillMdcDataWord()
void setDefaults(void)
 Define defaults for all internal variables.
void setQuietMode(Bool_t quiet = kTRUE, Bool_t warn = kTRUE)
 switch to disable all error messages and warnings from hmdcunpacker AND hmdcdataword
 quiet = kTRUE : messaging switch of
       = kFALSE: messages are displayed
void setContinueDecodingAfterInconsistency(Bool_t cont = kTRUE)
 this function is only for debugging use!
 the decoding of the data words continue even if there is
 unconsistency in the datawords
 cont = kTRUE : continue
 cont = kFALSE: skip event
HMdcRaw* getFreeOrExistingSlot(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
 get a free or existing slot from the HMdcRaw category
 at the location of HLocation loc
 returns the pointer to the (new) HMdcRaw object
 NULL if it couldn't be done
Int_t fillMdcDataWord(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
 function for filling the category HMdcDataword
 Return 1 on success, -2 on failure.
Int_t fillStatus(void)
 function for filling the category HMdcDataword
 Return 1 on success, -2 on failure.
Bool_t checkConsistency(Int_t sector, Int_t module, Int_t mbo, Int_t tdc, Int_t channel)
Bool_t getContinueDecodingAfterInconsistency(void)
Bool_t getDebug(void)
{return debugMode;}
Bool_t getDoAddrCorrection(void)
void setDoAddrCorrection(Bool_t val)
Bool_t getDebugMode(void)
{return debugMode;}
UInt_t getDecodeVersion(void)
{return decodeVersion;}
Int_t getSubEvtId(void)
{return subEvtId;}
Int_t getTdcMode(void)
{return tdcMode;}
void setFillDataWord(Bool_t b)
void setFillOepStatus(Bool_t b)
void setPersistencyDataword(Bool_t b = kTRUE)
void setPersistencyOepStatusData(Bool_t b = kTRUE)
void setDoBitFlipCorr(Bool_t corr = kTRUE, TString version = "auto")
{ doBitFlipCorr=corr; bitFlipVersion = version; }