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

Public Member Functions

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

Protected Types

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

Detailed Description

Definition at line 131 of file EcalTPGCrystalStatusPyWrapper.cc.

Member Typedef Documentation

Definition at line 138 of file EcalTPGCrystalStatusPyWrapper.cc.

Constructor & Destructor Documentation

cond::EcalTPGCrystalStatusHelper::EcalTPGCrystalStatusHelper ( )
inline

Member Function Documentation

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

Implements EcalPyWrapperHelper< EcalTPGCrystalStatusCode >.

Definition at line 140 of file EcalTPGCrystalStatusPyWrapper.cc.

References edm::shift, and EcalPyWrapperHelper< EcalTPGCrystalStatusCode >::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 = "[0]StatusCode";
149 
150 
151  vValues[0].second = .0;
152 
153  //get info:
154  unsigned int shift = 0, mask = 1;
155  unsigned int statusCode;
156  for(std::vector<EcalObject>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
157  //change us
158  statusCode = iItems->getStatusCode();
159  for (shift = 0; shift < total_values; ++shift){
160  mask = 1 << (shift);
161  //std::cout << "; statuscode: " << statusCode;
162  if (statusCode & mask){
163  vValues[shift].second += 1;
164  }
165  }
166  }
167  return vValues;
168  }
std::vector< std::pair< std::string, float > > type_vValues
static unsigned int const shift