mdRawDataMasks.h File Reference

#include "mdVaReadout.h"
#include "mdQieReadout.h"
#include "mdCaenTdcReadout.h"

Go to the source code of this file.

Defines

#define BLOCKID_MASK_VERSION   0x00000ff
#define BLOCKID_MASK_IDENTIFIER   0x0ffff00
#define BLOCKID_MASK_SOURCE   0x1000000
#define BLOCKID_MASK_DETECTOR   0xe000000
#define BLOCKID_BITPOS_VERSION   0
#define BLOCKID_BITPOS_IDENTIFIER   8
#define BLOCKID_BITPOS_SOURCE   24
#define BLOCKID_BITPOS_DETECTOR   25
#define mdBlockIdPullVersion(bid)   ( ((bid)&BLOCKID_MASK_VERSION) )
#define mdBlockIdPullIdentifier(bid)   ( ((bid)&BLOCKID_MASK_IDENTIFIER) >> BLOCKID_BITPOS_IDENTIFIER )
#define mdBlockIdPullSource(bid)   ( ((bid)&BLOCKID_MASK_SOURCE) >> BLOCKID_BITPOS_SOURCE )
#define mdBlockIdPullDetector(bid)   ( ((bid)&BLOCKID_MASK_DETECTOR) >> BLOCKID_BITPOS_DETECTOR )
#define mdBlockIdPackVersion(version)   ((version)&BLOCKID_MASK_VERSION)
#define mdBlockIdPackIdentifier(id)   (((id)<<BLOCKID_BITPOS_IDENTIFIER)&BLOCKID_MASK_IDENTIFIER)
#define mdBlockIdPackSource(source)   (((source)<<BLOCKID_BITPOS_SOURCE)&BLOCKID_BITPOS_SOURCE)
#define mdBlockIdPackDetector(detector)   (((detector)<<BLOCKID_BITPOS_DETECTOR)&BLOCKID_MASK_DETECTOR)
#define mdBlockHdrPackBlockId(v, i, s, d)   (mdBlockIdPackVersion(v)|mdBlockIdPackIdentifier(i)|mdBlockIdPackSource(s)|mdBlockIdPackDetector(d))
#define BLOCKHDR_MASK_SUBRUN   0xffff0000
#define BLOCKHDR_MASK_RUNTYPE   0xffff
#define BLOCKHDR_BITPOS_SUBRUN   16
#define mdBlockHdrPullSubRunNumber(subRunAndType)   ((subRunAndType)>>BLOCKHDR_BITPOS_SUBRUN)
#define mdBlockHdrPullRunType(subRunAndType)   ((subRunAndType)&BLOCKHDR_MASK_RUNTYPE)
#define mdBlockHdrPackSubRunAndType(sub, type)   ((((sub)<<BLOCKHDR_BITPOS_SUBRUN)&BLOCKHDR_MASK_SUBRUN)|((type)&BLOCKHDR_MASK_RUNTYPE))
#define RDOUT_MASK_ROP_NUMBER   0x3F
#define RDOUT_MASK_CRATE_TYPE   0x40
#define RDOUT_MASK_CRATE_MC_FLAG   0x80
#define RDOUT_MASK_CRATE_PEDESTAL_MODE   0x100
#define RDOUT_MASK_CRATE_SPARSIF_MODE   0x200
#define RDOUT_MASK_CRATE_COMMON_MODE   0x400
#define mdPullRopNumber(r)   ((r)&RDOUT_MASK_ROP_NUMBER)
#define mdPullCrateType(r)   (((r)&RDOUT_MASK_CRATE_TYPE)>>6)
#define mdPullCrateMCFlag(r)   (((r)&RDOUT_MASK_CRATE_MC_FLAG)>>7)
#define mdPullCratePedestalMode(r)   (((r)&RDOUT_MASK_CRATE_PEDESTAL_MODE)>>8)
#define mdPullCrateSparsMode(r)   (((r)&RDOUT_MASK_CRATE_SPARS_MODE)>>9)
#define mdPullCrateCommonMode(r)   (((r)&RDOUT_MASK_CRATE_COMMON_MODE)>>10)

Define Documentation

#define BLOCKHDR_BITPOS_SUBRUN   16

Definition at line 69 of file mdRawDataMasks.h.

#define BLOCKHDR_MASK_RUNTYPE   0xffff

Definition at line 65 of file mdRawDataMasks.h.

#define BLOCKHDR_MASK_SUBRUN   0xffff0000

Definition at line 64 of file mdRawDataMasks.h.

#define BLOCKID_BITPOS_DETECTOR   25

Definition at line 37 of file mdRawDataMasks.h.

Referenced by OltNewModule::CalculateDeadChips(), and OltNewModule::WriteEvent().

#define BLOCKID_BITPOS_IDENTIFIER   8

Definition at line 35 of file mdRawDataMasks.h.

Referenced by OltNewModule::CalculateDeadChips(), and OltNewModule::WriteEvent().

#define BLOCKID_BITPOS_SOURCE   24

Definition at line 36 of file mdRawDataMasks.h.

#define BLOCKID_BITPOS_VERSION   0

Definition at line 34 of file mdRawDataMasks.h.

#define BLOCKID_MASK_DETECTOR   0xe000000

Definition at line 30 of file mdRawDataMasks.h.

#define BLOCKID_MASK_IDENTIFIER   0x0ffff00

Definition at line 28 of file mdRawDataMasks.h.

#define BLOCKID_MASK_SOURCE   0x1000000

Definition at line 29 of file mdRawDataMasks.h.

#define BLOCKID_MASK_VERSION   0x00000ff

Definition at line 27 of file mdRawDataMasks.h.

#define mdBlockHdrPackBlockId ( v,
i,
s,
 )     (mdBlockIdPackVersion(v)|mdBlockIdPackIdentifier(i)|mdBlockIdPackSource(s)|mdBlockIdPackDetector(d))

Definition at line 55 of file mdRawDataMasks.h.

#define mdBlockHdrPackSubRunAndType ( sub,
type   )     ((((sub)<<BLOCKHDR_BITPOS_SUBRUN)&BLOCKHDR_MASK_SUBRUN)|((type)&BLOCKHDR_MASK_RUNTYPE))

Definition at line 78 of file mdRawDataMasks.h.

#define mdBlockHdrPullRunType ( subRunAndType   )     ((subRunAndType)&BLOCKHDR_MASK_RUNTYPE)

Definition at line 74 of file mdRawDataMasks.h.

#define mdBlockHdrPullSubRunNumber ( subRunAndType   )     ((subRunAndType)>>BLOCKHDR_BITPOS_SUBRUN)

Definition at line 73 of file mdRawDataMasks.h.

#define mdBlockIdPackDetector ( detector   )     (((detector)<<BLOCKID_BITPOS_DETECTOR)&BLOCKID_MASK_DETECTOR)

Definition at line 51 of file mdRawDataMasks.h.

#define mdBlockIdPackIdentifier ( id   )     (((id)<<BLOCKID_BITPOS_IDENTIFIER)&BLOCKID_MASK_IDENTIFIER)

Definition at line 49 of file mdRawDataMasks.h.

#define mdBlockIdPackSource ( source   )     (((source)<<BLOCKID_BITPOS_SOURCE)&BLOCKID_BITPOS_SOURCE)

Definition at line 50 of file mdRawDataMasks.h.

#define mdBlockIdPackVersion ( version   )     ((version)&BLOCKID_MASK_VERSION)

Definition at line 48 of file mdRawDataMasks.h.

#define mdBlockIdPullDetector ( bid   )     ( ((bid)&BLOCKID_MASK_DETECTOR) >> BLOCKID_BITPOS_DETECTOR )

Definition at line 44 of file mdRawDataMasks.h.

#define mdBlockIdPullIdentifier ( bid   )     ( ((bid)&BLOCKID_MASK_IDENTIFIER) >> BLOCKID_BITPOS_IDENTIFIER )

Definition at line 42 of file mdRawDataMasks.h.

#define mdBlockIdPullSource ( bid   )     ( ((bid)&BLOCKID_MASK_SOURCE) >> BLOCKID_BITPOS_SOURCE )

Definition at line 43 of file mdRawDataMasks.h.

#define mdBlockIdPullVersion ( bid   )     ( ((bid)&BLOCKID_MASK_VERSION) )

Definition at line 41 of file mdRawDataMasks.h.

#define mdPullCrateCommonMode (  )     (((r)&RDOUT_MASK_CRATE_COMMON_MODE)>>10)

Definition at line 102 of file mdRawDataMasks.h.

#define mdPullCrateMCFlag (  )     (((r)&RDOUT_MASK_CRATE_MC_FLAG)>>7)

Definition at line 99 of file mdRawDataMasks.h.

#define mdPullCratePedestalMode (  )     (((r)&RDOUT_MASK_CRATE_PEDESTAL_MODE)>>8)

Definition at line 100 of file mdRawDataMasks.h.

#define mdPullCrateSparsMode (  )     (((r)&RDOUT_MASK_CRATE_SPARS_MODE)>>9)

Definition at line 101 of file mdRawDataMasks.h.

#define mdPullCrateType (  )     (((r)&RDOUT_MASK_CRATE_TYPE)>>6)

Definition at line 98 of file mdRawDataMasks.h.

#define mdPullRopNumber (  )     ((r)&RDOUT_MASK_ROP_NUMBER)

Definition at line 97 of file mdRawDataMasks.h.

#define RDOUT_MASK_CRATE_COMMON_MODE   0x400

Definition at line 93 of file mdRawDataMasks.h.

#define RDOUT_MASK_CRATE_MC_FLAG   0x80

Definition at line 90 of file mdRawDataMasks.h.

#define RDOUT_MASK_CRATE_PEDESTAL_MODE   0x100

Definition at line 91 of file mdRawDataMasks.h.

#define RDOUT_MASK_CRATE_SPARSIF_MODE   0x200

Definition at line 92 of file mdRawDataMasks.h.

#define RDOUT_MASK_CRATE_TYPE   0x40

Definition at line 89 of file mdRawDataMasks.h.

#define RDOUT_MASK_ROP_NUMBER   0x3F

Definition at line 88 of file mdRawDataMasks.h.


Generated on 22 Nov 2017 for loon by  doxygen 1.6.1