CMS 3D CMS Logo

Public Member Functions | Protected Types | Protected Member Functions

cond::EcalTPGCrystalStatusHelper Class Reference

Inheritance diagram for cond::EcalTPGCrystalStatusHelper:
EcalPyWrapperHelper< EcalTPGCrystalStatusCode >

List of all members.

Public Member Functions

 EcalTPGCrystalStatusHelper ()

Protected Types

typedef EcalTPGCrystalStatusCode EcalObject

Protected Member Functions

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

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]

Definition at line 134 of file EcalTPGCrystalStatusPyWrapper.cc.

:EcalPyWrapperHelper<EcalObject>(1, STATUS, "-Errors total: "){}

Member Function Documentation

type_vValues cond::EcalTPGCrystalStatusHelper::getValues ( const std::vector< EcalObject > &  vItems) [inline, protected, virtual]

Implements EcalPyWrapperHelper< EcalTPGCrystalStatusCode >.

Definition at line 140 of file EcalTPGCrystalStatusPyWrapper.cc.

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

      {
        //change me
        //unsigned int totalValues = 2; 

        type_vValues vValues(total_values);
                        
        //change us
        vValues[0].first = "[0]StatusCode";

                        
        vValues[0].second = .0;
        
        //get info:
        unsigned int shift = 0, mask = 1;
        unsigned int statusCode;
        for(std::vector<EcalObject>::const_iterator iItems = vItems.begin(); iItems != vItems.end(); ++iItems){
          //change us
          statusCode =  iItems->getStatusCode();
          for (shift = 0; shift < total_values; ++shift){
            mask = 1 << (shift);
            //std::cout << "; statuscode: " << statusCode;
            if (statusCode & mask){
              vValues[shift].second += 1;
            }
          }
        }
        return vValues;
      }