#include <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, bool UseDB=false) |
Parses Config File and configures the quality tests. | |
QTestHandle () | |
Creator. | |
~QTestHandle () | |
Destructor. | |
Private Attributes | |
QTestStatusChecker * | qtChecker |
QTestConfigure * | qtConfigurer |
QTestConfigurationParser * | qtParser |
bool | testsConfigured |
* Handles quality tests (configuring, attaching to ME's,
Definition at line 22 of file QTestHandle.h.
QTestHandle::QTestHandle | ( | ) |
Creator.
Definition at line 20 of file QTestHandle.cc.
References qtChecker, qtConfigurer, qtParser, and testsConfigured.
{ qtParser = new QTestConfigurationParser; qtConfigurer = new QTestConfigure; qtChecker = new QTestStatusChecker; testsConfigured = false; }
QTestHandle::~QTestHandle | ( | ) |
Destructor.
Definition at line 30 of file QTestHandle.cc.
References qtChecker, qtConfigurer, and qtParser.
{ delete qtParser; delete qtConfigurer; delete qtChecker; }
void QTestHandle::attachTests | ( | DQMStore * | bei, |
bool | verboseQT = true |
||
) |
Attaches the quality tests to the MonitorElement.
Definition at line 64 of file QTestHandle.cc.
References firstTime, Association::map, QTestConfigurationParser::meToTestsList(), qtParser, and DQMStore::useQTestByMatch().
Referenced by SiPixelActionExecutor::setupQTests().
{ std::map<std::string, std::vector<std::string> > mapMeToTests = qtParser->meToTestsList(); for (std::map<std::string, std::vector<std::string> >::iterator itr = mapMeToTests.begin(); itr != mapMeToTests.end(); ++itr) { const std::string &meName = itr->first; const std::vector<std::string> &tests = itr->second; for (std::vector<std::string>::const_iterator testsItr = tests.begin(); testsItr != tests.end(); ++testsItr){ int cases = bei->useQTestByMatch(meName, *testsItr); if (firstTime && verboseQT && cases == 0) edm::LogWarning ("QTestHandle::attachTests") << " ==>> Invalid qtest xml: Link '"<< meName <<"', QTest '"<< *testsItr << "' - no matching ME! <<== "; } } firstTime = false; }
std::map< std::string, std::vector< std::string > > QTestHandle::checkDetailedQTStatus | ( | DQMStore * | bei | ) | const |
Checks alarms for single MonitorElements.
Definition at line 97 of file QTestHandle.cc.
References QTestStatusChecker::checkDetailedStatus(), and qtChecker.
{ return qtChecker->checkDetailedStatus(bei); }
std::pair< std::string, std::string > QTestHandle::checkGlobalQTStatus | ( | DQMStore * | bei | ) | const |
Checks global status of Quality Tests.
Definition at line 91 of file QTestHandle.cc.
References QTestStatusChecker::checkGlobalStatus(), and qtChecker.
{ return qtChecker->checkGlobalStatus(bei); }
bool QTestHandle::configureTests | ( | const std::string & | configFile, |
DQMStore * | bei, | ||
bool | UseDB = false |
||
) |
Parses Config File and configures the quality tests.
Definition at line 37 of file QTestHandle.cc.
References QTestConfigure::enableTests(), DQMParserBase::getDocument(), DQMParserBase::getNewDocument(), QTestConfigurationParser::parseQTestsConfiguration(), qtConfigurer, qtParser, testsConfigured, and QTestConfigurationParser::testsList().
Referenced by SiPixelActionExecutor::setupQTests().
{ //In case of UseDB==true the configFile is the content of the xml file itself //In case of UseDB==false (default) configFile is just the name of the file if (testsConfigured) qtParser->getNewDocument(configFile,UseDB); else { qtParser->getDocument(configFile,UseDB); testsConfigured=true; } if (! qtParser->parseQTestsConfiguration()) { std::map<std::string, std::map<std::string, std::string> > testsONList = qtParser->testsList(); if (qtConfigurer->enableTests(testsONList,bei)) return true; } else return true; return false; }
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] |
Definition at line 41 of file QTestHandle.h.
Referenced by configureTests(), and QTestHandle().