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 (OpMode mode, const char *name, const char *title, int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax)
 
 Monitor2D ()
 
 ~Monitor2D ()
 

Private Attributes

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

Detailed Description

Definition at line 120 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

◆ Monitor2D() [2/2]

SiStripPI::Monitor2D::Monitor2D ( )
inline

◆ ~Monitor2D()

SiStripPI::Monitor2D::~Monitor2D ( )
inline

Definition at line 135 of file SiStripPayloadInspectorHelper.h.

135 {}

Member Function Documentation

◆ Fill()

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

Definition at line 137 of file SiStripPayloadInspectorHelper.h.

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

137  {
138  switch (mode_) {
139  case (OpMode::APV_BASED):
140  if (!((apv == prev_apv_ && det == prev_det_) || prev_apv_ == 0)) {
141  flush();
142  }
143  prev_apv_ = apv;
144  prev_det_ = det;
145  break;
146  case (OpMode::MODULE_BASED):
147  if (!(det == prev_det_ || prev_det_ == 0)) {
148  flush();
149  }
150  prev_det_ = det;
151  break;
152  case (OpMode::STRIP_BASED):
153  flush();
154  break;
155  }
156  entryx_.add(vx);
157  entryy_.add(vy);
158  }

◆ flush()

void SiStripPI::Monitor2D::flush ( )
inline

◆ hist()

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

Definition at line 166 of file SiStripPayloadInspectorHelper.h.

References flush(), and obj_.

166  {
167  flush();
168  return obj_;
169  }

Member Data Documentation

◆ entryx_

Entry SiStripPI::Monitor2D::entryx_
private

Definition at line 173 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

◆ entryy_

Entry SiStripPI::Monitor2D::entryy_
private

Definition at line 173 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

◆ mode_

OpMode SiStripPI::Monitor2D::mode_
private

Definition at line 174 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ obj_

TH2F SiStripPI::Monitor2D::obj_
private

Definition at line 175 of file SiStripPayloadInspectorHelper.h.

Referenced by flush(), and hist().

◆ prev_apv_

int SiStripPI::Monitor2D::prev_apv_ = 0
private

Definition at line 172 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

◆ prev_det_

int SiStripPI::Monitor2D::prev_det_ = 0
private

Definition at line 172 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().