class HMdcUnpacker: public HldUnpack

Function Members (Methods)

public:
HMdcUnpacker(HMdcUnpacker& mdc)
HMdcUnpacker(Int_t id, Bool_t dbg = kFALSE, Bool_t consisCheck = kFALSE)
HMdcUnpacker(Int_t id, Int_t version, 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)
Bool_tcheckMboRawStructBounds(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
Bool_tcheckMdcSetup(Int_t sector, Int_t module)
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
Int_tcompareEventDateTimeTo(UInt_t cyear, UInt_t cmonth = 1, UInt_t cday = 1, UInt_t chour = 0, UInt_t cmin = 0, UInt_t csec = 0)
virtual voidTObject::Copy(TObject& object) const
Bool_tdecodeSubHeader(UInt_t* data, UInt_t& subEvtSize)
Bool_tdecodingMode()
virtual voidTObject::Delete(Option_t* option = "")MENU
voiddetermineDecodeVersion()
voiddisableExcludeBlackList()
voiddisableRecoverBlackList()
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
voidenableExcludeBlackList(TString context)
voidenableRecoverBlackList(TString context)
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_tgetConsistencyCheck()
Bool_tgetContinueDecodingAfterInconsistency()
Bool_tgetDebug()
UInt_tgetDecodeVersion()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Bool_tgetExcludeBlackList()
Bool_tgetFillDataWord()
virtual const char*TObject::GetIconName() const
UInt_tgetMaxDecodeVersion()
voidgetMdcSetup()
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
Bool_tgetPersistencyDataWord()
Bool_tgetPersistencyRawEventHeader()
HldUnpack::HPPHldUnpack::getpSubEvt()
static Bool_tgetQuietMode()
Bool_tgetRecoverBlackList()
UInt_tgetRocEvtHeaderSize()
Bool_tgetStandalone()
virtual Int_tgetSubEvtId() const
Int_tgetSubEvtIdToSamNr(Int_t subEvtId, Bool_t expectUndefined = kFALSE)
UInt_tgetSubHeaderDecodeVersion()
Int_tgetTdc(const Int_t chip, const Int_t chan) const
Int_tgetTdcMode()
Int_tgetTime() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
Bool_tgetUnpackerDebug()
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()
HCategory*initCategory(Cat_t cat, TString catname = " ", TString detector = "Mdc")
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
static TStringmyexec(Char_t*)
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)
HMdcUnpacker&operator=(const HMdcUnpacker&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
voidprint(TString t = "")
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(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)
voidsetConsistencyCheck(Bool_t cons = kTRUE)
voidsetContinueDecodingAfterInconsistency(Bool_t cont = kTRUE)
voidsetDebug(Bool_t deb = kTRUE)
voidsetDecodeVersion(UInt_t version, Bool_t manual = kTRUE)
voidsetDefaults()
voidsetDisableSamNrConsistencyCheck(Bool_t cons = kTRUE)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidsetErrorOutputFileName(const Char_t* f)
voidSetErrorOutputFileName(const Char_t* c)
voidsetExcludeBlackList(Bool_t b = kTRUE)
voidsetExcludeBlackList(TString s)
voidsetExcludeBlackListContext(TString s)
voidsetFillDataWord(Bool_t b = kTRUE)
static voidTObject::SetObjectStat(Bool_t stat)
voidsetPersistencyDataWord(Bool_t b = kTRUE)
voidsetPersistencyRawEventHeader(Bool_t b = kTRUE)
voidsetQuietMode(Bool_t quiet = kTRUE)
voidsetRecoverBlackList(Bool_t b = kTRUE)
voidsetRecoverBlackList(TString s)
voidsetRecoverBlackListContext(TString s)
voidsetRocEvtHeaderSize(UInt_t ui = 3)
voidsetStandalone(Bool_t b = kTRUE)
voidsetSubHeaderDecodeVersion(UInt_t ui, Bool_t manual = kTRUE)
voidsetTdcMode(int)
virtual voidTObject::SetUniqueID(UInt_t uid)
voidsetUnpackerDebug(Bool_t b = kTRUE)
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
Bool_ttestMdcSetup(Int_t sec, Int_t mod)
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:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voiderrorAndExitCompareEventDateTimeTo()
voiderrorAndExitDetermineDecodeVersion()
voiderrorAndExitFillUnknownReturnValueOfFillData()
voiderrorAndExitGetMdcSetup()
voiderrorAndExitInitExcludeBlackListNoValidContext()
voiderrorAndExitInitRecoverBlackListNoValidContext()
voiderrorAndExitRecoverBlackListSep2005UnknownReturnValueOfFillData()
voiderrorAndExitSetDecodeVersion(UInt_t version)
voiderrorAndExitSetExcludeBlackListObsoleteCall()
voiderrorAndExitSetRecoverBlackListObsoleteCall()
voiderrorCheckMboRawStructBoundsOutOfBounds(Int_t value, Int_t maxValue, Int_t sector = -100, Int_t module = -100, Int_t mbo = -100)
voiderrorCheckMdcSetup(Int_t sector, Int_t module)
voiderrorDecodeSubHeaderCannotDecode()
voiderrorDecodingModeInvalidCompressMode(UInt_t compressMode, UInt_t decoding)
voiderrorExecuteErrorInFill()
voiderrorExecuteNoValidPointerTo(TString pointerName)
voiderrorFillCannotGetSlot(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
voiderrorFillDataPointerExceedingRange(UInt_t* deb, UInt_t* end, UInt_t* enddata)
voiderrorFillDecodeSubHeaderFailed()
voiderrorFillErrorFillingDataWord()
voiderrorFillMdcDataWordCannotGetSlot()
voiderrorFillMdcDataWordTooManyEntriesToSameLocation(Int_t maxentry)
voiderrorFillMdcRawEventHeaderCannotGetSlot()
voiderrorFillNoValidAddressInLookUpTable()
voiderrorFillSkippingRestOfSubEvent()
voiderrorFillUnknownCodeForBlacklistRecovery()
voiderrorGetSubEvtIdToSamNrSamNrNotInLookupTable(UInt_t localSubEvtId, Int_t samNr)
voiderrorGetSubEvtIdToSamNrSubEvtIdOutOfMdcRange(UInt_t localSubEvtId, TString range)
voiderrorInitCannotGetParameterContainer(TString container)
voiderrorInitCategoryCannotAddCategory(TString catname, TString detector)
voiderrorInitCategoryCannotGetCategory(TString catname)
Bool_texcludeBlackListData(UInt_t* data)
Int_texecuteBlackListRecovery()
Int_tfill()
Int_tfillData()
Int_tfillMdcDataWord(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
Int_tfillMdcRawEventHeader(Int_t errorFlag, Int_t rocModule, Int_t rocNumber, Int_t rocSector, Int_t subEventSize, Int_t trigType)
HMdcRaw*getFreeOrExistingSlot(Int_t& sector, Int_t& module, Int_t& mbo, Int_t& tdc)
voidinfoDetermineDecodeVersion()
Int_tinitExcludeBlackList()
Int_tinitRecoverBlackList()
voidTObject::MakeZombie()
Bool_tmatchHardwareAdressToSecModMboTdc(Int_t& sector, Int_t& module, Int_t& mbo, Int_t& tdc)
voidprepareBlackListRecovery(UInt_t eventSize)
voidprintExcludedBlackListCounter()
voidprintRecoveredBlackListCounter()
Int_trecoverBlackListApr2006()
Int_trecoverBlackListSep2005()
Int_trecoverBlackListSep2008()
voidreinitBlackListRecovery()
voidsetExcludeBlackListInternal(Bool_t b)
voidsetRecoverBlackListInternal(Bool_t b)
Bool_tstoreForRecoveryFromBlackList(UInt_t* data)
voidwarningExcludeDataWords(UInt_t data, UInt_t mask, UInt_t adress)
voidwarningExecuteNoValidModuleEntryInLookupTableForSamNr(Int_t samNr)
voidwarningExecuteNoValidSectorEntryInLookupTableForSamNr(Int_t samNr)
voidwarningExecuteSamNrNegative(Int_t samNr)
voidwarningInitExcludeBlackListNoValidContext(TString context)
voidwarningInitRecoverBlackListNoValidContext(TString context)
voidwarningRecoverBlackListSep2005IgnoringDatum(Int_t ctr, UInt_t datum)
voidwarningRecoverBlackListSep2005SkippingDataWord(UInt_t datum)
voidwarningSetQuietMode()

Data Members

public:
enum { versionSwitchId
COMPRESSED
UNCOMPRESSED
UNCOMPRESSED_ROC_HEADERSIZE
COMPRESSED_ROC_HEADERSIZE
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Bool_tconsistencyCheck! flag for consistency check on the data words
Bool_tcontinueDecodingAfterInconsistency! flag to enable stubborn behaviour of unpacker
UInt_tcreateBlackListRecoveryTools! 0 if not active else in hex date of time
static HMdcDataWord*dataword!
Bool_tdebug! flag for debug mode w/ extended output
UInt_tdecodeVersion! version number of data word decoding
Int_tdetermineDecodeVersionCtr! internal counter
Bool_tdisableSamNrConsistencyCheck! flag to disable check on SAM Nr to sector check
Bool_texcludeBlackList! switch to exclude explicitly data words
UInt_t*excludeBlackListAdress! list of adresses for comparison, preliminary parameter, to be replaced by a lookup table
TStringexcludeBlackListContext! context string for different exclude list, default:"UNDEFINED";
static const TStringexcludeBlackListContextDefaultString
UInt_t*excludeBlackListMask! list of hex masks on dataword for matching test with adress, preliminary parameter, to be replaced by a lookup table
Int_texcludeBlackListSize! number of adresses/mask of black list
Int_t*excludedBlackListCounters! counters of excluded data words
Bool_tfillDataWord! flag to enable filling of the dataword
UInt_tmaxDecodeVersion! maximum number of decode versions
Bool_tmdcDataWordCatPersistency! flag for persistency of HMdcDataWord category
Bool_tmdcRawEventHeaderCatPersistency! flag for persistency of HMdcRawEventHeader category
static Bool_tnoComment! switch off all prints
HCategory*pMdcDataWordCat
HCategory*pMdcRawEventHeaderCat
HCategory*HldUnpack::pRawCat! pointer to category where data will be stored;
HMdcEvReadout*pReadout!Lookup table
HldSubEvt*HldUnpack::pSubEvt! pointer to subevent where data are read from
HMdcRawStruct*rawc
Bool_trecoverBlackList! switch to recover explicitly data words
UInt_t*recoverBlackListAdress! list of adresses for comparison, preliminary parameter, to be replaced by a lookup table
TStringrecoverBlackListContext! context string for different recover list, default:"UNDEFINED";
static const TStringrecoverBlackListContextDefaultString
UInt_t*recoverBlackListMask! list of hex masks on dataword for matching test with adress, preliminary parameter, to be replaced by a lookup table
Int_trecoverBlackListSize! number of adresses/mask of black list
Int_t*recoveredBlackListCounters! counters of recovered data words
UInt_t*recoveryStorage! pointer to array to store data values for recovery
UInt_trecoveryStorageCounter! size of recovery array
UInt_trocEvtHeaderSize! size of the roc header;
Int_tsetup[6][4]! setup of Mdc (sec,mod)
Bool_tstandalone! If MDCs are not run via the common daq system, but in a standalone mode, ...
Int_tsubEvtId!
UInt_tsubHeaderDecodeVersion! version number of subHeader decoding
Int_ttdcModetdcMode defines the mode the tdc has taken data:
Bool_tunpackerDebug! switch to display debug infos of the unpacker software
Bool_tversionSetManual! switch for version setting of unpacker

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

HMdcUnpacker(Int_t id, Bool_t dbg = kFALSE, Bool_t consisCheck = kFALSE)
 id = sub event id for which the unpacker is called by
HMdcUnpacker(Int_t id, Int_t version, Bool_t dbg = kFALSE, Bool_t consisCheck = kFALSE)
HMdcUnpacker(HMdcUnpacker& mdc)
~HMdcUnpacker()
void setDefaults(void)
 set the default values for all intrinsic variables
 called by the constructor
Bool_t getQuietMode()
 get status of quietMode
 quiet = kTRUE : messaging switch off
       = kFALSE: messages are displayed
void setQuietMode(Bool_t quiet = 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
UInt_t getDecodeVersion(void)
 returns decoding version of the unpacker

      version    : decoding version for the unpacker

                   version = 1, used for data since  2002-10-01 12:00:00
                                includes new naming scheme for the SAMs
                   version = 0, used for data before 2002-10-01 12:00:00

void setDecodeVersion(UInt_t version, Bool_t manual = kTRUE)
 set decoding version of the unpacker

      version    : decoding version for the unpacker

                   version = 1, used for data since  2002-10-01 12:00:00
                                includes new naming scheme for the SAMs
                   version = 0, used for data before 2002-10-01 12:00:00

      manual     : used for internal calls

 if version exceeds the value of maxDecodeVersion exit is called
Int_t getTdcMode(void)
 returns mode the tdc is triggering on signals
 mode 0 (default) : trigger on leading and trailing edge
 mode 1           : trigger on 2 leading edges:
void setTdcMode(int )
 In measurement mode the TDC accepts two hits per channel. The TDC can hereby
 trigger either on on a leading and the trailing edge of a single pulse
 or on two leading edges.
 This influences the polarity of the hitCounter in the HMdcRaw Class:
 mode 0  : trigger on leading and trailing edge
           (hit multiplicity nHits: +1 or +2)
 mode 1  : trigger on 2 leading edges:
           (hit multiplicity nHits: -1 or -2)
 (0 default if i is not equal to 0 or 1)
void setRocEvtHeaderSize(UInt_t ui = 3)
 function to set the size in words of the ROC Header
TString myexec(Char_t* )
 tool to execute an arbitray unix command
 the output is returned as an Char_t pointer (maximum size 1000)
 TODO: check whether PTools::myexec or other method can replace it
void print(TString t = "")
 prints out the variables of the unpacker object
Bool_t init()
 Initialisation of
                  - lookup table
                  - category for raw-level  storage
                  - additional category if debug option
                  - additional Tree if debug option
                  - local mdc setup table for lookup
void getMdcSetup()
 gets Mdc detector setup
 and initializes setup array
HCategory* initCategory(Cat_t cat, TString catname = " ", TString 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 initExcludeBlackList(void)
 initializes list of black listed mask and adress matches to be exclude from data stream
Int_t initRecoverBlackList(void)
 initializes list of black listed mask and adress matches which can be recovered
Bool_t reinit()
 reinit function
 if versionSetManual not set it determines the decodeVersion via determineDecodeVersion()
void reinitBlackListRecovery()
Int_t execute()
 execute funtion of the task
 calls the fill() function (DETAILED) information here
 before it checks whether the called subEvtId corresponds
 to an active module in the mdc detector setup

 return values: always 1 (philosophy: a wrong sub event should not affect the other sub events)
Bool_t testMdcSetup(Int_t sec, Int_t mod)
 Tests the Mdc setup if the module are present
 in the running analysis at position sector, module
Int_t getSubEvtIdToSamNr(Int_t subEvtId, Bool_t expectUndefined = kFALSE)
 determines the samNr from the sub event id localSubEvtId
 in addition it crosschecks the samNr with the DAQ specifications
 and does boundary checks by default.
 You can switch it off by setDisableSamNrConsistencyCheck()
Int_t fill()
 fill function:
 performs the loop over the subevent data

 -- if the ROC header size > 0 (change it via setRocEvtHeaderSize())
    then the roc header is decoded via decodeSubHeader()
    otherwise the whole subevent is decoded as once

 -- The data loop performs the following steps
     1.a. if enabled check for recoverable blacklisted adresses and store them
     1.b. if enabled check for further blacklisted adresses and ignore them
     2.   call of decode for each dataword
     3.   the hardware address is matched to the sector/module/mbo/tdc coordinates of HMdcRaw
          via the lookup table HMdcEvReadout
     4.   a new/existing slot at the corresponding address is requested
     5.   the time information is filled to this slot

 --  if enabled recover recoverable datawords after the data loop

 --  if the debug and fillDataWord flag is set (set via setFillDataWord() and setDebug())
     the extended dataword information is written to the category HMdcDataword()
     (the persistency of this container can be set via setPersistencyDataWord())

 -- the return values of the function are:
     1 : success
    -1 : Error while decoding the dataword
    -1 : Error while decoding the roc header
    -1 : Error while decoding the in data loop (data pointer exceeds data range)
    -2 : Error while filling the to category HMdcRaw

 -- in the case that there is no entry in the lookup table
    for a correctly decoded dataword there the next dataword is taken


 DETAILS:
 The single steps of this function are:

 1. check for existing pointers to subEvt and pReadout
    - if not
      -> "goto" end of function returning 1

 2. if the decode version is not set manually (via setDecodeVersion())
    -> call determineDecodeVersion()

 3. get subEvt's pointers to data and its end

 4. check for positive difference (data-end > 0)
    - if not
      -> leave function with return code -1

 5. if decodingMode() returns kFALSE (DETAILS see decodingMode())
      -> leave function with return code -1

 6. if "recoverBlackList" is enabled
      -> call prepareBlackListRecovery()

 7. sub sub event while loop

 7.1. determine end of subsub event loop from subsub event header

 7.2. subsub event dataword loop

 7.2.1. check whether subsub event endpointer exceeds sub event pointer
        - yes:
          -> skipping rest of sub event returning -1
            (incl. a possible correction of recoverable datawords)
          -> exception: "ontinueAfterInconsistency" is enabled
             -> continue with next dataword at 7.2

 7.2.2. if "recoverBlackList" is enabled
        -> check if dataword matches the list criteria
           - yes:
             -> call storeForRecoveryFromBlackList()
                and continue with next dataword at 7.2

 7.2.3. if "recoverBlackList" is enabled
        -> check if dataword matches the list criteria
           - yes:
             -> continue with next dataword at 7.2

 7.2.4. dataword decoding

        * behaviour during the dataword decoding:
   	      - if the consistency check is switched
            - on
              -> decode returns
   	             - kFALSE if any of the border checks failed
   	             - kTRUE else
   	        - off
              -> decode returns kTRUE

 	      - in case of an inconsistency: (kFALSE returned from decode with checkInconsistency switched on)
    	-> the decoding of all following datawords of this sub event is skipped
      	   (including a possible correction of recoverable datawords)
               the function returns -1
    	-> exception: "continueDecodingAfterInconsistency" is enabled
         	   - then, ignoring this maybe hazardous error (!!!),
                 decoding is continued with the next dataword at 7.2

 	      - in case of errors and "noComment" disabled
    	-> error messages are issued
       	and if also unpackerDebug is enabled
       	-> the dataword is dumped to the screen

  7.2.5. fill data to Raw categories calling fillData()
         in case of failures of fillData():
         - adress, setup or matching table errors
           -> continue with next dataword at 7.2
         - "cannot get Slot" (severe problems)
           -> leave function returning -1 and skipping rest of sub event
              (incl. possible recovery of datawords)

  7.2.6. END OF subsub event dataword loop

  7.3. increase data pointer by subsub event size

  7.4. END OF sub event while loop

  8. if recoverBlackList is enabled
     -> call of executeBlackListRecovery()
        - same return code behaviour as in 7.2.5 (fillData())

  9. leave function always returning 1

void determineDecodeVersion(void)
 
obsolete !!!
 
cannot be used any more since nov02, because the runId's are now
 
random numbers not containing any useful time information
 
you have to set the decode version manually with setDecodeVersion()

 method to determine from the referenceId/runId the time and so the valid version for decoding
 see the discription in setDecodeVersion()

Int_t compareEventDateTimeTo(UInt_t cyear, UInt_t cmonth = 1, UInt_t cday = 1, UInt_t chour = 0, UInt_t cmin = 0, UInt_t csec = 0)
 function to compare were the date and time of the event is relative to the given Time and Date
 returns:

  0 : time and date are the same
  1 : time and date of event are after the given time
 -1 : time and date of event are before the given time
Bool_t decodingMode(void)
 evaluates the decoding info in the sub event header

 dependent on the decoding information in the sub event header
 the following modes are selected:

 the least significant byte of the decoding word determines the compression modes:
 so decoding & f =

    0 : not allowed by definition of the sub event header

    1 : uncompressed structure
              - the event contains a roc sub structure
              - error bits and roc event sizes are determined from the roc headers
                and filled independently to HMdcRawEventHeader

    2 : compressed structure
              - the only contains pure data words
              - error informations are determined from
                the second least significant byte
                and assigned to all roc header synchronously
                to HMdcRawEventHeader but shifted by 4 bits to the left (*16)
                also the size of the complete sub event is assigned to each roc
                to distinguish from the case they have a negativ sign.

    any other value: not defined
Bool_t decodeSubHeader(UInt_t* data, UInt_t& subEvtSize)
 decodes the sub header (ROC-Header)
 and returns the size of this header

 If the errorFlag of the ROC-Header is set or
 the debug flag of the unpacker is set
 the header is written out to the category HMdcRawEventHeader
 (set its persistency via, setPersistencyRawEventHeader())

 If the standalone mode is chosen the trigger type (id) of the whole event
 is set to the trigger type of the roc header if it is a calibration trigger
 (If MDCs are not run via the common daq system, but in a standalone mode,
 the event trig type is not provided in the event header (it is always 1).)
Int_t fillMdcRawEventHeader(Int_t errorFlag, Int_t rocModule, Int_t rocNumber, Int_t rocSector, Int_t subEventSize, Int_t trigType)
 function for filling the category HMdcRawEventHeader
void prepareBlackListRecovery(UInt_t eventSize)
Int_t executeBlackListRecovery()
Bool_t storeForRecoveryFromBlackList(UInt_t* data)
 Is dataword include in an recovery black list?
 TODO: recovery black list from oracle
 first masking then comparing to adress
 if it matches this dataword is stored
 until the end of the while loop and then processes

 returns kTRUE if data word matches
         kFALSE else
Bool_t excludeBlackListData(UInt_t* data)
 Is dataword included in an excluding black list?
 TODO: black list from oracle
 first masking then comparing to adress
 if it matches this dataword is ignored

 returns kTRUE if data word matches
         kFALSE else
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()
 (formerly additional debug had to be switched on, not necessary any more)
Bool_t matchHardwareAdressToSecModMboTdc(Int_t& sector, Int_t& module, Int_t& mbo, Int_t& tdc)
 the hardware address is matched to the sector/module/mbo/tdc coordinates of HMdcRaw
 via the lookup table HMdcEvReadout
 the result is checked for consistency
 deb is the pointer to the current rwa dataword

 kFALSE is returned in case of failures
 otherwise kTRUE
Bool_t checkMdcSetup(Int_t sector, Int_t module)
 checks whether module and sector are set in the MdcSetup
 returns kTRUE if set,
 kFALSE else
Bool_t checkMboRawStructBounds(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
 checks consistency whether sector, module, mbo, tdc values are inside
 the bounds of the parameter container MboRawStruct
 return value
              kTRUE the checks were passed
              kFALSE if otherwise
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

Int_t recoverBlackListApr2006()
 Hardware bugfix for beamtime apr2006:
 In Module IV (Orsay) of Sector IV (SubEvtId 222)
 The mob id of the two motherboards in the LVL1 chain
 of mbo 113 and mbo 115 is corrupted.

 Up to now the Blacklist option ignored all datawords of this if activated
 Now it the channels should if possible be reconstructed:

 Because mbo 113 is a 64-channel board and mbo 115 is a 96 Long_t     // the topmost 32 channels can automatically be assigned to mbo 115

 Since this is the same error as in Sep2005
 recoverBlackListSep2005 is called
Int_t recoverBlackListSep2005()
 Hardware bugfix for beamtime sep05:
 In Module IV (Orsay) of Sector IV (SubEvtId 222)
 The mob id of the two motherboards in the LVL1 chain
 of mbo 113 and mbo 115 is corrupted.

 Up to now the Blacklist option ignored all datawords of this if activated
 Now the channels should, if possible, be reconstructed:

 Because mbo 113 is a 64-channel board and mbo 115 is a 96 Long_t
 the topmost 32 channels can automatically be assigned to mbo 115
Int_t recoverBlackListSep2008(void)
void enableExcludeBlackList(TString context)
void disableExcludeBlackList()
void setExcludeBlackList(Bool_t b)
void setExcludeBlackListContext(TString s)
void setExcludeBlackList(TString context)
 function set/unset exclude black list feature via HMdcUnpacker::setExcludeBlackList
 and its context via HMdcUnpacker::setExcludeBlackListContext
 in one line.

 if context is empty or equal to HMdcUnpacker::excludeBlackListContextDefaultString
 the feature is deactivated.
 Any other value activates this, provided a corresponding table exists
 up to now "sep05" is the only valid context
 (see HMdcUnpacker::init() function)
void enableRecoverBlackList(TString context)
void disableRecoverBlackList()
void setRecoverBlackList(Bool_t b)
void setRecoverBlackListContext(TString s)
void setRecoverBlackList(TString context)
 function set/unset recover black list feature via HMdcUnpacker::setRecoverBlackList
 and its context via HMdcUnpacker::setRecoverBlackListContext
 in one line.

 if context is empty or equal to HMdcUnpacker::recoverBlackListContextDefaultString
 the feature is deactivated.
 Any other value activates this, provided a corresponding table exists
 up to now "sep05" is the only valid context
 (see HMdcUnpacker::init() function)
Bool_t finalize()
 finalize function
 returning always kTRUE
void printExcludedBlackListCounter()
 prints out messages for each mask - adress pair how many excludes were encountered
void printRecoveredBlackListCounter()
 prints out messages for each mask - adress pair how many recovers were encountered
void infoDetermineDecodeVersion(void)
void warningExcludeDataWords(UInt_t data, UInt_t mask, UInt_t adress)
void warningExecuteNoValidModuleEntryInLookupTableForSamNr(Int_t samNr)
void warningExecuteNoValidSectorEntryInLookupTableForSamNr(Int_t samNr)
void warningExecuteSamNrNegative(Int_t samNr)
void warningInitExcludeBlackListNoValidContext(TString context)
void warningInitRecoverBlackListNoValidContext(TString context)
void warningRecoverBlackListSep2005IgnoringDatum(Int_t ctr, UInt_t datum)
void warningRecoverBlackListSep2005SkippingDataWord(UInt_t datum)
void warningSetQuietMode(void)
void errorCheckMboRawStructBoundsOutOfBounds(Int_t value, Int_t maxValue, Int_t sector = -100, Int_t module = -100, Int_t mbo = -100)
void errorCheckMdcSetup(Int_t sector, Int_t module)
void errorDecodeSubHeaderCannotDecode()
void errorDecodingModeInvalidCompressMode(UInt_t compressMode, UInt_t decoding)
void errorExecuteErrorInFill()
void errorExecuteNoValidPointerTo(TString pointerName)
void errorFillCannotGetSlot(Int_t sector, Int_t module, Int_t mbo, Int_t tdc)
void errorFillDecodeSubHeaderFailed()
void errorFillDataPointerExceedingRange(UInt_t* deb, UInt_t* end, UInt_t* enddata)
void errorFillErrorFillingDataWord()
void errorFillMdcDataWordTooManyEntriesToSameLocation(Int_t maxentry)
void errorFillMdcDataWordCannotGetSlot()
void errorFillMdcRawEventHeaderCannotGetSlot()
void errorFillNoValidAddressInLookUpTable()
void errorFillSkippingRestOfSubEvent(void)
void errorFillUnknownCodeForBlacklistRecovery()
void errorGetSubEvtIdToSamNrSamNrNotInLookupTable(UInt_t localSubEvtId, Int_t samNr)
void errorGetSubEvtIdToSamNrSubEvtIdOutOfMdcRange(UInt_t localSubEvtId, TString range)
void errorInitCannotGetParameterContainer(TString container)
void errorInitCategoryCannotAddCategory(TString catname, TString detector)
void errorInitCategoryCannotGetCategory(TString catname)
void errorAndExitCompareEventDateTimeTo()
void errorAndExitDetermineDecodeVersion(void)
void errorAndExitFillUnknownReturnValueOfFillData()
void errorAndExitGetMdcSetup()
void errorAndExitInitExcludeBlackListNoValidContext()
void errorAndExitInitRecoverBlackListNoValidContext()
void errorAndExitRecoverBlackListSep2005UnknownReturnValueOfFillData()
void errorAndExitSetDecodeVersion(UInt_t version)
void errorAndExitSetExcludeBlackListObsoleteCall()
void errorAndExitSetRecoverBlackListObsoleteCall()
Bool_t getConsistencyCheck(void)
{return consistencyCheck;}
Bool_t getContinueDecodingAfterInconsistency(void)
{return continueDecodingAfterInconsistency;}
Bool_t getDebug(void)
{return debug;}
UInt_t getMaxDecodeVersion(void)
{return maxDecodeVersion;}
Bool_t getExcludeBlackList(void)
{return excludeBlackList;}
Bool_t getRecoverBlackList(void)
{return recoverBlackList;}
Bool_t getFillDataWord(void)
{return fillDataWord;}
Bool_t getPersistencyRawEventHeader(void)
{return mdcRawEventHeaderCatPersistency;}
Bool_t getPersistencyDataWord(void)
{return mdcDataWordCatPersistency;}
Bool_t getStandalone(void)
{return standalone;}
Int_t getSubEvtId(void)
{ return subEvtId; }
UInt_t getSubHeaderDecodeVersion(void)
{return subHeaderDecodeVersion;}
UInt_t getRocEvtHeaderSize(void)
{return rocEvtHeaderSize;}
Int_t getTime(void)
{ return dataword->getTime();}
Int_t getTdc(const Int_t chip, const Int_t chan) const
{return 8*chip + chan;}
Bool_t getUnpackerDebug(void)
{return unpackerDebug;}
void setConsistencyCheck(Bool_t cons = kTRUE)
{consistencyCheck=cons;}
void setDebug(Bool_t deb = kTRUE)
{debug=deb;}
void setDisableSamNrConsistencyCheck(Bool_t cons = kTRUE)
{disableSamNrConsistencyCheck=cons;}
void setErrorOutputFileName(const Char_t* f)
{Warning("setErrorOutputFileName()","obsolete function, no effect");}
void SetErrorOutputFileName(const Char_t* c)
{setErrorOutputFileName(c);}
void setFillDataWord(Bool_t b = kTRUE)
void setPersistencyRawEventHeader(Bool_t b = kTRUE)
{mdcRawEventHeaderCatPersistency=b;}
void setPersistencyDataWord(Bool_t b = kTRUE)
{mdcDataWordCatPersistency=b;}
void setStandalone(Bool_t b = kTRUE)
{standalone = b;}
void setSubHeaderDecodeVersion(UInt_t ui, Bool_t manual = kTRUE)
{subHeaderDecodeVersion=ui; versionSetManual=manual;}
void setUnpackerDebug(Bool_t b = kTRUE)
{unpackerDebug=b;}
void setExcludeBlackListInternal(Bool_t b)
{excludeBlackList=b;}
void setRecoverBlackListInternal(Bool_t b)
{recoverBlackList=b;}

Last change: Sat May 22 13:04:19 2010
Last generated: 2010-05-22 13:04

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.