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::EcalDQMTowerStatusHelper Class Reference
Inheritance diagram for cond::EcalDQMTowerStatusHelper:
EcalPyWrapperHelper< EcalDQMStatusCode >

Public Member Functions

 EcalDQMTowerStatusHelper ()
 
- 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 131 of file EcalDQMTowerStatusPyWrapper.cc.

Member Typedef Documentation

Definition at line 138 of file EcalDQMTowerStatusPyWrapper.cc.

Constructor & Destructor Documentation

cond::EcalDQMTowerStatusHelper::EcalDQMTowerStatusHelper ( )
inline

Member Function Documentation

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

Implements EcalPyWrapperHelper< EcalDQMStatusCode >.

Definition at line 140 of file EcalDQMTowerStatusPyWrapper.cc.

References i, edm::shift, contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, and EcalPyWrapperHelper< EcalDQMStatusCode >::total_values.

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