ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_Monitoring::LayerSideFormatter Class Reference

format an element index (e.g. More...

#include <SCT_NameFormatter.h>

Collaboration diagram for SCT_Monitoring::LayerSideFormatter:

Public Member Functions

 LayerSideFormatter (const unsigned int i)
 LayerSideFormatter (const unsigned int i, const unsigned int m)
const std::string & layer () const
const std::string & side () const
std::string layerPlus1 () const
std::string title () const
std::string dedicated_title () const
std::string name (const std::string &delimiter="_") const

Private Attributes

const unsigned int m_element
const std::string m_layerStr
const std::string m_sideStr
unsigned int m_region

Detailed Description

format an element index (e.g.

in looping through barrels, this goes from 0->(2*(nbarrels)) - 1 into layer and side for use in both the histogram title and its name

Definition at line 20 of file SCT_NameFormatter.h.

Constructor & Destructor Documentation

◆ LayerSideFormatter() [1/2]

SCT_Monitoring::LayerSideFormatter::LayerSideFormatter ( const unsigned int i)
inline

Definition at line 27 of file SCT_NameFormatter.h.

27 : m_element(i), m_layerStr(std::to_string(i / 2)), m_sideStr(std::to_string(
28 i % 2)),
29 m_region(1) {
30 // nop
31 }

◆ LayerSideFormatter() [2/2]

SCT_Monitoring::LayerSideFormatter::LayerSideFormatter ( const unsigned int i,
const unsigned int m )
inline

Definition at line 33 of file SCT_NameFormatter.h.

33 : m_element(i), m_layerStr(std::to_string(i / 2)),
34 m_sideStr(std::to_string(i % 2)), m_region(m) {
35 // nop
36 }

Member Function Documentation

◆ dedicated_title()

std::string SCT_Monitoring::LayerSideFormatter::dedicated_title ( ) const
inline

Definition at line 63 of file SCT_NameFormatter.h.

63 {
64 if (m_region == 1) {
65 return std::string("Layer ") + m_layerStr + std::string(" Side ") + std::to_string((m_element % 2 + 1) % 2);
66 } else {
67 return std::string("Disk ") + m_layerStr + std::string(" Side ") + std::to_string((m_element % 2 + 1) % 2);
68 }
69 }

◆ layer()

const std::string & SCT_Monitoring::LayerSideFormatter::layer ( ) const
inline

Definition at line 39 of file SCT_NameFormatter.h.

39 {
40 return m_layerStr;
41 }

◆ layerPlus1()

std::string SCT_Monitoring::LayerSideFormatter::layerPlus1 ( ) const
inline

Definition at line 49 of file SCT_NameFormatter.h.

49 {
50 return std::to_string((m_element / 2) + 1);
51 }

◆ name()

std::string SCT_Monitoring::LayerSideFormatter::name ( const std::string & delimiter = "_") const
inline

Definition at line 72 of file SCT_NameFormatter.h.

72 {
74 }

◆ side()

const std::string & SCT_Monitoring::LayerSideFormatter::side ( ) const
inline

Definition at line 44 of file SCT_NameFormatter.h.

44 {
45 return m_sideStr;
46 }

◆ title()

std::string SCT_Monitoring::LayerSideFormatter::title ( ) const
inline

Definition at line 54 of file SCT_NameFormatter.h.

54 {
55 if (m_region == 1) {
56 return std::string("Layer ") + m_layerStr + std::string(" Side ") + m_sideStr;
57 } else {
58 return std::string("Disk ") + m_layerStr + std::string(" Side ") + m_sideStr;
59 }
60 }

Member Data Documentation

◆ m_element

const unsigned int SCT_Monitoring::LayerSideFormatter::m_element
private

Definition at line 22 of file SCT_NameFormatter.h.

◆ m_layerStr

const std::string SCT_Monitoring::LayerSideFormatter::m_layerStr
private

Definition at line 23 of file SCT_NameFormatter.h.

◆ m_region

unsigned int SCT_Monitoring::LayerSideFormatter::m_region
private

Definition at line 25 of file SCT_NameFormatter.h.

◆ m_sideStr

const std::string SCT_Monitoring::LayerSideFormatter::m_sideStr
private

Definition at line 24 of file SCT_NameFormatter.h.


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