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)
 
const void print (std::stringstream &ss)
 
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 110 of file SiPixelPayloadInspectorHelper.h.

References phase(), and SiPixelPI::two.

110  {
111  if ((phase() == phase::two && theOtherPhase.phase() != phase::two) ||
112  (phase() != phase::two && theOtherPhase.phase() == phase::two)) {
113  return true;
114  } else {
115  return false;
116  }
117  }
const SiPixelPI::phase phase() const

◆ isPhase1Comparison()

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

Definition at line 103 of file SiPixelPayloadInspectorHelper.h.

References SiPixelPI::one, and phase().

103  {
104  if (phase() == phase::one || theOtherPhase.phase() == phase::one)
105  return true;
106  else
107  return false;
108  }
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(), gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >::fill(), and print().

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(), isPhase1Comparison(), and print().

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

◆ print()

const void SiPixelPI::PhaseInfo::print ( std::stringstream &  ss)
inline

Definition at line 94 of file SiPixelPayloadInspectorHelper.h.

References m_detsize, pathToTopoXML(), phase(), and contentValuesCheck::ss.

Referenced by SiPixelPI::operator<<().

94  {
95  ss << "---------------------------------------------------------------\n"
96  << " PhaseInfo Data \n\n"
97  << " Phase : " << phase() << "\n"
98  << " DetSide: " << m_detsize << "\n"
99  << " pathToXML: " << pathToTopoXML() << "\n"
100  << "-------------------------------------------------------------\n\n";
101  }
const SiPixelPI::phase phase() const

Member Data Documentation

◆ m_detsize

size_t SiPixelPI::PhaseInfo::m_detsize
private

Definition at line 120 of file SiPixelPayloadInspectorHelper.h.

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