CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiPixelPI::PhaseInfo Struct Reference

#include <SiPixelPayloadInspectorHelper.h>

Public Member Functions

const bool isComparedWithPhase2 (const PhaseInfo &theOtherPhase) const
 
const bool isPhase1Comparison (const PhaseInfo &theOtherPhase) const
 
const char * pathToTopoXML ()
 
const SiPixelPI::phase phase () const
 
 PhaseInfo (unsigned int size)
 
 PhaseInfo (const phase &thePhase)
 
virtual ~PhaseInfo ()
 

Private Attributes

size_t m_detsize
 

Detailed Description

Definition at line 49 of file SiPixelPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ PhaseInfo() [1/2]

SiPixelPI::PhaseInfo::PhaseInfo ( unsigned int  size)
inline

Definition at line 51 of file SiPixelPayloadInspectorHelper.h.

◆ PhaseInfo() [2/2]

SiPixelPI::PhaseInfo::PhaseInfo ( const phase thePhase)
inline

Definition at line 53 of file SiPixelPayloadInspectorHelper.h.

References m_detsize, SiPixelPI::one, SiPixelPI::phase0size, SiPixelPI::phase1size, SiPixelPI::phase2size, SiPixelPI::two, and SiPixelPI::zero.

53  {
54  switch (thePhase) {
55  case phase::zero:
57  break;
58  case phase::one:
60  break;
61  case phase::two:
63  break;
64  default:
65  m_detsize = 99999;
66  edm::LogError("PhaseInfo") << "undefined phase: " << thePhase;
67  }
68  }
static const unsigned int phase0size
Log< level::Error, false > LogError
static const unsigned int phase1size
static const unsigned int phase2size

◆ ~PhaseInfo()

virtual SiPixelPI::PhaseInfo::~PhaseInfo ( )
inlinevirtual

Definition at line 69 of file SiPixelPayloadInspectorHelper.h.

69 { edm::LogInfo("PhaseInfo") << "PhaseInfo::~PhaseInfo()\n"; }
Log< level::Info, false > LogInfo

Member Function Documentation

◆ isComparedWithPhase2()

const bool SiPixelPI::PhaseInfo::isComparedWithPhase2 ( const PhaseInfo theOtherPhase) const
inline

Definition at line 101 of file SiPixelPayloadInspectorHelper.h.

References phase(), and SiPixelPI::two.

101  {
102  if ((phase() == phase::two && theOtherPhase.phase() != phase::two) ||
103  (phase() != phase::two && theOtherPhase.phase() == phase::two)) {
104  return true;
105  } else {
106  return false;
107  }
108  }
const SiPixelPI::phase phase() const

◆ isPhase1Comparison()

const bool SiPixelPI::PhaseInfo::isPhase1Comparison ( const PhaseInfo theOtherPhase) const
inline

Definition at line 94 of file SiPixelPayloadInspectorHelper.h.

References SiPixelPI::one, and phase().

94  {
95  if (phase() == phase::one || theOtherPhase.phase() == phase::one)
96  return true;
97  else
98  return false;
99  }
const SiPixelPI::phase phase() const

◆ pathToTopoXML()

const char* SiPixelPI::PhaseInfo::pathToTopoXML ( )
inline

Definition at line 82 of file SiPixelPayloadInspectorHelper.h.

References Exception, m_detsize, SiPixelPI::phase0size, and SiPixelPI::phase1size.

Referenced by DMRChecker::endJob(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >::fill(), and gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >::fill().

82  {
83  if (m_detsize == phase0size)
84  return "Geometry/TrackerCommonData/data/trackerParameters.xml";
85  else if (m_detsize == phase1size)
86  return "Geometry/TrackerCommonData/data/PhaseI/trackerParameters.xml";
87  else if (m_detsize > phase1size)
88  return "Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml";
89  else {
90  throw cms::Exception("LogicError") << "this detId list size: " << m_detsize << "should not exist!";
91  }
92  }
static const unsigned int phase0size
static const unsigned int phase1size

◆ phase()

const SiPixelPI::phase SiPixelPI::PhaseInfo::phase ( ) const
inline

Definition at line 70 of file SiPixelPayloadInspectorHelper.h.

References Exception, m_detsize, SiPixelPI::one, SiPixelPI::phase0size, SiPixelPI::phase1size, SiPixelPI::two, and SiPixelPI::zero.

Referenced by DMRChecker::endJob(), isComparedWithPhase2(), and isPhase1Comparison().

70  {
71  if (m_detsize == phase0size)
72  return phase::zero;
73  else if (m_detsize == phase1size)
74  return phase::one;
75  else if (m_detsize > phase1size)
76  return phase::two;
77  else {
78  throw cms::Exception("LogicError") << "this detId list size: " << m_detsize << "should not exist!";
79  }
80  }
static const unsigned int phase0size
static const unsigned int phase1size

Member Data Documentation

◆ m_detsize

size_t SiPixelPI::PhaseInfo::m_detsize
private

Definition at line 111 of file SiPixelPayloadInspectorHelper.h.

Referenced by pathToTopoXML(), phase(), and PhaseInfo().