Belle II Software  release-08-01-10
SVDModeByte Class Reference

Class to store SVD mode information. More...

#include <SVDModeByte.h>

Collaboration diagram for SVDModeByte:

Public Types

enum  {
  TriggerBinBits = 3 ,
  DAQModeBits = 2 ,
  EventTypeBits = 1 ,
  RunTypeBits = 2 ,
  Bits = TriggerBinBits + DAQModeBits + EventTypeBits + RunTypeBits ,
  MaxTriggerTime = (1 << TriggerBinBits) - 1 ,
  MaxGoodTriggerBin = 3 ,
  MaxDAQMode = (1 << DAQModeBits) - 1 ,
  MaxEventType = (1 << EventTypeBits) - 1 ,
  MaxRunType = (1 << RunTypeBits) - 1 ,
  MaxID = (1 << Bits) - 1
}
 
typedef uint8_t baseType
 The base integer type for SVDModeByte.
 

Public Member Functions

 SVDModeByte (baseType id=c_DefaultID)
 Constructor using the unique id. More...
 
 SVDModeByte (baseType runType, baseType eventType, baseType daqMode, baseType triggerBin)
 Constructor using triggerBin, daqMode etc.
 
 SVDModeByte (const SVDModeByte &b)
 Copy constructor.
 
SVDModeByteoperator= (const SVDModeByte &b)
 Assignment operator.
 
SVDModeByteoperator= (baseType id)
 Assignment from baseType.
 
 operator baseType () const
 Convert to baseType.
 
 operator std::string () const
 Convert to string.
 
bool operator== (const SVDModeByte &b) const
 Check for equality.
 
baseType getID () const
 Get the unique id.
 
baseType getTriggerBin () const
 Get the triggerBin id.
 
baseType getDAQMode () const
 Get the daqMode id.
 
baseType getEventType () const
 Get the eventMode id.
 
baseType getRunType () const
 Get the runMode id.
 
bool hasTimeFit () const
 Do we have time fit information?
 
bool isZeroSuppressedRun () const
 Do we have useful run type? A useful run is. More...
 
void setID (baseType id)
 Set the unique id.
 
void setTriggerBin (baseType triggerBin)
 Set the triggerBin id.
 
void setDAQMode (baseType daqMode)
 Set the daqMode id.
 
void setEventType (baseType eventType)
 Set the eventType id.
 
void setRunType (baseType runType)
 Set the runType id.
 
std::string __str__ () const
 make this type printable in python with print(vxd_id)
 

Static Public Attributes

static const baseType c_DefaultID = 151
 Default / non-informative id 10010111 = 151 Run type: zero-suppressed, 2 Event type: global run, 0 DAQ mode: 6-samples, 2 Trigger invalid 111 = 7.
 

Private Attributes

union {
   baseType   id: Bits
 Unique id.
 
   struct {
      baseType   triggerBin: TriggerBinBits
 Trigger time id.
 
      baseType   daqMode: DAQModeBits
 DAQ mode id.
 
      baseType   eventType: EventTypeBits
 Event type id.
 
      baseType   runType: RunTypeBits
 Run type id.
 
   }   parts
 < Struct to contain all id components
 
m_id
 Union to store the ID and all components in one go.
 

Detailed Description

Class to store SVD mode information.

  • Mode : Zero suppressed 6- or 3- samples + unknown mode
  • Trigger time bin - 3 bits, correct values 0-3, other - error

Definition at line 69 of file SVDModeByte.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
TriggerBinBits 

Number of bits available to represent a triggerBin.

DAQModeBits 

Number of bits available to represent DAQ Mode.

EventTypeBits 

Number of bits available to represent event type.

RunTypeBits 

Number of bits available to represent run type.

Bits 

Total bit size of the SVDModeByte.

MaxTriggerTime 

Maximum available trigger time ID.

MaxGoodTriggerBin 

Maximum valid trigger time ID.

MaxDAQMode 

Maximum available DAQ mode ID.

MaxEventType 

Maximum available event type ID.

MaxRunType 

Maximum available run type ID.

MaxID 

Maximum value for ID.

Definition at line 73 of file SVDModeByte.h.

73  {
75  TriggerBinBits = 3,
77  DAQModeBits = 2,
79  EventTypeBits = 1,
81  RunTypeBits = 2,
84 
86  MaxTriggerTime = (1 << TriggerBinBits) - 1,
90  MaxDAQMode = (1 << DAQModeBits) - 1,
92  MaxEventType = (1 << EventTypeBits) - 1,
94  MaxRunType = (1 << RunTypeBits) - 1,
96  MaxID = (1 << Bits) - 1,
97 
98  };
@ DAQModeBits
Number of bits available to represent DAQ Mode.
Definition: SVDModeByte.h:77
@ MaxEventType
Maximum available event type ID.
Definition: SVDModeByte.h:92
@ TriggerBinBits
Number of bits available to represent a triggerBin.
Definition: SVDModeByte.h:75
@ MaxID
Maximum value for ID.
Definition: SVDModeByte.h:96
@ MaxGoodTriggerBin
Maximum valid trigger time ID.
Definition: SVDModeByte.h:88
@ MaxDAQMode
Maximum available DAQ mode ID.
Definition: SVDModeByte.h:90
@ MaxTriggerTime
Maximum available trigger time ID.
Definition: SVDModeByte.h:86
@ EventTypeBits
Number of bits available to represent event type.
Definition: SVDModeByte.h:79
@ RunTypeBits
Number of bits available to represent run type.
Definition: SVDModeByte.h:81
@ Bits
Total bit size of the SVDModeByte.
Definition: SVDModeByte.h:83
@ MaxRunType
Maximum available run type ID.
Definition: SVDModeByte.h:94

Constructor & Destructor Documentation

◆ SVDModeByte()

SVDModeByte ( baseType  id = c_DefaultID)
inline

Constructor using the unique id.


Definition at line 110 of file SVDModeByte.h.

Member Function Documentation

◆ isZeroSuppressedRun()

bool isZeroSuppressedRun ( ) const
inline

Do we have useful run type? A useful run is.

  • zero-suppressed (first bit set)
  • 3-sample or 6-sample mode (daq mode > 0)

Definition at line 157 of file SVDModeByte.h.


The documentation for this class was generated from the following files: