ATLAS Offline Software
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TileEmscaleCalibOptions Class Reference

Class for encoding Tile calibration options into a bit map. More...

#include <TileEmscaleCalibOptions.h>

Collaboration diagram for TileEmscaleCalibOptions:

Public Types

enum  CalBitPos {
  OflCisFitLin, OflCisFitNln, OflLasLin, OflLasNln,
  OflLasPart, OflCes, OflEms, OflLasLinPisa,
  OflLasNlnPisa, OflMinbias, OnlCisLin, OnlLasLin,
  OnlCes, OnlEms, MaxBit
}
 

Public Member Functions

 TileEmscaleCalibOptions ()
 Ctor. More...
 
 TileEmscaleCalibOptions (uint32_t options)
 Ctor. More...
 
 ~TileEmscaleCalibOptions ()
 Dtor. More...
 
uint32_t getEmscaleCalibOptions () const
 Returns the complete bitmap with all EM scale calibration options. More...
 
void dumpEmscaleCalibOptions (std::ostringstream &stream) const
 Dumps the member EM scale calibration options in a human readable form. More...
 
bool getEmscaleCalibBit (CalBitPos idx) const
 Returns a bit for a given calibration option. More...
 
void setEmscaleCalibBit (CalBitPos idx, bool turnOn)
 Sets a given EM scale calibration option to the value given by turnOn. More...
 

Private Member Functions

void initBitToProb ()
 

Private Attributes

uint32_t m_options
 
std::vector< std::string > m_bitToProb
 

Detailed Description

Class for encoding Tile calibration options into a bit map.

Author
Lukas Pribyl lukas.nosp@m..pri.nosp@m.byl@c.nosp@m.ern..nosp@m.ch

In this class one can specify, whether to use the conditions data of a given proxy for EM scale calibration or whether to skip the calibration step including this proxy. The resulting bitmap, stored as uint32_t is to be used by TileConditions/TileExpertToolEmscale, which calibrates the Tilecal ADC amplitude, based on the options, stored in the bitmap.

Definition at line 24 of file TileEmscaleCalibOptions.h.

Member Enumeration Documentation

◆ CalBitPos

Enumerator
OflCisFitLin 
OflCisFitNln 
OflLasLin 
OflLasNln 
OflLasPart 
OflCes 
OflEms 
OflLasLinPisa 
OflLasNlnPisa 
OflMinbias 
OnlCisLin 
OnlLasLin 
OnlCes 
OnlEms 
MaxBit 

Definition at line 27 of file TileEmscaleCalibOptions.h.

27  {
28  OflCisFitLin,
29  OflCisFitNln,
30  OflLasLin,
31  OflLasNln,
32  OflLasPart,
33  OflCes,
34  OflEms,
37  OflMinbias,
38  OnlCisLin,
39  OnlLasLin,
40  OnlCes,
41  OnlEms,
42  MaxBit
43  };

Constructor & Destructor Documentation

◆ TileEmscaleCalibOptions() [1/2]

TileEmscaleCalibOptions::TileEmscaleCalibOptions ( )

Ctor.

By default all options are off

Definition at line 19 of file TileEmscaleCalibOptions.cxx.

19  : m_options(0)
20 {
21  initBitToProb();
22 }

◆ TileEmscaleCalibOptions() [2/2]

TileEmscaleCalibOptions::TileEmscaleCalibOptions ( uint32_t  options)

Ctor.

m_options are set to options

Definition at line 26 of file TileEmscaleCalibOptions.cxx.

27 {
29  initBitToProb();
30 }

◆ ~TileEmscaleCalibOptions()

TileEmscaleCalibOptions::~TileEmscaleCalibOptions ( )
inline

Dtor.

Definition at line 52 of file TileEmscaleCalibOptions.h.

52 {}

Member Function Documentation

◆ dumpEmscaleCalibOptions()

void TileEmscaleCalibOptions::dumpEmscaleCalibOptions ( std::ostringstream &  stream) const

Dumps the member EM scale calibration options in a human readable form.

Definition at line 58 of file TileEmscaleCalibOptions.cxx.

59 {
60  stream << std::endl << "---===### Emscale Calib Options ###===---" << std::endl;
61  for(uint32_t idx = 0; idx < MaxBit; ++idx) {
62  if(getEmscaleCalibBit(static_cast<CalBitPos>(idx))) {
63  stream << m_bitToProb[idx] << ": ON" << std::endl;
64  } else {
65  stream << m_bitToProb[idx] << ": OFF" << std::endl;
66  }
67  }
68  stream << "---===### END OF Emscale Calib Options ###===---" << std::endl << std::endl;
69 }

◆ getEmscaleCalibBit()

bool TileEmscaleCalibOptions::getEmscaleCalibBit ( CalBitPos  idx) const
inline

Returns a bit for a given calibration option.

The value "true" means that the given calibration will be applied by the TileConditions/TileExpertToolEmscale. If the value is "false", the calibration step will be skipped

Definition at line 88 of file TileEmscaleCalibOptions.h.

89 {
90  if(m_options & (1<<idx)) return true;
91  else return false;
92 }

◆ getEmscaleCalibOptions()

uint32_t TileEmscaleCalibOptions::getEmscaleCalibOptions ( ) const
inline

Returns the complete bitmap with all EM scale calibration options.

Definition at line 80 of file TileEmscaleCalibOptions.h.

81 {
82  return m_options;
83 }

◆ initBitToProb()

void TileEmscaleCalibOptions::initBitToProb ( )
private

Definition at line 35 of file TileEmscaleCalibOptions.cxx.

36 {
37  m_bitToProb.clear();
38  m_bitToProb.resize(32,"Undefined");
39  m_bitToProb[OflCisFitLin] = "OflCisFitLin";
40  m_bitToProb[OflCisFitNln] = "OflCisFitNln";
41  m_bitToProb[OflLasLin] = "OflLasLin";
42  m_bitToProb[OflLasNln] = "OflLasNln";
43  m_bitToProb[OflLasPart] = "OflLasPart";
44  m_bitToProb[OflCes] = "OflCes";
45  m_bitToProb[OflEms] = "OflEms";
46  m_bitToProb[OflLasLinPisa] = "OflLasLinPisa";
47  m_bitToProb[OflLasNlnPisa] = "OflLasNlnPisa";
48  m_bitToProb[OflMinbias] = "OflMinbias";
49  m_bitToProb[OnlCisLin] = "OnlCisLin";
50  m_bitToProb[OnlLasLin] = "OnlLasLin";
51  m_bitToProb[OnlCes] = "OnlCes";
52  m_bitToProb[OnlEms] = "OnlEms";
53 }

◆ setEmscaleCalibBit()

void TileEmscaleCalibOptions::setEmscaleCalibBit ( CalBitPos  idx,
bool  turnOn 
)

Sets a given EM scale calibration option to the value given by turnOn.

Definition at line 11 of file TileEmscaleCalibOptions.cxx.

12 {
13  if(turnOn) m_options |= static_cast<uint32_t>(1<<idx);
14  else m_options &= ~static_cast<uint32_t>(1<<idx);
15 }

Member Data Documentation

◆ m_bitToProb

std::vector<std::string> TileEmscaleCalibOptions::m_bitToProb
private

Definition at line 71 of file TileEmscaleCalibOptions.h.

◆ m_options

uint32_t TileEmscaleCalibOptions::m_options
private

Definition at line 70 of file TileEmscaleCalibOptions.h.


The documentation for this class was generated from the following files:
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TileEmscaleCalibOptions::OnlCes
@ OnlCes
Definition: TileEmscaleCalibOptions.h:40
TileEmscaleCalibOptions::OnlCisLin
@ OnlCisLin
Definition: TileEmscaleCalibOptions.h:38
TileEmscaleCalibOptions::OflLasLinPisa
@ OflLasLinPisa
Definition: TileEmscaleCalibOptions.h:35
TileEmscaleCalibOptions::OflCes
@ OflCes
Definition: TileEmscaleCalibOptions.h:33
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TileEmscaleCalibOptions::initBitToProb
void initBitToProb()
Definition: TileEmscaleCalibOptions.cxx:35
TileEmscaleCalibOptions::getEmscaleCalibBit
bool getEmscaleCalibBit(CalBitPos idx) const
Returns a bit for a given calibration option.
Definition: TileEmscaleCalibOptions.h:88
TileEmscaleCalibOptions::m_options
uint32_t m_options
Definition: TileEmscaleCalibOptions.h:70
TileEmscaleCalibOptions::OflEms
@ OflEms
Definition: TileEmscaleCalibOptions.h:34
TileEmscaleCalibOptions::OflLasLin
@ OflLasLin
Definition: TileEmscaleCalibOptions.h:30
TileEmscaleCalibOptions::OflCisFitNln
@ OflCisFitNln
Definition: TileEmscaleCalibOptions.h:29
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
TileEmscaleCalibOptions::OflMinbias
@ OflMinbias
Definition: TileEmscaleCalibOptions.h:37
TileEmscaleCalibOptions::OnlLasLin
@ OnlLasLin
Definition: TileEmscaleCalibOptions.h:39
TileEmscaleCalibOptions::OnlEms
@ OnlEms
Definition: TileEmscaleCalibOptions.h:41
TileEmscaleCalibOptions::CalBitPos
CalBitPos
Definition: TileEmscaleCalibOptions.h:27
TileEmscaleCalibOptions::OflCisFitLin
@ OflCisFitLin
Definition: TileEmscaleCalibOptions.h:28
TileEmscaleCalibOptions::OflLasNlnPisa
@ OflLasNlnPisa
Definition: TileEmscaleCalibOptions.h:36
TileEmscaleCalibOptions::OflLasNln
@ OflLasNln
Definition: TileEmscaleCalibOptions.h:31
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
TileEmscaleCalibOptions::m_bitToProb
std::vector< std::string > m_bitToProb
Definition: TileEmscaleCalibOptions.h:71
TileEmscaleCalibOptions::MaxBit
@ MaxBit
Definition: TileEmscaleCalibOptions.h:42
TileEmscaleCalibOptions::OflLasPart
@ OflLasPart
Definition: TileEmscaleCalibOptions.h:32