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

Private Attributes

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

Detailed Description

Definition at line 61 of file SiStripPayloadInspectorHelper.h.

Constructor & Destructor Documentation

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

Definition at line 73 of file SiStripPayloadInspectorHelper.h.

73 {}

Member Function Documentation

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

Definition at line 75 of file SiStripPayloadInspectorHelper.h.

References SiStripPI::APV_BASED, SiStripPI::MODULE_BASED, and SiStripPI::STRIP_BASED.

75  {
76  switch(mode_) {
77  case (OpMode::APV_BASED):
78  if(!((apv == prev_apv_ && det == prev_det_) || prev_apv_ == 0)){
79  flush();
80  }
81  prev_apv_ = apv;
82  prev_det_ = det;
83  break;
84  case (OpMode::MODULE_BASED):
85  if(!(det == prev_det_ || prev_det_ == 0)){
86  flush();
87  }
88  prev_det_ = det;
89  break;
90  case (OpMode::STRIP_BASED):
91  flush();
92  break;
93  }
94  entry_.add(vx);
95  }
void SiStripPI::Monitor1D::flush ( )
inline
TH1F& SiStripPI::Monitor1D::getHist ( )
inline

Definition at line 107 of file SiStripPayloadInspectorHelper.h.

107  {
108  return obj_;
109  }
TH1F& SiStripPI::Monitor1D::hist ( )
inline

Definition at line 102 of file SiStripPayloadInspectorHelper.h.

102  {
103  flush();
104  return obj_;
105  }

Member Data Documentation

Entry SiStripPI::Monitor1D::entry_
private

Definition at line 113 of file SiStripPayloadInspectorHelper.h.

OpMode SiStripPI::Monitor1D::mode_
private

Definition at line 114 of file SiStripPayloadInspectorHelper.h.

TH1F SiStripPI::Monitor1D::obj_
private

Definition at line 115 of file SiStripPayloadInspectorHelper.h.

int SiStripPI::Monitor1D::prev_apv_ =0
private

Definition at line 112 of file SiStripPayloadInspectorHelper.h.

int SiStripPI::Monitor1D::prev_det_ =0
private

Definition at line 112 of file SiStripPayloadInspectorHelper.h.