Belle II Software development
SVDCalibrationsBitmap Class Reference

class for digital (0/1) calibration values per srtip More...

#include <SVDCalibrationsBitmap.h>

Public Types

typedef bool calibrationType
 typedef of the calibration value (1/0)
 
typedef unsigned long bundleType
 typedef for the bundle type
 
typedef std::vector< bundleTypepayloadContainerType
 typedef of the vector of bundle type
 

Public Member Functions

 SVDCalibrationsBitmap ()
 default constructor
 
 ~SVDCalibrationsBitmap ()
 default destructor
 

Static Public Member Functions

static calibrationType get (const payloadContainerType &svdBitmap, unsigned int strip)
 get the calibration value of that strip
 
static void set (payloadContainerType &svdBitmap, unsigned int strip, calibrationType value)
 set the calibration value of the strip
 
static void init (payloadContainerType &svdBitmap, unsigned int layer, unsigned int, unsigned int, unsigned int side, bool defaultB)
 initialize the calibration bitmap
 

Static Public Attributes

static const int nBitsInBundle = CHAR_BIT * sizeof(bundleType)
 nuber of bits in the bundle
 

Detailed Description

class for digital (0/1) calibration values per srtip

Definition at line 23 of file SVDCalibrationsBitmap.h.

Member Typedef Documentation

◆ bundleType

typedef unsigned long bundleType

typedef for the bundle type

Definition at line 27 of file SVDCalibrationsBitmap.h.

◆ calibrationType

typedef bool calibrationType

typedef of the calibration value (1/0)

Definition at line 26 of file SVDCalibrationsBitmap.h.

◆ payloadContainerType

typedef std::vector< bundleType > payloadContainerType

typedef of the vector of bundle type

Definition at line 28 of file SVDCalibrationsBitmap.h.

Constructor & Destructor Documentation

◆ SVDCalibrationsBitmap()

default constructor

Definition at line 33 of file SVDCalibrationsBitmap.h.

33{};

◆ ~SVDCalibrationsBitmap()

~SVDCalibrationsBitmap ( )
inline

default destructor

Definition at line 36 of file SVDCalibrationsBitmap.h.

36{};

Member Function Documentation

◆ get()

static calibrationType get ( const payloadContainerType svdBitmap,
unsigned int  strip 
)
inlinestatic

get the calibration value of that strip

Definition at line 39 of file SVDCalibrationsBitmap.h.

40 {
41 std::bitset<nBitsInBundle> bundle = svdBitmap.at(strip / (nBitsInBundle));
42 return bundle[strip % nBitsInBundle];
43 }
static const int nBitsInBundle
nuber of bits in the bundle

◆ init()

static void init ( payloadContainerType svdBitmap,
unsigned int  layer,
unsigned int  ,
unsigned int  ,
unsigned int  side,
bool  defaultB 
)
inlinestatic

initialize the calibration bitmap

Definition at line 55 of file SVDCalibrationsBitmap.h.

58 {
59 unsigned int numberOfStrips = 0;
60
61 if (layer < 3)
62 return;
63
64 switch (side) {
65 case SVDCalibrationsBase< SVDCalibrationsBitmap >::Uindex :
66 numberOfStrips = 768;
67 break;
68
69 case SVDCalibrationsBase< SVDCalibrationsBitmap >::Vindex :
70 numberOfStrips = layer == 3 ? 768 : 512;
71 }
72
73 if (!defaultB)
74 svdBitmap.resize(numberOfStrips / nBitsInBundle, 0);
75 else
76 svdBitmap.resize(numberOfStrips / nBitsInBundle, ULONG_MAX);
77 }

◆ set()

static void set ( payloadContainerType svdBitmap,
unsigned int  strip,
calibrationType  value 
)
inlinestatic

set the calibration value of the strip

Definition at line 46 of file SVDCalibrationsBitmap.h.

48 {
49 std::bitset<nBitsInBundle> bundle = svdBitmap.at(strip / (nBitsInBundle));
50 bundle[strip % nBitsInBundle] = value;
51 svdBitmap.at(strip / (nBitsInBundle)) = bundle.to_ulong();
52 }

Member Data Documentation

◆ nBitsInBundle

const int nBitsInBundle = CHAR_BIT * sizeof(bundleType)
static

nuber of bits in the bundle

Definition at line 30 of file SVDCalibrationsBitmap.h.


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