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

Public Member Functions

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

Protected Types

typedef EcalChannelStatusCode EcalObject
 
- Protected Types inherited from EcalPyWrapperHelper< EcalChannelStatusCode >
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< EcalChannelStatusCode >
static const unsigned int MEAN
 
static const unsigned int STATUS
 
- Protected Attributes inherited from EcalPyWrapperHelper< EcalChannelStatusCode >
std::string names
 
unsigned int status
 
unsigned int total_values
 

Detailed Description

Definition at line 131 of file EcalDCSTowerStatusPyWrapper.cc.

Member Typedef Documentation

Definition at line 138 of file EcalDCSTowerStatusPyWrapper.cc.

Constructor & Destructor Documentation

cond::EcalDCSTowerStatusHelper::EcalDCSTowerStatusHelper ( )
inline

Member Function Documentation

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

Implements EcalPyWrapperHelper< EcalChannelStatusCode >.

Definition at line 140 of file EcalDCSTowerStatusPyWrapper.cc.

References edm::shift, and EcalPyWrapperHelper< EcalChannelStatusCode >::total_values.

141  {
142  //change me
143  //unsigned int totalValues = 2;
144 
145  type_vValues vValues(total_values);
146 
147  //change us
148  vValues[0].first = "LVSTATUS(0)";
149  vValues[1].first = "LVNOMINALSTATUS(1)";
150  vValues[2].first = "HVSTATUS(2)";
151  vValues[3].first = "HVNOMINALSTATUS(3)";
152  vValues[4].first = "HVEEDSTATUS(4)";
153  vValues[5].first = "HVEEDNOMINALSTATUS(5)";
154 
155 
156  vValues[0].second = .0;
157  vValues[1].second = .0;
158  vValues[2].second = .0;
159  vValues[3].second = .0;
160  vValues[4].second = .0;
161  vValues[5].second = .0;
162 
163  //get info:
164  unsigned int shift = 0, mask = 1;
165  unsigned int statusCode;
166  for(std::vector<EcalObject>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
167  //change us
168  statusCode = iItems->getStatusCode();
169  for (shift = 0; shift < total_values; ++shift){
170  mask = 1 << (shift);
171  //std::cout << "; statuscode: " << statusCode;
172  if (statusCode & mask){
173  vValues[shift].second += 1;
174  }
175  }
176  }
177  return vValues;
178  }
std::vector< std::pair< std::string, float > > type_vValues
static unsigned int const shift