Public Member Functions | |
EcalDQMChannelStatusHelper () | |
Protected Types | |
typedef EcalDQMStatusCode | EcalObject |
Protected Member Functions | |
type_vValues | getValues (const std::vector< EcalObject > &vItems) |
Definition at line 127 of file EcalDQMChannelStatusPyWrapper.cc.
typedef EcalDQMStatusCode cond::EcalDQMChannelStatusHelper::EcalObject [protected] |
Definition at line 134 of file EcalDQMChannelStatusPyWrapper.cc.
cond::EcalDQMChannelStatusHelper::EcalDQMChannelStatusHelper | ( | ) | [inline] |
Definition at line 130 of file EcalDQMChannelStatusPyWrapper.cc.
:EcalPyWrapperHelper<EcalObject>(30, STATUS, "-Errors total: "){}
type_vValues cond::EcalDQMChannelStatusHelper::getValues | ( | const std::vector< EcalObject > & | vItems | ) | [inline, protected, virtual] |
Implements EcalPyWrapperHelper< EcalDQMStatusCode >.
Definition at line 136 of file EcalDQMChannelStatusPyWrapper.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; }