ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
AFPTechnicalStationMonitor Class Reference

A class monitoring technical parameters of one station. More...

#include <AFPTechnicalStationMonitor.h>

Collaboration diagram for AFPTechnicalStationMonitor:

Public Member Functions

 AFPTechnicalStationMonitor (const int stationID)
 Creates monitors of 3 layers. More...
 
 ~AFPTechnicalStationMonitor ()
 Deletes all objects in m_layersMonitors. More...
 
void bookHistograms (AFPTechnicalMonitorTool *toolToStoreHistograms)
 Books general station monitoring histograms and executes AFPTechnicalLayerMonitor::bookHistograms() for all objects in m_layersMonitors. More...
 
void fillHistograms (const AFP_SiRawData &hit)
 Fills general station monitoring histograms and executes AFPTechnicalLayerMonitor::fillHistograms() More...
 
void eventEnd ()
 Method to call eventEnd in layers. Executes AFPTechnicalLayerMonitor::eventEnd() for each element in m_layersMonitors. More...
 
void endOfLumiBlock (AFPTechnicalMonitorTool *toolToStoreHistograms)
 Process histograms at the end of lumi block. More...
 

Protected Member Functions

AFPTechnicalLayerMonitorcreateAndAddLayerMonitor (const int layerID)
 Creates a new AFPTechnicalLayerMonitor object and adds it to m_layersMonitors. More...
 
std::string makeName (const std::string &name) const
 Create a string with station number. More...
 
std::string makeTitle (const std::string &title) const
 Create a string with station number. More...
 

Protected Attributes

const int m_stationID
 ID number of the station which is being monitored. More...
 
std::vector< AFPTechnicalLayerMonitor * > m_layersMonitors
 Vector of tools monitoring layers in the station. More...
 
AFPTechnicalLayerMonitorm_firstLayer
 Tool monitoring the first layer in the station. More...
 
AFPTechnicalLayerMonitorm_secondLayer
 Tool monitoring the second layer in the station. More...
 
AFPTechnicalLayerMonitorm_thirdLayer
 Tool monitoring the third layer in the station. More...
 

Static Protected Attributes

static const int s_firstLayerIndex = 0
 ID number of the first layer. More...
 
static const int s_secondLayerIndex = 1
 ID number of the second layer. More...
 
static const int s_thirdLayerIndex = 2
 ID number of the third layer. More...
 

Detailed Description

A class monitoring technical parameters of one station.

Definition at line 21 of file AFPTechnicalStationMonitor.h.

Constructor & Destructor Documentation

◆ AFPTechnicalStationMonitor()

AFPTechnicalStationMonitor::AFPTechnicalStationMonitor ( const int  stationID)

Creates monitors of 3 layers.

Definition at line 22 of file AFPTechnicalStationMonitor.cxx.

◆ ~AFPTechnicalStationMonitor()

AFPTechnicalStationMonitor::~AFPTechnicalStationMonitor ( )

Deletes all objects in m_layersMonitors.

Definition at line 34 of file AFPTechnicalStationMonitor.cxx.

35 {
36  for (AFPTechnicalLayerMonitor* layerMonitor : m_layersMonitors)
37  delete layerMonitor;
38 }

Member Function Documentation

◆ bookHistograms()

void AFPTechnicalStationMonitor::bookHistograms ( AFPTechnicalMonitorTool toolToStoreHistograms)

Books general station monitoring histograms and executes AFPTechnicalLayerMonitor::bookHistograms() for all objects in m_layersMonitors.

Definition at line 41 of file AFPTechnicalStationMonitor.cxx.

42 {
43  std::string histsDirName = toolToStoreHistograms->histsDirectoryName();
44  histsDirName += makeName("");
45 
46  // register histograms in layers
47  for (AFPTechnicalLayerMonitor* layerMonitor : m_layersMonitors)
48  layerMonitor->bookHistograms(toolToStoreHistograms, histsDirName);
49 }

◆ createAndAddLayerMonitor()

AFPTechnicalLayerMonitor * AFPTechnicalStationMonitor::createAndAddLayerMonitor ( const int  layerID)
protected

Creates a new AFPTechnicalLayerMonitor object and adds it to m_layersMonitors.

Parameters
layerIDID number of the layer which new object will be monitoring
Returns
pointer to the new object

Definition at line 70 of file AFPTechnicalStationMonitor.cxx.

71 {
73  m_layersMonitors.push_back(newMonitor);
74 
75  return newMonitor;
76 }

◆ endOfLumiBlock()

void AFPTechnicalStationMonitor::endOfLumiBlock ( AFPTechnicalMonitorTool toolToStoreHistograms)

Process histograms at the end of lumi block.

Parameters
toolToStoreHistogramspointer to the parent monitoring object (may not be used)

Calls endOfLumiBlock on each layer.

Definition at line 85 of file AFPTechnicalStationMonitor.cxx.

86 {
88 
90  layer->endOfLumiBlock(toolToStoreHistograms);
91 }

◆ eventEnd()

void AFPTechnicalStationMonitor::eventEnd ( )

Method to call eventEnd in layers. Executes AFPTechnicalLayerMonitor::eventEnd() for each element in m_layersMonitors.

Definition at line 78 of file AFPTechnicalStationMonitor.cxx.

79 {
81  layer->eventEnd();
82 }

◆ fillHistograms()

void AFPTechnicalStationMonitor::fillHistograms ( const AFP_SiRawData hit)

Fills general station monitoring histograms and executes AFPTechnicalLayerMonitor::fillHistograms()

Definition at line 52 of file AFPTechnicalStationMonitor.cxx.

53 {
54  switch (hit.link()%4) {
55  case s_firstLayerIndex:
57  break;
58  case s_secondLayerIndex:
60  break;
61  case s_thirdLayerIndex:
63  break;
64  // default:
65  // ATH_MSG_WARNING("Unrecognised layer number: "<<hit.pixelLayerID());
66  }
67 
68 }

◆ makeName()

std::string AFPTechnicalStationMonitor::makeName ( const std::string &  name) const
protected

Create a string with station number.

Used for creating names of distributions.

Parameters
nametext which should be prepended to the standard one e.g. "Station1"

Definition at line 93 of file AFPTechnicalStationMonitor.cxx.

94 {
95  std::stringstream histName;
96  histName <<name<<"Station"<<m_stationID;
97 
98  return histName.str();
99 }

◆ makeTitle()

std::string AFPTechnicalStationMonitor::makeTitle ( const std::string &  title) const
protected

Create a string with station number.

Used for creating titles of distributions.

Parameters
titletext which should be prepended to the standard one e.g. " in station 1"

Definition at line 101 of file AFPTechnicalStationMonitor.cxx.

102 {
103  std::stringstream histTitle;
104  histTitle <<title<<" in station "<<m_stationID;
105 
106  return histTitle.str();
107 }

Member Data Documentation

◆ m_firstLayer

AFPTechnicalLayerMonitor* AFPTechnicalStationMonitor::m_firstLayer
protected

Tool monitoring the first layer in the station.

Definition at line 75 of file AFPTechnicalStationMonitor.h.

◆ m_layersMonitors

std::vector<AFPTechnicalLayerMonitor*> AFPTechnicalStationMonitor::m_layersMonitors
protected

Vector of tools monitoring layers in the station.

Definition at line 72 of file AFPTechnicalStationMonitor.h.

◆ m_secondLayer

AFPTechnicalLayerMonitor* AFPTechnicalStationMonitor::m_secondLayer
protected

Tool monitoring the second layer in the station.

Definition at line 77 of file AFPTechnicalStationMonitor.h.

◆ m_stationID

const int AFPTechnicalStationMonitor::m_stationID
protected

ID number of the station which is being monitored.

Definition at line 69 of file AFPTechnicalStationMonitor.h.

◆ m_thirdLayer

AFPTechnicalLayerMonitor* AFPTechnicalStationMonitor::m_thirdLayer
protected

Tool monitoring the third layer in the station.

Definition at line 79 of file AFPTechnicalStationMonitor.h.

◆ s_firstLayerIndex

const int AFPTechnicalStationMonitor::s_firstLayerIndex = 0
staticprotected

ID number of the first layer.

Definition at line 62 of file AFPTechnicalStationMonitor.h.

◆ s_secondLayerIndex

const int AFPTechnicalStationMonitor::s_secondLayerIndex = 1
staticprotected

ID number of the second layer.

Definition at line 64 of file AFPTechnicalStationMonitor.h.

◆ s_thirdLayerIndex

const int AFPTechnicalStationMonitor::s_thirdLayerIndex = 2
staticprotected

ID number of the third layer.

Definition at line 66 of file AFPTechnicalStationMonitor.h.


The documentation for this class was generated from the following files:
AFPTechnicalStationMonitor::s_secondLayerIndex
static const int s_secondLayerIndex
ID number of the second layer.
Definition: AFPTechnicalStationMonitor.h:64
AFPTechnicalStationMonitor::m_firstLayer
AFPTechnicalLayerMonitor * m_firstLayer
Tool monitoring the first layer in the station.
Definition: AFPTechnicalStationMonitor.h:75
AddEmptyComponent.histName
string histName
Definition: AddEmptyComponent.py:64
AFPTechnicalStationMonitor::m_layersMonitors
std::vector< AFPTechnicalLayerMonitor * > m_layersMonitors
Vector of tools monitoring layers in the station.
Definition: AFPTechnicalStationMonitor.h:72
AFPTechnicalStationMonitor::s_firstLayerIndex
static const int s_firstLayerIndex
ID number of the first layer.
Definition: AFPTechnicalStationMonitor.h:62
AFPTechnicalMonitorTool::histsDirectoryName
std::string histsDirectoryName()
name of directory to store histograms
Definition: AFPTechnicalMonitorTool.h:43
AFPTechnicalStationMonitor::m_secondLayer
AFPTechnicalLayerMonitor * m_secondLayer
Tool monitoring the second layer in the station.
Definition: AFPTechnicalStationMonitor.h:77
AFPTechnicalStationMonitor::createAndAddLayerMonitor
AFPTechnicalLayerMonitor * createAndAddLayerMonitor(const int layerID)
Creates a new AFPTechnicalLayerMonitor object and adds it to m_layersMonitors.
Definition: AFPTechnicalStationMonitor.cxx:70
AFPTechnicalStationMonitor::m_stationID
const int m_stationID
ID number of the station which is being monitored.
Definition: AFPTechnicalStationMonitor.h:69
AFPTechnicalLayerMonitor::fillHistograms
void fillHistograms(const AFP_SiRawData &hit)
Fills distributions with information provided by the hit.
Definition: AFPTechnicalLayerMonitor.cxx:35
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
AFPTechnicalLayerMonitor
Class used for monitoring technical parameters of one silicon layer.
Definition: AFPTechnicalLayerMonitor.h:18
covarianceTool.title
title
Definition: covarianceTool.py:542
Muon::nsw::STGTPSegments::moduleIDBits::stationID
constexpr uint8_t stationID
Large or Small wedge.
Definition: NSWSTGTPDecodeBitmaps.h:123
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AFPTechnicalStationMonitor::makeName
std::string makeName(const std::string &name) const
Create a string with station number.
Definition: AFPTechnicalStationMonitor.cxx:93
AFPTechnicalStationMonitor::m_thirdLayer
AFPTechnicalLayerMonitor * m_thirdLayer
Tool monitoring the third layer in the station.
Definition: AFPTechnicalStationMonitor.h:79
AFPTechnicalStationMonitor::s_thirdLayerIndex
static const int s_thirdLayerIndex
ID number of the third layer.
Definition: AFPTechnicalStationMonitor.h:66
AFP_RawDataCommonHead::link
uint16_t link() const
Definition: AFP_RawDataCommonHead.h:23