CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 111 of file SiStripPayloadInspectorHelper.h.

Constructor & Destructor Documentation

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

Definition at line 126 of file SiStripPayloadInspectorHelper.h.

126 {}

Member Function Documentation

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

Definition at line 128 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.

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  }
void SiStripPI::Monitor2D::flush ( )
inline
TH2F& SiStripPI::Monitor2D::hist ( )
inline

Definition at line 157 of file SiStripPayloadInspectorHelper.h.

References flush(), and obj_.

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

Member Data Documentation

Entry SiStripPI::Monitor2D::entryx_
private

Definition at line 164 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

Entry SiStripPI::Monitor2D::entryy_
private

Definition at line 164 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill(), and flush().

OpMode SiStripPI::Monitor2D::mode_
private

Definition at line 165 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

TH2F SiStripPI::Monitor2D::obj_
private

Definition at line 166 of file SiStripPayloadInspectorHelper.h.

Referenced by flush(), and hist().

int SiStripPI::Monitor2D::prev_apv_ = 0
private

Definition at line 163 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().

int SiStripPI::Monitor2D::prev_det_ = 0
private

Definition at line 163 of file SiStripPayloadInspectorHelper.h.

Referenced by Fill().