CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SiStripPI::Monitor1D Class Reference

#include <SiStripPayloadInspectorHelper.h>

Public Member Functions

void Fill (int apv, int det, double vx)
 
void flush ()
 
TH1F & getHist ()
 
TH1F & hist ()
 
 Monitor1D ()
 
 Monitor1D (OpMode mode, const char *name, const char *title, int nbinsx, double xmin, double xmax)
 
 ~Monitor1D ()
 

Private Attributes

Entry entry_
 
OpMode mode_
 
TH1F obj_
 
int prev_apv_ = 0
 
int prev_det_ = 0
 

Detailed Description

Definition at line 59 of file SiStripPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ Monitor1D() [1/2]

SiStripPI::Monitor1D::Monitor1D ( OpMode  mode,
const char *  name,
const char *  title,
int  nbinsx,
double  xmin,
double  xmax 
)
inline

Definition at line 61 of file SiStripPayloadInspectorHelper.h.

62  : entry_(), mode_(mode), obj_(name, title, nbinsx, xmin, xmax) {}

◆ Monitor1D() [2/2]

SiStripPI::Monitor1D::Monitor1D ( )
inline

Definition at line 64 of file SiStripPayloadInspectorHelper.h.

◆ ~Monitor1D()

SiStripPI::Monitor1D::~Monitor1D ( )
inline

Definition at line 66 of file SiStripPayloadInspectorHelper.h.

66 {}

Member Function Documentation

◆ Fill()

void SiStripPI::Monitor1D::Fill ( int  apv,
int  det,
double  vx 
)
inline

Definition at line 68 of file SiStripPayloadInspectorHelper.h.

68  {
69  switch (mode_) {
70  case (OpMode::APV_BASED):
71  if (!((apv == prev_apv_ && det == prev_det_) || prev_apv_ == 0)) {
72  flush();
73  }
74  prev_apv_ = apv;
75  prev_det_ = det;
76  break;
77  case (OpMode::MODULE_BASED):
78  if (!(det == prev_det_ || prev_det_ == 0)) {
79  flush();
80  }
81  prev_det_ = det;
82  break;
83  case (OpMode::STRIP_BASED):
84  flush();
85  break;
86  }
87  entry_.add(vx);
88  }

References SiStripPI::Entry::add(), SiStripPI::APV_BASED, entry_, flush(), mode_, SiStripPI::MODULE_BASED, prev_apv_, prev_det_, and SiStripPI::STRIP_BASED.

◆ flush()

void SiStripPI::Monitor1D::flush ( )
inline

Definition at line 90 of file SiStripPayloadInspectorHelper.h.

90  {
91  obj_.Fill(entry_.mean());
92  entry_.reset();
93  }

References entry_, SiStripPI::Entry::mean(), obj_, and SiStripPI::Entry::reset().

Referenced by Fill(), and hist().

◆ getHist()

TH1F& SiStripPI::Monitor1D::getHist ( )
inline

Definition at line 100 of file SiStripPayloadInspectorHelper.h.

100 { return obj_; }

References obj_.

◆ hist()

TH1F& SiStripPI::Monitor1D::hist ( )
inline

Definition at line 95 of file SiStripPayloadInspectorHelper.h.

95  {
96  flush();
97  return obj_;
98  }

References flush(), and obj_.

Member Data Documentation

◆ entry_

Entry SiStripPI::Monitor1D::entry_
private

Definition at line 104 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

◆ mode_

OpMode SiStripPI::Monitor1D::mode_
private

Definition at line 105 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ obj_

TH1F SiStripPI::Monitor1D::obj_
private

Definition at line 106 of file SiStripPayloadInspectorHelper.h.

Referenced by flush(), getHist(), and hist().

◆ prev_apv_

int SiStripPI::Monitor1D::prev_apv_ = 0
private

Definition at line 103 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ prev_det_

int SiStripPI::Monitor1D::prev_det_ = 0
private

Definition at line 103 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
SiStripPI::Monitor1D::flush
void flush()
Definition: SiStripPayloadInspectorHelper.h:90
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
SiStripPI::Entry::add
void add(double val)
Definition: SiStripPayloadInspectorHelper.h:40
SiStripPI::Monitor1D::entry_
Entry entry_
Definition: SiStripPayloadInspectorHelper.h:104
SiStripPI::MODULE_BASED
Definition: SiStripPayloadInspectorHelper.h:27
SiStripPI::Entry::reset
void reset()
Definition: SiStripPayloadInspectorHelper.h:46
SiStripPI::Monitor1D::mode_
OpMode mode_
Definition: SiStripPayloadInspectorHelper.h:105
SiStripPI::Monitor1D::prev_apv_
int prev_apv_
Definition: SiStripPayloadInspectorHelper.h:103
SiStripPI::APV_BASED
Definition: SiStripPayloadInspectorHelper.h:27
SiStripPI::Monitor1D::prev_det_
int prev_det_
Definition: SiStripPayloadInspectorHelper.h:103
SiStripPI::Monitor1D::obj_
TH1F obj_
Definition: SiStripPayloadInspectorHelper.h:106
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
SiStripPI::STRIP_BASED
Definition: SiStripPayloadInspectorHelper.h:27
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
SiStripPI::Entry::mean
double mean()
Definition: SiStripPayloadInspectorHelper.h:33