CMS 3D CMS Logo

Public Member Functions | Protected Types | Protected Member Functions

cond::EcalDCSTowerStatusHelper Class Reference

Inheritance diagram for cond::EcalDCSTowerStatusHelper:
EcalPyWrapperHelper< EcalChannelStatusCode >

List of all members.

Public Member Functions

 EcalDCSTowerStatusHelper ()

Protected Types

typedef EcalChannelStatusCode EcalObject

Protected Member Functions

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

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]

Definition at line 134 of file EcalDCSTowerStatusPyWrapper.cc.

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

Member Function Documentation

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

Implements EcalPyWrapperHelper< EcalChannelStatusCode >.

Definition at line 140 of file EcalDCSTowerStatusPyWrapper.cc.

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

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

                        type_vValues vValues(total_values);
                        
                        //change us
                        vValues[0].first = "LVSTATUS(0)";
                        vValues[1].first = "LVNOMINALSTATUS(1)";
                        vValues[2].first = "HVSTATUS(2)";
                        vValues[3].first = "HVNOMINALSTATUS(3)";
                        vValues[4].first = "HVEEDSTATUS(4)";
                        vValues[5].first = "HVEEDNOMINALSTATUS(5)";

                        
                        vValues[0].second = .0;
                        vValues[1].second = .0;
                        vValues[2].second = .0;
                        vValues[3].second = .0;
                        vValues[4].second = .0;
                        vValues[5].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;
                }