CMS 3D CMS Logo

Public Member Functions | Protected Types | Protected Member Functions

cond::EcalDQMTowerStatusHelper Class Reference

Inheritance diagram for cond::EcalDQMTowerStatusHelper:
EcalPyWrapperHelper< EcalDQMStatusCode >

List of all members.

Public Member Functions

 EcalDQMTowerStatusHelper ()

Protected Types

typedef EcalDQMStatusCode EcalObject

Protected Member Functions

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

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]

Definition at line 134 of file EcalDQMTowerStatusPyWrapper.cc.

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

Member Function Documentation

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

Implements EcalPyWrapperHelper< EcalDQMStatusCode >.

Definition at line 140 of file EcalDQMTowerStatusPyWrapper.cc.

References i, edm::shift, and EcalPyWrapperHelper< EcalDQMStatusCode >::total_values.

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

                        type_vValues vValues(total_values);

                        std::stringstream ss;

                        std::string valueNames[] = {
                                "CH_ID_ERROR                          ",
                                "CH_GAIN_ZERO_ERROR                   ",
                                "CH_GAIN_SWITCH_ERROR                 ",
                                "TT_ID_ERROR                          ",
                                "TT_SIZE_ERROR                        ",
                                "PEDESTAL_LOW_GAIN_MEAN_ERROR         ",
                                "PEDESTAL_MIDDLE_GAIN_MEAN_ERROR      ",
                                "PEDESTAL_HIGH_GAIN_MEAN_ERROR        ",
                                "PEDESTAL_LOW_GAIN_RMS_ERROR          ",
                                "PEDESTAL_MIDDLE_GAIN_RMS_ERROR       ",
                                "PEDESTAL_HIGH_GAIN_RMS_ERROR         ",
                                "PEDESTAL_ONLINE_HIGH_GAIN_MEAN_ERROR ",
                                "PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR  ",
                                "TESTPULSE_LOW_GAIN_MEAN_ERROR        ",
                                "TESTPULSE_MIDDLE_GAIN_MEAN_ERROR     ",
                                "TESTPULSE_HIGH_GAIN_MEAN_ERROR       ",
                                "TESTPULSE_LOW_GAIN_RMS_ERROR         ",
                                "TESTPULSE_MIDDLE_GAIN_RMS_ERROR      ",
                                "TESTPULSE_HIGH_GAIN_RMS_ERROR        ",
                                "LASER_MEAN_ERROR                     ",
                                "LASER_RMS_ERROR                      ",
                                "LASER_TIMING_MEAN_ERROR              ",
                                "LASER_TIMING_RMS_ERROR               ",
                                "LED_MEAN_ERROR                       ",
                                "LED_RMS_ERROR                        ",
                                "LED_TIMING_MEAN_ERROR                ",
                                "LED_TIMING_RMS_ERROR                 ",
                                "STATUS_FLAG_ERROR                    ",
                                "PHYSICS_BAD_CHANNEL_WARNING          ",
                                "PHYSICS_BAD_CHANNEL_ERROR            "
                        };
                        for (unsigned int i = 0; i < total_values; ++i){
                                ss.str(""); ss << "[" << i << "]" << valueNames[i];
                                vValues[i].first = ss.str();
                                vValues[i].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;
                }