Belle II Software development
TOPPmtTTSHisto Class Reference

Raw measurements of TTS (histograms) for each PMT pixel. More...

#include <TOPPmtTTSHisto.h>

Inheritance diagram for TOPPmtTTSHisto:

Public Types

enum  { c_NumPmtPixels = 16 }
 number of PMT pixels More...
 

Public Member Functions

 TOPPmtTTSHisto ()
 Default constructor.
 
 TOPPmtTTSHisto (const std::string &serialNumber, float HV)
 Full constructor.
 
void setSerialNumber (const std::string &serNum)
 Set PMT serial number.
 
void setHV (float HV)
 Set high voltage used for TTS measurement.
 
void setHistogram (unsigned pmtPixel, const TH1F *histo)
 Set histogram for a given pixel (make a copy)
 
int getNumOfPixels () const
 Returns number of PMT pixels.
 
const std::string & getSerialNumber () const
 Returns PMT serial number.
 
float getHV () const
 Returns high voltage used for TTS measurement.
 
const TH1F * getHistogram (unsigned pmtPixel) const
 Returns TTS histogram for a specified pmtPixel.
 

Private Member Functions

 ClassDef (TOPPmtTTSHisto, 3)
 ClassDef.
 

Private Attributes

std::string m_serialNumber
 PMT serial number, e.g.
 
float m_HV = 0
 HV setting for which the set of histograms were taken.
 
TH1F m_histo [c_NumPmtPixels]
 histograms of measured TTS (one per pmtPixel)
 

Detailed Description

Raw measurements of TTS (histograms) for each PMT pixel.

Definition at line 24 of file TOPPmtTTSHisto.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

number of PMT pixels

Definition at line 29 of file TOPPmtTTSHisto.h.

29{c_NumPmtPixels = 16};

Constructor & Destructor Documentation

◆ TOPPmtTTSHisto() [1/2]

TOPPmtTTSHisto ( )
inline

Default constructor.

Definition at line 34 of file TOPPmtTTSHisto.h.

35 {}

◆ TOPPmtTTSHisto() [2/2]

TOPPmtTTSHisto ( const std::string &  serialNumber,
float  HV 
)
inline

Full constructor.

Parameters
serialNumberPMT serial number
HVhigh voltage used for the measurement

Definition at line 42 of file TOPPmtTTSHisto.h.

43 :
44 m_serialNumber(serialNumber), m_HV(HV)
45 {}
std::string m_serialNumber
PMT serial number, e.g.
float m_HV
HV setting for which the set of histograms were taken.

Member Function Documentation

◆ getHistogram()

const TH1F * getHistogram ( unsigned  pmtPixel) const
inline

Returns TTS histogram for a specified pmtPixel.

Parameters
pmtPixelpmtPixel number (1-based)
Returns
TTS histogram pointer or nullptr for invalid pmtPixel

Definition at line 102 of file TOPPmtTTSHisto.h.

103 {
104 pmtPixel--;
105 if (pmtPixel >= c_NumPmtPixels) return 0;
106 return &m_histo[pmtPixel];
107 }
TH1F m_histo[c_NumPmtPixels]
histograms of measured TTS (one per pmtPixel)

◆ getHV()

float getHV ( ) const
inline

Returns high voltage used for TTS measurement.

Returns
high voltage

Definition at line 95 of file TOPPmtTTSHisto.h.

95{return m_HV;}

◆ getNumOfPixels()

int getNumOfPixels ( ) const
inline

Returns number of PMT pixels.

Returns
number of pixels

Definition at line 83 of file TOPPmtTTSHisto.h.

83{return c_NumPmtPixels;}

◆ getSerialNumber()

const std::string & getSerialNumber ( ) const
inline

Returns PMT serial number.

Returns
serial number

Definition at line 89 of file TOPPmtTTSHisto.h.

89{return m_serialNumber;}

◆ setHistogram()

void setHistogram ( unsigned  pmtPixel,
const TH1F *  histo 
)
inline

Set histogram for a given pixel (make a copy)

Parameters
pmtPixelpmtPixel number (1-based)
histoTTS histogram

Definition at line 64 of file TOPPmtTTSHisto.h.

65 {
66 if (!histo) {
67 B2ERROR("TOPPmtTTSHisto::setHistogram: null pointer received");
68 return;
69 }
70 pmtPixel--;
71 if (pmtPixel >= c_NumPmtPixels) {
72 B2ERROR("TOPPmtTTSHisto::setHistogram: invalid PMT pixel "
73 << LogVar("PMT pixel", pmtPixel + 1));
74 return;
75 }
76 m_histo[pmtPixel] = *histo;
77 }
Class to store variables with their name which were sent to the logging service.

◆ setHV()

void setHV ( float  HV)
inline

Set high voltage used for TTS measurement.

Parameters
HVhigh voltage

Definition at line 57 of file TOPPmtTTSHisto.h.

57{m_HV = HV;}

◆ setSerialNumber()

void setSerialNumber ( const std::string &  serNum)
inline

Set PMT serial number.

Parameters
serNumserial number

Definition at line 51 of file TOPPmtTTSHisto.h.

51{m_serialNumber = serNum;}

Member Data Documentation

◆ m_histo

TH1F m_histo[c_NumPmtPixels]
private

histograms of measured TTS (one per pmtPixel)

Definition at line 114 of file TOPPmtTTSHisto.h.

◆ m_HV

float m_HV = 0
private

HV setting for which the set of histograms were taken.

Definition at line 113 of file TOPPmtTTSHisto.h.

◆ m_serialNumber

std::string m_serialNumber
private

PMT serial number, e.g.

JTxxxx

Definition at line 112 of file TOPPmtTTSHisto.h.


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