Belle II Software development
ROIrawID Class Reference

ROIrawID. More...

#include <ROIrawID.h>

Public Types

enum  {
  UnusedBits = 21 ,
  SystemFlagBits = 1 ,
  DHHIDBits = 6 ,
  MinVBits = 10 ,
  MinUBits = 8 ,
  MaxVBits = 10 ,
  MaxUBits = 8 ,
  Bits = UnusedBits + SystemFlagBits + DHHIDBits + MinVBits + MinUBits + MaxVBits + MaxUBits
}
 
typedef uint64_t baseType
 base type
 

Public Member Functions

 ROIrawID (baseType id=0)
 constructor setting the id
 
 ROIrawID (baseType SystemFlag, baseType DHHID, baseType MinV, baseType MinU, baseType MaxV, baseType MaxU)
 constructor
 
baseType getSystemFlag () const
 get system flag
 
baseType getDHHID () const
 get DHH ID
 
baseType getMinVid () const
 get minimum V
 
baseType getMinUid () const
 get minimum U
 
baseType getMaxVid () const
 get maximum V
 
baseType getMaxUid () const
 get maximum U
 
baseType getID () const
 get ROIrawID
 
baseType getBigEndian () const
 get bigEndian
 
void setSystemFlag (baseType SystemFlag)
 set system flag
 
void setDHHID (baseType DHHID)
 set DHH ID
 
void setMinVid (baseType MinV)
 set minimum V
 
void setMinUid (baseType MinU)
 set minimum U
 
void setMaxVid (baseType MaxV)
 set maximum V
 
void setMaxUid (baseType MaxU)
 set maximum U
 
void setID (baseType id)
 set ROIrawID
 
bool operator() (const ROIrawID &roi1, const ROIrawID &roi2) const
 operator used to order the ROIs (ascending DHHID)
 

Private Attributes

union { 
 
   baseType   id: Bits 
 
   struct { 
 
      baseType   maxU: MaxUBits 
 
      baseType   maxV: MaxVBits 
 
      baseType   minU: MinUBits 
 
      baseType   minV: MinVBits 
 
      baseType   DHHID: DHHIDBits 
 
      baseType   systemFlag: SystemFlagBits 
 
      baseType   unused: UnusedBits 
 
   }   parts 
 
m_rawID 
 raw ID
 

Detailed Description

ROIrawID.

64 bit union that contains the ROI information to be stored in the payload that is sent to the ONSEN.

Definition at line 24 of file ROIrawID.h.

Member Typedef Documentation

◆ baseType

typedef uint64_t baseType

base type

Definition at line 28 of file ROIrawID.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 29 of file ROIrawID.h.

29 {
30 UnusedBits = 21,
31 SystemFlagBits = 1,
32 DHHIDBits = 6,
33 MinVBits = 10,
34 MinUBits = 8,
35 MaxVBits = 10,
36 MaxUBits = 8,
37 Bits = UnusedBits + SystemFlagBits + DHHIDBits + MinVBits + MinUBits + MaxVBits + MaxUBits,
38
39// the following are unused atm, might be used for consistency checks
40// MaxSystemFlag = (1 << SystemFlagBits) - 1,
41// MaxDHHID = (1 << DHHIDBits) - 1,
42// MaxMinV = (1 << MinVBits) - 1,
43// MaxMinU = (1 << MinUBits) - 1,
44// MaxMaxV = (1 << MaxVBits) - 1,
45// MaxMaxU = (1 << MaxUBits) - 1,
46 };

Constructor & Destructor Documentation

◆ ROIrawID() [1/2]

ROIrawID ( baseType id = 0)
inlineexplicit

constructor setting the id

Definition at line 49 of file ROIrawID.h.

◆ ROIrawID() [2/2]

ROIrawID ( baseType SystemFlag,
baseType DHHID,
baseType MinV,
baseType MinU,
baseType MaxV,
baseType MaxU )
inline

constructor

Definition at line 54 of file ROIrawID.h.

◆ ~ROIrawID()

~ROIrawID ( )
inline

Definition at line 86 of file ROIrawID.h.

86{};

Member Function Documentation

◆ getBigEndian()

ROIrawID::baseType getBigEndian ( ) const

get bigEndian

Definition at line 13 of file ROIrawID.cc.

14{
15 // return ROIrawID::baseType htobe64(m_rawID.id);
16
17 uint32_t low_host, hi_host;
18 uint64_t low_be, hi_be;
19
20 /* Return immediately if byte order is big endian. */
21 if (htonl(0x01020304) == 0x01020304)
22 return m_rawID.id;
23 /* Change byte order in low and high words. */
24 low_host = m_rawID.id & 0x00000000FFFFFFFF;
25 hi_host = (m_rawID.id & 0xFFFFFFFF00000000) >> 32;
26 low_be = htonl(low_host);
27 hi_be = htonl(hi_host);
28 /* Exchange low and high words. */
29 return (ROIrawID::baseType)(low_be << 32 | hi_be);
30}
union Belle2::ROIrawID::@141257315257103170130224162365274311161127341053 m_rawID
raw ID
uint64_t baseType
base type
Definition ROIrawID.h:28

◆ getDHHID()

baseType getDHHID ( ) const
inline

get DHH ID

Definition at line 67 of file ROIrawID.h.

◆ getID()

baseType getID ( ) const
inline

get ROIrawID

Definition at line 72 of file ROIrawID.h.

◆ getMaxUid()

baseType getMaxUid ( ) const
inline

get maximum U

Definition at line 71 of file ROIrawID.h.

◆ getMaxVid()

baseType getMaxVid ( ) const
inline

get maximum V

Definition at line 70 of file ROIrawID.h.

◆ getMinUid()

baseType getMinUid ( ) const
inline

get minimum U

Definition at line 69 of file ROIrawID.h.

◆ getMinVid()

baseType getMinVid ( ) const
inline

get minimum V

Definition at line 68 of file ROIrawID.h.

◆ getSystemFlag()

baseType getSystemFlag ( ) const
inline

get system flag

Definition at line 66 of file ROIrawID.h.

◆ operator()()

bool operator() ( const ROIrawID & roi1,
const ROIrawID & roi2 ) const
inline

operator used to order the ROIs (ascending DHHID)

Definition at line 88 of file ROIrawID.h.

◆ setDHHID()

void setDHHID ( baseType DHHID)
inline

set DHH ID

Definition at line 78 of file ROIrawID.h.

◆ setID()

void setID ( baseType id)
inline

set ROIrawID

Definition at line 83 of file ROIrawID.h.

◆ setMaxUid()

void setMaxUid ( baseType MaxU)
inline

set maximum U

Definition at line 82 of file ROIrawID.h.

◆ setMaxVid()

void setMaxVid ( baseType MaxV)
inline

set maximum V

Definition at line 81 of file ROIrawID.h.

◆ setMinUid()

void setMinUid ( baseType MinU)
inline

set minimum U

Definition at line 80 of file ROIrawID.h.

◆ setMinVid()

void setMinVid ( baseType MinV)
inline

set minimum V

Definition at line 79 of file ROIrawID.h.

◆ setSystemFlag()

void setSystemFlag ( baseType SystemFlag)
inline

set system flag

Definition at line 77 of file ROIrawID.h.

Member Data Documentation

◆ DHHID

baseType DHHID

Definition at line 104 of file ROIrawID.h.

◆ id

Definition at line 98 of file ROIrawID.h.

◆ maxU

baseType maxU

Definition at line 100 of file ROIrawID.h.

◆ maxV

baseType maxV

Definition at line 101 of file ROIrawID.h.

◆ minU

baseType minU

Definition at line 102 of file ROIrawID.h.

◆ minV

baseType minV

Definition at line 103 of file ROIrawID.h.

◆ systemFlag

baseType systemFlag

Definition at line 105 of file ROIrawID.h.

◆ unused

baseType unused

Definition at line 106 of file ROIrawID.h.


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