#include <DQMServices/ClientConfig/interface/QTestHandle.h>
Public Member Functions | |
void | attachTests (DQMStore *bei, bool verboseQT=true) |
Attaches the quality tests to the MonitorElement. | |
std::map< std::string, std::vector< std::string > > | checkDetailedQTStatus (DQMStore *bei) const |
Checks alarms for single MonitorElements. | |
std::pair< std::string, std::string > | checkGlobalQTStatus (DQMStore *bei) const |
Checks global status of Quality Tests. | |
bool | configureTests (const std::string &configFile, DQMStore *bei) |
Parses Config File and configures the quality tests. | |
QTestHandle () | |
Creator. | |
~QTestHandle () | |
Destructor. | |
Private Attributes | |
QTestStatusChecker * | qtChecker |
QTestConfigure * | qtConfigurer |
QTestConfigurationParser * | qtParser |
bool | testsConfigured |
Definition at line 22 of file QTestHandle.h.
QTestHandle::QTestHandle | ( | ) |
Creator.
Definition at line 19 of file QTestHandle.cc.
References qtChecker, qtConfigurer, qtParser, and testsConfigured.
00020 { 00021 qtParser = new QTestConfigurationParser; 00022 qtConfigurer = new QTestConfigure; 00023 qtChecker = new QTestStatusChecker; 00024 00025 testsConfigured = false; 00026 00027 }
QTestHandle::~QTestHandle | ( | ) |
Destructor.
Definition at line 29 of file QTestHandle.cc.
References qtChecker, qtConfigurer, and qtParser.
00030 { 00031 delete qtParser; 00032 delete qtConfigurer; 00033 delete qtChecker; 00034 }
Attaches the quality tests to the MonitorElement.
Definition at line 60 of file QTestHandle.cc.
References firstTime, python::multivaluedict::map(), QTestConfigurationParser::meToTestsList(), qtParser, and DQMStore::useQTestByMatch().
Referenced by dqm::daq::FEDMonitorClient::bookQTests(), QualityTester::performTests(), and SiPixelActionExecutor::setupQTests().
00061 { 00062 00063 std::map<std::string, std::vector<std::string> > mapMeToTests 00064 = qtParser->meToTestsList(); 00065 00066 00067 for (std::map<std::string, std::vector<std::string> >::iterator itr = mapMeToTests.begin(); 00068 itr != mapMeToTests.end(); 00069 ++itr) 00070 { 00071 const std::string &meName = itr->first; 00072 const std::vector<std::string> &tests = itr->second; 00073 00074 for (std::vector<std::string>::const_iterator testsItr = tests.begin(); 00075 testsItr != tests.end(); ++testsItr){ 00076 int cases = bei->useQTestByMatch(meName, *testsItr); 00077 if (firstTime && verboseQT && cases == 0) 00078 edm::LogWarning ("QTestHandle::attachTests") 00079 << " ==>> Invalid qtest xml: Link '"<< meName 00080 <<"', QTest '"<< *testsItr << "' - no matching ME! <<== "; 00081 } 00082 } 00083 firstTime = false; 00084 }
std::map< std::string, std::vector< std::string > > QTestHandle::checkDetailedQTStatus | ( | DQMStore * | bei | ) | const |
Checks alarms for single MonitorElements.
Definition at line 93 of file QTestHandle.cc.
References QTestStatusChecker::checkDetailedStatus(), and qtChecker.
Referenced by QualityTester::performTests().
00094 { 00095 return qtChecker->checkDetailedStatus(bei); 00096 }
std::pair< std::string, std::string > QTestHandle::checkGlobalQTStatus | ( | DQMStore * | bei | ) | const |
Checks global status of Quality Tests.
Definition at line 87 of file QTestHandle.cc.
References QTestStatusChecker::checkGlobalStatus(), and qtChecker.
00088 { 00089 return qtChecker->checkGlobalStatus(bei); 00090 }
Parses Config File and configures the quality tests.
Definition at line 36 of file QTestHandle.cc.
References QTestConfigure::enableTests(), DQMParserBase::getDocument(), DQMParserBase::getNewDocument(), QTestConfigurationParser::parseQTestsConfiguration(), qtConfigurer, qtParser, testsConfigured, and QTestConfigurationParser::testsList().
Referenced by dqm::daq::FEDMonitorClient::bookQTests(), and SiPixelActionExecutor::setupQTests().
00037 { 00038 if (testsConfigured) 00039 qtParser->getNewDocument(configFile); 00040 else 00041 { 00042 qtParser->getDocument(configFile); 00043 testsConfigured=true; 00044 } 00045 00046 if (! qtParser->parseQTestsConfiguration()) 00047 { 00048 std::map<std::string, std::map<std::string, std::string> > testsONList 00049 = qtParser->testsList(); 00050 00051 if (qtConfigurer->enableTests(testsONList,bei)) 00052 return true; 00053 } 00054 else 00055 return true; 00056 00057 return false; 00058 }
QTestStatusChecker* QTestHandle::qtChecker [private] |
Definition at line 40 of file QTestHandle.h.
Referenced by checkDetailedQTStatus(), checkGlobalQTStatus(), QTestHandle(), and ~QTestHandle().
QTestConfigure* QTestHandle::qtConfigurer [private] |
Definition at line 39 of file QTestHandle.h.
Referenced by configureTests(), QTestHandle(), and ~QTestHandle().
QTestConfigurationParser* QTestHandle::qtParser [private] |
Definition at line 38 of file QTestHandle.h.
Referenced by attachTests(), configureTests(), QTestHandle(), and ~QTestHandle().
bool QTestHandle::testsConfigured [private] |