#include "hmatchuunpacker.h"

HMatchUUnpacker


class description - source file - inheritance tree (.pdf)

class HMatchUUnpacker : public HldUnpack

Inheritance Chart:
TObject
<-
HldUnpack
<-
HMatchUUnpacker
    private:
Bool_t checkRichLSW(UInt_t d) Bool_t checkRichMSW(UInt_t d) Int_t decodeIpuRich(UInt_t* pData, Int_t maxLength) Int_t decodeIpuShower(UInt_t* pData, Int_t maxLength) Int_t decodeIpuTof(UInt_t* pData, Int_t maxLength) Int_t decodeMUData(UInt_t* pData, Int_t maxLength) Int_t decodeRich(UInt_t* pData, Int_t maxLength) Int_t decodeShower(UInt_t* pData, Int_t maxLength) Int_t decodeShowerOld(UInt_t* pData, Int_t maxLength) Int_t decodeTof(UInt_t* pData, Int_t maxLength) UInt_t* expansion(UInt_t* d, Int_t longueur) Int_t fillTofData(HMatchUTof* mtof, UInt_t dataWord) void getExpanded(Int_t d) Int_t getLeptonDetBit(Int_t d) Int_t getLeptonFlag(Int_t d) Int_t getLeptonMetaNr(Int_t d) Float_t getLeptonMom(Int_t d) Int_t getLeptonRichNr(Int_t d) Int_t getLeptonSector(Int_t d) Int_t getRichColumPattern(UInt_t d) Int_t getRichFifoNb(UInt_t d) Int_t getRichRow(UInt_t d) UInt_t getRichSecHeader(UInt_t d) Int_t getRichSegId(UInt_t d) Int_t getRichSize(UInt_t d) Int_t getScaler(UInt_t d) Int_t getShowBuildID(Int_t d) Int_t getShowColumn(Int_t d) Int_t getShowFrameCount(Int_t d) Int_t getShowRowPattern(Int_t d) Int_t getTofId(UInt_t d) Int_t getTofTriggerCode(UInt_t d) Int_t getTofTriggerTag(UInt_t d) Int_t getTofVeto(UInt_t d) Bool_t isShowTrailer(UInt_t d) Int_t mapAngles() void setDefaults() void setLogging() HShowerSubIdPar* showerParamConfigure(HShowerUnpackParam* param, Int_t subEvtId) Int_t storeShowElements(Int_t buildID, Int_t rowPattern, Int_t col) public:
HMatchUUnpacker(Int_t unites = 0, Bool_t compression = kFALSE, Int_t flog = 0, TString vers = aug04) HMatchUUnpacker(Int_t id, Int_t units, Bool_t compression = kFALSE) HMatchUUnpacker(const HMatchUUnpacker&) virtual ~HMatchUUnpacker() static TClass* Class() virtual Int_t execute() Int_t getRichEmptyCount() virtual Int_t getSubEvtId() const virtual Bool_t init() virtual TClass* IsA() const Bool_t isDebugMode() HMatchUUnpacker& operator=(const HMatchUUnpacker&) virtual Bool_t reinit() void setDebugMode(Bool_t dm) void setLoggingMode(Bool_t flog) void setRichDebugMode(Bool_t dm) void setShowerDebugMode(Bool_t dm) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
Int_t evt Event counter Int_t tofNr Number of TOF datawords Int_t tofLep Number of TOF leptons Int_t showerNr Number of SHOWER datawords Int_t showerLep Number of SHOWER leptons HLocation fLoc Address to be used when writing to category HCategory* fCatRich Output category for Rich HCategory* fCatShower Output category for Shower HCategory* fCatTof Output category for Tof HCategory* fCatLeptons Output category for leptons HCategory* fCatDiLeptons Output category for dileptons HCategory* fCatScalers Output category for scalers HMUData* muData Matching unit data HMUScalers* muScalers Matching unit scaler data TIterator* iterLepton Iterator over lepton category. TArrayC* Rich_Sector_Map Mapping of RICH IPU address to sector number HRecEvent* event Pointer to event structure Int_t fUnit Conversion flag: 0-DEG 1-RAD FILE* fMU_logfile log file Int_t fLog log flag Bool_t isCompressed flag for the new format Int_t version switch different beamtimes Int_t TofIpuNr which tof ipu Int_t Row_Offset Row offset in RICH Int_t MUDataFormat Version of MU data format Bool_t isInitialized Initalization flag Int_t hitpersec[6] Number of hits per sector in RICH Int_t nShower[6] Number of hits per sector in SHOWER Int_t nTof[6] Number of hits per sector in TOF Int_t sec_old Old sector number EXPAND expand Expanded dataword (defined as: struct {Int_t dataw1; Int_t dataw2;}) UInt_t* data Pointer to dataword Int_t triggerCode Trigger code of actual event UInt_t sec_count Counter for sectors UInt_t RichSecPatternMask Pattern mask for RICH data UInt_t ShowerSecPatternMask Pattern mask for SHOWER data UInt_t TofSecPatternMask Pattern mask for TOF data UInt_t MU_sec_pattern_Rich Pattern mask for RICH MU dat UInt_t MU_sec_pattern_Shower Pattern mask for SHOWER MU data UInt_t MU_sec_pattern_Tof Pattern mask for TOF MU data Int_t mapNrTof[6][100] Number of matched RICH hits per sector Int_t mapNrShower[6][100] Number of mapped SHOWER hits per sector Int_t mapNrRich[6][100] Number of mapped TOF hits per sector HShowerUnpackParam* fShowerParam shower unpacker parameters HTriggerParShowerMap* fTrigParSho shower mapping parameters HTriggerParRichMap* fTrigParRich rich mapping parameters HTriggerSetup* fTrigSetup trigger setup container protected:
Int_t kSubEvtId Subevent Id for which the unpacker is responsible Bool_t fDebugMode global debug mode Bool_t fRichDebugMode rich spec. debug mode Bool_t fShowerDebugMode shower spec. debug mode Int_t richc count for rich empty content

Class Description


HMatchUUnpacker(Int_t id, Int_t units, Bool_t compression) : HldUnpack()
 Default constructor

 Input parameters:
  Int_t id
    Sub event ID of the matching unit
  Int_t units
    Conversion flag: 0-DEG, 1-RAD
  Bool_t compression
    flag for the new format
  Bool_t flog
    Flag for logfile: 0 no logfile(default), 1 create logfile

 Output parameters:
    none

 Return code:
    none

HMatchUUnpacker(Int_t unites, Bool_t compression, Int_t flog, TString vers) : HldUnpack()
 Depreciated old constructor, use HMatchUUnpacker(Int_t id, Int_t units,
    Bool_t compression, Bool_t flog)  instead.

 Input Parameters:
  Int_t units
    Conversion flag: 0-DEG(default) 1-RAD
  Bool_t compression
    flag for the new format
  Bool_t flog
    Flag for logfile: 0 no logfile(default), 1 create logfile
  TString version
    version=old   -> before 309oct02
    version=nov02 -> 311oct02 configuration
    version=sep03 -> sep03 configuration
    version=aug04 (default) -> aug04 configuration and later
 parameters:
    none

 Return code:
    none

~HMatchUUnpacker(void)
 Destructor

 Input parameters:
   none

 Output parameters:
   none

 Return code:
   none

void setDefaults(void)
 Set default values for the internal variables.

 Input parameters:
    none

 Output parameters:
    none

 Return code:
    none

void setLogging(void)
 logging  mechanism

Bool_t reinit(void)
 	if(!isInitialized)
 		{
 			Rich_Sector_Map = fTrigSetup->getMap();
 			Row_Offset = fTrigSetup->getRowOffset();
      MUDataFormat = fTrigSetup ->getMuDataFormat();
      isInitialized = kTRUE;
 		}

Bool_t init(void)
 Initalization function for unpacker. Called from Hades::init().
 If one parameter container is not found, a message is printed to identify the missing container.

 Input parameters:
    none

 Output parameters:
    none

 Return code:
  kTRUE if all containers and needed categories are found, otherwise kFALSE.

Int_t decodeMUData(UInt_t *pData,Int_t maxLength)
 Decode the data from the matching unit.

 Input Parameters:
  UInt_t *pData
    Pointer to datastructure containing MU part of the MU sub event
  Int_t maxLength
    Length of the datablock

 Output parameters:
  none

 Return code:
  number of bytes read from datablock

Int_t decodeRich(UInt_t *pData,Int_t maxLength)
 Decode the RICH part of the MU subevent

 Input parameters:
  UInt_t *pData
    Pointer to the datastructure containing the RICH part of the MU subevent
  Int_t maxLength
    Size of the datablock in bytes

 Output parameters:
   none

 Return code:
  Number of bytes read from datablock

Int_t decodeIpuRich(UInt_t *pData,Int_t maxLength)
 Decode the RICH IPU part of the MU subevent.
 The trigger code inthe first dataword is skipped!

 Input parameters:
  UInt_t *pData
    Pointer to the datastructure containing the RICH IPU part of the MU subevent
  Int_t maxLength
    Number of bytes in the datastructure

 Output parameters:
  none

 Return code:
  number of bytes in the Rich subEvent or
  -1 for error.

Int_t decodeTof(UInt_t *pData,Int_t maxLength)
 Decode the TOF part of the MU subevent

 Input parameters:
  UInt_t *pData
    Pointer to datastructure containing TOF part of the MU subevent
  Int_t maxLength
    Number of bytes in the datablock

 Output parameters:
  none

 Return code:
  Number of bytes read from datastructure, -1 n case of error.

Int_t decodeIpuTof(UInt_t *pDat,Int_t maxLength)
 Decode the TOF IPU part of the MU subevent

 Input parameters:
  UInt_t *pDat
    Pointer to datastructure with TOF IPU data
  Int_t maxLength
    Number of bytes in data block

 Output parameters:
  none

 Return code:
  Number of bytes in Tof subevent. -1 n case of error

Int_t fillTofData( HMatchUTof* mtof, UInt_t dataword)
 Fill data of TOF MU information in datacontainer.

 Input parameters:
  HMatchUTof *mtof
    Pointer to TOF datacontainer with MU information

  UInt_t dataword
    Dataword to be stored in mtof

 Output parameters:
  none

 Return code:
  Number of sector decoded from dataword.

Int_t storeShowElements(Int_t buildId, Int_t rowPattern, Int_t col)
 Store the Shower information.

 Input parameters:
   Int_t buildId
     Number of the IPC module
   Int_t rowPattern
     pattern which encodes the y information of several hits
   Int_t col
     Number of the column the row pattern codes.

 Output parameters:
   none

 Return code:
  Returns always 0!

HShowerSubIdPar* showerParamConfigure(HShowerUnpackParam* param, Int_t subEvtId)
 Get pointer to SHOWER SubId parameter container.

 Input parameters:
   HShowerUnpackParams *param
     Pointer to SHOWER unpacker parameters

   Int_t subEvtId
     Sub event ID for which to get the parameters

 Output parameters:
   none

 Return code:
    Pointer to the SHOWER subId parameters.
    Return NULL if parameters are not found.

Int_t decodeShower(UInt_t *pData,Int_t maxLength)
 Decode SHOWER part of MU data.

 Input parameters:
   UInt_t *pData
     Pointer to the SHOWER part of the MU data.

   Int_t maxLength
     Length of the datablock

 Output parameters:
   none

 Return code:
    Number of Bytes read from datablock, -1 in case of error.

Int_t decodeIpuShower(UInt_t *pData,Int_t maxLength)
 Decode SHOWER IPU part of the MU data.

 Input Parameters:
   UInt_t *pData
     Pointer to the SHOWER IPU data.

   Int_t maxLength
     Length of datablock

 Output Parameters:
   none

 Return code:
   Number of bytes read from datablock.

Int_t decodeShowerOld(UInt_t *pData,Int_t maxLength)
Return the number of bytes in the Shower subEvent or
-1 for error. pData is a pointer to de subevent's data
Each 16bit word goes to a 32bit word.

Int_t mapAngles(void)
 Map Angles of Leptons.

 Input parameters:
   none

 Output parameters:
   none

 Return code:
   Return o always!

Int_t execute(void)
 Execute function of the unpacker. Called for each event.

 Input Parameters:
   none

 Output parameters:
  none

 Return code:
   0 in case of success, -1 else.

UInt_t* expansion(UInt_t* d, Int_t longueur)
 Expand dataword.

 Input parameters:
   UInt_t *d
     Dataword to be expanded
   Int_t longueur
     Length to which the dataword will be expanded

 Output parameters:
   none

 Return code:
   Pointer to expanded dataword. Has to be deleted by calling function!



Inline Functions


                   Int_t getRichSize(UInt_t d)
                  Bool_t checkRichMSW(UInt_t d)
                  Bool_t checkRichLSW(UInt_t d)
                   Int_t getRichFifoNb(UInt_t d)
                   Int_t getRichColumPattern(UInt_t d)
                   Int_t getRichSegId(UInt_t d)
                   Int_t getRichRow(UInt_t d)
                  UInt_t getRichSecHeader(UInt_t d)
                   Int_t getShowColumn(Int_t d)
                   Int_t getShowRowPattern(Int_t d)
                   Int_t getShowBuildID(Int_t d)
                  Bool_t isShowTrailer(UInt_t d)
                   Int_t getShowFrameCount(Int_t d)
                   Int_t getTofTriggerTag(UInt_t d)
                   Int_t getTofTriggerCode(UInt_t d)
                   Int_t getTofId(UInt_t d)
                   Int_t getTofVeto(UInt_t d)
                   Int_t getLeptonSector(Int_t d)
                   Int_t getLeptonRichNr(Int_t d)
                   Int_t getLeptonMetaNr(Int_t d)
                   Int_t getLeptonDetBit(Int_t d)
                   Int_t getLeptonFlag(Int_t d)
                 Float_t getLeptonMom(Int_t d)
                   Int_t getScaler(UInt_t d)
                    void getExpanded(Int_t d)
                  Bool_t isDebugMode()
                   Int_t getSubEvtId() const
                    void setDebugMode(Bool_t dm)
                    void setRichDebugMode(Bool_t dm)
                    void setShowerDebugMode(Bool_t dm)
                    void setLoggingMode(Bool_t flog)
                   Int_t getRichEmptyCount()
                 TClass* Class()
                 TClass* IsA() const
                    void ShowMembers(TMemberInspector& insp, char* parent)
                    void Streamer(TBuffer& b)
                    void StreamerNVirtual(TBuffer& b)
         HMatchUUnpacker HMatchUUnpacker(const HMatchUUnpacker&)
        HMatchUUnpacker& operator=(const HMatchUUnpacker&)


Author: Alberica Toia
Last update: Joern Wuestenfeld 04/29/2005


ROOT page - Class index - Class Hierarchy - Top of the page

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.