CMS 3D CMS Logo

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

#include <SiStripPayloadInspectorHelper.h>

Public Member Functions

void Fill (int apv, int det, double vx, double vy)
 
void flush ()
 
TH2F & hist ()
 
 Monitor2D ()
 
 Monitor2D (OpMode mode, const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax)
 
 ~Monitor2D ()
 

Private Attributes

Entry entryx_
 
Entry entryy_
 
OpMode mode_
 
TH2F obj_
 
int prev_apv_ = 0
 
int prev_det_ = 0
 

Detailed Description

Definition at line 111 of file SiStripPayloadInspectorHelper.h.

Constructor & Destructor Documentation

◆ Monitor2D() [1/2]

SiStripPI::Monitor2D::Monitor2D ( OpMode  mode,
const char *  name,
const char *  title,
int  nbinsx,
double  xmin,
double  xmax,
int  nbinsy,
double  ymin,
double  ymax 
)
inline

Definition at line 113 of file SiStripPayloadInspectorHelper.h.

122  : entryx_(), entryy_(), mode_(mode), obj_(name, title, nbinsx, xmin, xmax, nbinsy, ymin, ymax) {}

◆ Monitor2D() [2/2]

SiStripPI::Monitor2D::Monitor2D ( )
inline

Definition at line 124 of file SiStripPayloadInspectorHelper.h.

◆ ~Monitor2D()

SiStripPI::Monitor2D::~Monitor2D ( )
inline

Definition at line 126 of file SiStripPayloadInspectorHelper.h.

126 {}

Member Function Documentation

◆ Fill()

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

Definition at line 128 of file SiStripPayloadInspectorHelper.h.

128  {
129  switch (mode_) {
130  case (OpMode::APV_BASED):
131  if (!((apv == prev_apv_ && det == prev_det_) || prev_apv_ == 0)) {
132  flush();
133  }
134  prev_apv_ = apv;
135  prev_det_ = det;
136  break;
137  case (OpMode::MODULE_BASED):
138  if (!(det == prev_det_ || prev_det_ == 0)) {
139  flush();
140  }
141  prev_det_ = det;
142  break;
143  case (OpMode::STRIP_BASED):
144  flush();
145  break;
146  }
147  entryx_.add(vx);
148  entryy_.add(vy);
149  }

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

◆ flush()

void SiStripPI::Monitor2D::flush ( )
inline

Definition at line 151 of file SiStripPayloadInspectorHelper.h.

151  {
152  obj_.Fill(entryx_.mean(), entryy_.mean());
153  entryx_.reset();
154  entryy_.reset();
155  }

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

Referenced by Fill(), and hist().

◆ hist()

TH2F& SiStripPI::Monitor2D::hist ( )
inline

Definition at line 157 of file SiStripPayloadInspectorHelper.h.

157  {
158  flush();
159  return obj_;
160  }

References flush(), and obj_.

Member Data Documentation

◆ entryx_

Entry SiStripPI::Monitor2D::entryx_
private

Definition at line 164 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

◆ entryy_

Entry SiStripPI::Monitor2D::entryy_
private

Definition at line 164 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

◆ mode_

OpMode SiStripPI::Monitor2D::mode_
private

Definition at line 165 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ obj_

TH2F SiStripPI::Monitor2D::obj_
private

Definition at line 166 of file SiStripPayloadInspectorHelper.h.

Referenced by flush(), and hist().

◆ prev_apv_

int SiStripPI::Monitor2D::prev_apv_ = 0
private

Definition at line 163 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ prev_det_

int SiStripPI::Monitor2D::prev_det_ = 0
private

Definition at line 163 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

SiStripPI::Monitor2D::entryx_
Entry entryx_
Definition: SiStripPayloadInspectorHelper.h:164
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
SiStripPI::Monitor2D::flush
void flush()
Definition: SiStripPayloadInspectorHelper.h:151
SiStripPI::Monitor2D::mode_
OpMode mode_
Definition: SiStripPayloadInspectorHelper.h:165
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
SiStripPI::Entry::add
void add(double val)
Definition: SiStripPayloadInspectorHelper.h:40
SiStripPI::MODULE_BASED
Definition: SiStripPayloadInspectorHelper.h:27
SiStripPI::Entry::reset
void reset()
Definition: SiStripPayloadInspectorHelper.h:46
SiStripPI::APV_BASED
Definition: SiStripPayloadInspectorHelper.h:27
SiStripPI::Monitor2D::prev_apv_
int prev_apv_
Definition: SiStripPayloadInspectorHelper.h:163
SiStripPI::Monitor2D::obj_
TH2F obj_
Definition: SiStripPayloadInspectorHelper.h:166
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
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
SiStripPI::Monitor2D::entryy_
Entry entryy_
Definition: SiStripPayloadInspectorHelper.h:164
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
SiStripPI::Entry::mean
double mean()
Definition: SiStripPayloadInspectorHelper.h:33
SiStripPI::Monitor2D::prev_det_
int prev_det_
Definition: SiStripPayloadInspectorHelper.h:163