Public Member Functions | |
void | addRobBin (int robBin) |
DTRobBinsMap (const int fed, const int ros, const DQMStore *dbe) | |
DTRobBinsMap () | |
double | getChamberPercentage () |
void | init (bool v) |
void | readNewValues () |
bool | robChanged (int robBin) |
~DTRobBinsMap () | |
Private Member Functions | |
int | getValueRobBin (int robBin) const |
int | getValueRos () const |
Private Attributes | |
std::string | dduHName |
bool | init_ |
const MonitorElement * | meDDU |
const MonitorElement * | meROS |
std::map< int, int > | robsAndValues |
int | rosBin |
std::string | rosHName |
int | rosValue |
const DQMStore * | theDbe |
Definition at line 95 of file DTBlockedROChannelsTest.h.
DTBlockedROChannelsTest::DTRobBinsMap::DTRobBinsMap | ( | const int | fed, |
const int | ros, | ||
const DQMStore * | dbe | ||
) |
Definition at line 303 of file DTBlockedROChannelsTest.cc.
References DTBlockedROChannelsTest::dbe, dduHName, DQMStore::get(), meDDU, meROS, rosHName, and theDbe.
: rosBin(ros), init_(true), rosValue(0) { // get the pointer to the corresondig histo stringstream mename; mename << "DT/00-DataIntegrity/FED" << fed << "/ROS" << ros << "/FED" << fed << "_ROS" << ros << "_ROSError"; rosHName = mename.str(); stringstream whname; whname << "DT/00-DataIntegrity/FED" << fed << "/FED" << fed << "_ROSStatus"; dduHName = whname.str(); meROS = dbe->get(rosHName); meDDU = dbe->get(dduHName); theDbe = dbe; }
DTBlockedROChannelsTest::DTRobBinsMap::DTRobBinsMap | ( | ) |
Definition at line 323 of file DTBlockedROChannelsTest.cc.
DTBlockedROChannelsTest::DTRobBinsMap::~DTRobBinsMap | ( | ) |
Definition at line 327 of file DTBlockedROChannelsTest.cc.
{}
void DTBlockedROChannelsTest::DTRobBinsMap::addRobBin | ( | int | robBin | ) |
Definition at line 332 of file DTBlockedROChannelsTest.cc.
{ robsAndValues[robBin] = getValueRobBin(robBin); }
double DTBlockedROChannelsTest::DTRobBinsMap::getChamberPercentage | ( | ) |
Definition at line 384 of file DTBlockedROChannelsTest.cc.
{ meROS = theDbe->get(rosHName); meDDU = theDbe->get(dduHName); int nChangedROBs = 0; // check if ros status has changed int newValue = getValueRos(); if(newValue > rosValue) { rosValue= newValue; return 0.; } for(map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end(); ++robAndValue) { if(robChanged((*robAndValue).first)) nChangedROBs++; } return 1.-((double)nChangedROBs/(double)robsAndValues.size()); }
int DTBlockedROChannelsTest::DTRobBinsMap::getValueRobBin | ( | int | robBin | ) | const [private] |
Definition at line 339 of file DTBlockedROChannelsTest.cc.
References relativeConstraints::value.
{ if (init_) return 0; int value = 0; if(meROS) { value += (int)meROS->getBinContent(9,robBin); value += (int)meROS->getBinContent(11,robBin); } return value; }
int DTBlockedROChannelsTest::DTRobBinsMap::getValueRos | ( | ) | const [private] |
Definition at line 353 of file DTBlockedROChannelsTest.cc.
References relativeConstraints::value.
{ int value = 0; if(meDDU) { value += (int)meDDU->getBinContent(2,rosBin); value += (int)meDDU->getBinContent(10,rosBin); } return value; }
void DTBlockedROChannelsTest::DTRobBinsMap::init | ( | bool | v | ) | [inline] |
void DTBlockedROChannelsTest::DTRobBinsMap::readNewValues | ( | ) |
Definition at line 404 of file DTBlockedROChannelsTest.cc.
{ meROS = theDbe->get(rosHName); meDDU = theDbe->get(dduHName); rosValue = getValueRos(); for(map<int, int>::const_iterator robAndValue = robsAndValues.begin(); robAndValue != robsAndValues.end(); ++robAndValue) { robChanged((*robAndValue).first); } }
bool DTBlockedROChannelsTest::DTRobBinsMap::robChanged | ( | int | robBin | ) |
Definition at line 365 of file DTBlockedROChannelsTest.cc.
{ // check that this is a valid ROB for this map (= it has been added!) if(robsAndValues.find(robBin) == robsAndValues.end()) { LogWarning("DTDQM|DTRawToDigi|DTMonitorClient|DTBlockedROChannelsTest") << "[DTRobBinsMap]***Error: ROB: " << robBin << " is not valid" << endl; return false; } int newValue = getValueRobBin(robBin); if(newValue > robsAndValues[robBin]) { robsAndValues[robBin] = newValue; return true; } return false; }
std::string DTBlockedROChannelsTest::DTRobBinsMap::dduHName [private] |
Definition at line 128 of file DTBlockedROChannelsTest.h.
Referenced by DTRobBinsMap().
bool DTBlockedROChannelsTest::DTRobBinsMap::init_ [private] |
Definition at line 119 of file DTBlockedROChannelsTest.h.
Referenced by init().
const MonitorElement* DTBlockedROChannelsTest::DTRobBinsMap::meDDU [private] |
Definition at line 125 of file DTBlockedROChannelsTest.h.
Referenced by DTRobBinsMap().
const MonitorElement* DTBlockedROChannelsTest::DTRobBinsMap::meROS [private] |
Definition at line 124 of file DTBlockedROChannelsTest.h.
Referenced by DTRobBinsMap().
std::map<int, int> DTBlockedROChannelsTest::DTRobBinsMap::robsAndValues [private] |
Definition at line 121 of file DTBlockedROChannelsTest.h.
int DTBlockedROChannelsTest::DTRobBinsMap::rosBin [private] |
Definition at line 118 of file DTBlockedROChannelsTest.h.
std::string DTBlockedROChannelsTest::DTRobBinsMap::rosHName [private] |
Definition at line 127 of file DTBlockedROChannelsTest.h.
Referenced by DTRobBinsMap().
int DTBlockedROChannelsTest::DTRobBinsMap::rosValue [private] |
Definition at line 122 of file DTBlockedROChannelsTest.h.
const DQMStore* DTBlockedROChannelsTest::DTRobBinsMap::theDbe [private] |
Definition at line 130 of file DTBlockedROChannelsTest.h.
Referenced by DTRobBinsMap().