CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions
cond::EcalDQMChannelStatusHelper Class Reference
Inheritance diagram for cond::EcalDQMChannelStatusHelper:
EcalPyWrapperHelper< EcalDQMStatusCode >

Public Member Functions

 EcalDQMChannelStatusHelper ()
 
- Public Member Functions inherited from EcalPyWrapperHelper< EcalDQMStatusCode >
 EcalPyWrapperHelper (unsigned int totalValues, unsigned int status=0, std::string names="-Means: ")
 
std::string printBarrelsEndcaps (const std::vector< EcalDQMStatusCode > &barrelItems, const std::vector< EcalDQMStatusCode > &endcapItems)
 

Protected Types

typedef EcalDQMStatusCode EcalObject
 
- Protected Types inherited from EcalPyWrapperHelper< EcalDQMStatusCode >
typedef std::vector< std::pair
< std::string, float > > 
type_vValues
 

Protected Member Functions

type_vValues getValues (const std::vector< EcalObject > &vItems)
 

Additional Inherited Members

- Static Public Attributes inherited from EcalPyWrapperHelper< EcalDQMStatusCode >
static const unsigned int MEAN
 
static const unsigned int STATUS
 
- Protected Attributes inherited from EcalPyWrapperHelper< EcalDQMStatusCode >
std::string names
 
unsigned int status
 
unsigned int total_values
 

Detailed Description

Definition at line 127 of file EcalDQMChannelStatusPyWrapper.cc.

Member Typedef Documentation

Definition at line 134 of file EcalDQMChannelStatusPyWrapper.cc.

Constructor & Destructor Documentation

cond::EcalDQMChannelStatusHelper::EcalDQMChannelStatusHelper ( )
inline

Member Function Documentation

type_vValues cond::EcalDQMChannelStatusHelper::getValues ( const std::vector< EcalObject > &  vItems)
inlineprotectedvirtual

Implements EcalPyWrapperHelper< EcalDQMStatusCode >.

Definition at line 136 of file EcalDQMChannelStatusPyWrapper.cc.

References i, edm::shift, and EcalPyWrapperHelper< EcalDQMStatusCode >::total_values.

137  {
138  //change me
139  //unsigned int totalValues = 2;
140 
141  type_vValues vValues(total_values);
142 
143  std::stringstream ss;
144 
145  std::string valueNames[] = {
146  "CH_ID_ERROR ",
147  "CH_GAIN_ZERO_ERROR ",
148  "CH_GAIN_SWITCH_ERROR ",
149  "TT_ID_ERROR ",
150  "TT_SIZE_ERROR ",
151  "PEDESTAL_LOW_GAIN_MEAN_ERROR ",
152  "PEDESTAL_MIDDLE_GAIN_MEAN_ERROR ",
153  "PEDESTAL_HIGH_GAIN_MEAN_ERROR ",
154  "PEDESTAL_LOW_GAIN_RMS_ERROR ",
155  "PEDESTAL_MIDDLE_GAIN_RMS_ERROR ",
156  "PEDESTAL_HIGH_GAIN_RMS_ERROR ",
157  "PEDESTAL_ONLINE_HIGH_GAIN_MEAN_ERROR ",
158  "PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR ",
159  "TESTPULSE_LOW_GAIN_MEAN_ERROR ",
160  "TESTPULSE_MIDDLE_GAIN_MEAN_ERROR ",
161  "TESTPULSE_HIGH_GAIN_MEAN_ERROR ",
162  "TESTPULSE_LOW_GAIN_RMS_ERROR ",
163  "TESTPULSE_MIDDLE_GAIN_RMS_ERROR ",
164  "TESTPULSE_HIGH_GAIN_RMS_ERROR ",
165  "LASER_MEAN_ERROR ",
166  "LASER_RMS_ERROR ",
167  "LASER_TIMING_MEAN_ERROR ",
168  "LASER_TIMING_RMS_ERROR ",
169  "LED_MEAN_ERROR ",
170  "LED_RMS_ERROR ",
171  "LED_TIMING_MEAN_ERROR ",
172  "LED_TIMING_RMS_ERROR ",
173  "STATUS_FLAG_ERROR ",
174  "PHYSICS_BAD_CHANNEL_WARNING ",
175  "PHYSICS_BAD_CHANNEL_ERROR "
176  };
177  for (unsigned int i = 0; i < total_values; ++i){
178  ss.str(""); ss << "[" << i << "]" << valueNames[i];
179  vValues[i].first = ss.str();
180  vValues[i].second = .0;
181  }
182 
183  //get info:
184  unsigned int shift = 0, mask = 1;
185  unsigned int statusCode;
186  for(std::vector<EcalObject>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
187  //change us
188  statusCode = iItems->getStatusCode();
189  for (shift = 0; shift < total_values; ++shift){
190  mask = 1 << (shift);
191  //std::cout << "; statuscode: " << statusCode;
192  if (statusCode & mask){
193  vValues[shift].second += 1;
194  }
195  }
196  }
197  return vValues;
198  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::pair< std::string, float > > type_vValues
static unsigned int const shift