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 (const phase &thePhase)
 
 PhaseInfo (unsigned int size)
 
virtual ~PhaseInfo ()
 

Private Attributes

size_t m_detsize
 

Detailed Description

Definition at line 48 of file SiPixelPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ PhaseInfo() [1/2]

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

Definition at line 50 of file SiPixelPayloadInspectorHelper.h.

50 : m_detsize(size) {}

◆ PhaseInfo() [2/2]

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

Definition at line 52 of file SiPixelPayloadInspectorHelper.h.

52  {
53  switch (thePhase) {
54  case phase::zero:
56  break;
57  case phase::one:
59  break;
60  case phase::two:
62  break;
63  default:
64  m_detsize = 99999;
65  edm::LogError("PhaseInfo") << "undefined phase: " << thePhase;
66  }
67  }

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

◆ ~PhaseInfo()

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

Definition at line 68 of file SiPixelPayloadInspectorHelper.h.

68 { edm::LogInfo("PhaseInfo") << "PhaseInfo::~PhaseInfo()\n"; }

Member Function Documentation

◆ isComparedWithPhase2()

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

Definition at line 100 of file SiPixelPayloadInspectorHelper.h.

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

References phase(), and SiPixelPI::two.

◆ isPhase1Comparison()

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

Definition at line 93 of file SiPixelPayloadInspectorHelper.h.

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

References SiPixelPI::one, and phase().

◆ pathToTopoXML()

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

Definition at line 81 of file SiPixelPayloadInspectorHelper.h.

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

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

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

◆ phase()

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

Definition at line 69 of file SiPixelPayloadInspectorHelper.h.

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

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

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

Member Data Documentation

◆ m_detsize

size_t SiPixelPI::PhaseInfo::m_detsize
private

Definition at line 110 of file SiPixelPayloadInspectorHelper.h.

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

SiPixelPI::one
Definition: SiPixelPayloadInspectorHelper.h:39
SiPixelPI::zero
Definition: SiPixelPayloadInspectorHelper.h:39
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
SiPixelPI::phase0size
static const unsigned int phase0size
Definition: SiPixelPayloadInspectorHelper.h:42
SiPixelPI::PhaseInfo::m_detsize
size_t m_detsize
Definition: SiPixelPayloadInspectorHelper.h:110
SiPixelPI::PhaseInfo::phase
const SiPixelPI::phase phase() const
Definition: SiPixelPayloadInspectorHelper.h:69
SiPixelPI::phase2size
static const unsigned int phase2size
Definition: SiPixelPayloadInspectorHelper.h:44
SiPixelPI::phase1size
static const unsigned int phase1size
Definition: SiPixelPayloadInspectorHelper.h:43
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
SiPixelPI::two
Definition: SiPixelPayloadInspectorHelper.h:39
Exception
Definition: hltDiff.cc:245
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443