diff --git a/Control/AthenaMonitoring/AthenaMonitoring/DQEventFlagFilterTool.h b/Control/AthenaMonitoring/AthenaMonitoring/DQEventFlagFilterTool.h deleted file mode 100644 index e412a729a9a730d332041a96816ce017a0dbc844..0000000000000000000000000000000000000000 --- a/Control/AthenaMonitoring/AthenaMonitoring/DQEventFlagFilterTool.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#ifndef DQEVENTFLAGFILTERTOOL_H -#define DQEVENTFLAGFILTERTOOL_H - -#include "AthenaMonitoring/IDQFilterTool.h" -#include "AthenaBaseComps/AthAlgTool.h" -#include "GaudiKernel/StatusCode.h" -#include "GaudiKernel/ToolHandle.h" - -// This filter tool only accepts events which do not fail DP event cleaning cuts -// @author Peter Onyisi <ponyisi@cern.ch> - -class DQEventFlagFilterTool : public AthAlgTool, virtual public IDQFilterTool { - public: - DQEventFlagFilterTool(const std::string&,const std::string&,const IInterface*); - - virtual ~DQEventFlagFilterTool () override; - - virtual StatusCode initialize() override; - - virtual bool accept() const override; - - private: - bool m_alwaysReturnTrue; - bool m_invert; - bool m_doLAr; - bool m_doTile; - bool m_doSCT; - bool m_doCore; -}; - -#endif //DQEVENTFLAGFILTERTOOL_H diff --git a/Control/AthenaMonitoring/CMakeLists.txt b/Control/AthenaMonitoring/CMakeLists.txt index 2bdadaf84f90653c029ad4fd67bc52299fc00a4d..67d4b8c2d3855f0f397e0ea7b68ed85931af87e3 100644 --- a/Control/AthenaMonitoring/CMakeLists.txt +++ b/Control/AthenaMonitoring/CMakeLists.txt @@ -16,7 +16,6 @@ atlas_depends_on_subdirs( PUBLIC Control/SGMon/SGAudCore Database/AthenaPOOL/AthenaPoolUtilities Event/EventInfo - xAOD/xAODEventInfo Tools/LWHists Trigger/TrigEvent/TrigDecisionInterface AtlasTest/TestTools) diff --git a/Control/AthenaMonitoring/python/DQMonFlags.py b/Control/AthenaMonitoring/python/DQMonFlags.py index e6a15b4c3a7b9fe0778cc7b6d2eef934fee0c6be..fba3359c0815b79083e26dd3c81ef11e7df2d408 100644 --- a/Control/AthenaMonitoring/python/DQMonFlags.py +++ b/Control/AthenaMonitoring/python/DQMonFlags.py @@ -398,20 +398,6 @@ class enableLumiAccess(JobProperty): StoredValue=True list+=[enableLumiAccess] -class excludeFromCleaning(JobProperty): - """ Tools matching regexes in this list will not have event cleaning tool set up """ - statusOn=True - allowedTypes=['list'] - StoredValue=['.*LAr.*', '.*Tile.*', '.*SCT.*', 'DQTDataFlowMon'] -list+=[excludeFromCleaning] - -class specialCleaningConfiguration(JobProperty): - """ Special event cleaning configurations (no regexes) """ - statusOn=True - allowedTypes=['dict'] - StoredValue={} -list+=[specialCleaningConfiguration] - ##----------------------------------------------------------------------------- ## 2nd step ## Definition of the DQMon flag container diff --git a/Control/AthenaMonitoring/python/EventFlagFilterTool.py b/Control/AthenaMonitoring/python/EventFlagFilterTool.py deleted file mode 100644 index 2485e53d04f81f4fd55e5a0610ee202a0776c32c..0000000000000000000000000000000000000000 --- a/Control/AthenaMonitoring/python/EventFlagFilterTool.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -from PyUtils.Decorators import memoize - -# Set up the event cleaning filter tool -# Cache instances that are already created -@memoize -def GetEventFlagFilterTool(name, doLAr=True, doTile=True, doSCT=True, doCore=True, alwaysReturnTrue=False): - """ - Configure an instance of the bad LB filter tool. If called twice with the same options, will return the same instance. - Arguments: - - name: name of instance to create - - doLAr: do LAr cleaning (optional; default=True) - - doTile: do Tile cleaning (optional; default=True) - - doSCT: do SCT cleaning (optional; default=True) - - doCore: do Core event building cleaning (optional; default=True) - - alwaysReturnTrue: short-circuit all checks and return True (optional; default=False) - """ - from AthenaCommon.AppMgr import ToolSvc - from AthenaCommon.Logging import logging - log = logging.getLogger('EventFlagFilterTool') - - from AthenaMonitoring.AthenaMonitoringConf import DQEventFlagFilterTool - monFilterTool = DQEventFlagFilterTool(name, doLAr=doLAr, doTile=doTile, - doSCT=doSCT, doCore=doCore) - - ToolSvc += monFilterTool - return monFilterTool diff --git a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py index 5624b5de2890ceb58c3282c645fb4517523d6d56..57d87b85bb61400dbdc9d75b2ae58ab3b7131e19 100644 --- a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py +++ b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py @@ -256,8 +256,6 @@ if DQMonFlags.doMonitoring(): include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py") monToolSet_after = set(ToolSvc.getChildren()) local_logger.debug('DQ Post-Setup Configuration') - import re - from AthenaMonitoring.EventFlagFilterTool import GetEventFlagFilterTool for tool in monToolSet_after-monToolSet_before: # stop lumi access if we're in MC or enableLumiAccess == False if 'EnableLumi' in dir(tool): @@ -273,25 +271,6 @@ if DQMonFlags.doMonitoring(): if rec.triggerStream()=='express': local_logger.info('Stream is express and we will add ready tool for %s', tool) tool.FilterTools += [monAtlasReadyFilterTool] - # unless prevented: configure a generic event cleaning tool - if not any(re.match(_, tool.name()) for _ in DQMonFlags.excludeFromCleaning()): - if tool.name() in DQMonFlags.specialCleaningConfiguration(): - config_ = DQMonFlags.specialCleaningConfiguration()[tool.name()].copy() - for _ in config_: - try: - config_[_] = bool(config_[_]) - except: - local_logger.error('Unable to enact special event cleaning configuration for tool %s; cannot cast %s=%s to bool', tool.name(), _, config_[_]) - config_['name'] = 'DQEventFlagFilterTool_%s' % tool.name() - tool.FilterTools += [GetEventFlagFilterTool(**config_)] - del config_ - local_logger.info('Configurating special event cleaning for tool %s', tool) - else: - local_logger.info('Configuring generic event cleaning for tool %s', tool) - tool.FilterTools += [GetEventFlagFilterTool('DQEventFlagFilterTool')] - else: - local_logger.info('NOT configuring event cleaning for tool %s', tool) - # give all the tools the trigger translator if DQMonFlags.useTrigger(): tool.TrigDecisionTool = monTrigDecTool diff --git a/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx b/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx deleted file mode 100644 index 4c83a9de5f97a05c13c34bb051d9e10682469fc8..0000000000000000000000000000000000000000 --- a/Control/AthenaMonitoring/src/DQEventFlagFilterTool.cxx +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -*/ - -#include "AthenaMonitoring/DQEventFlagFilterTool.h" -#include "AthenaKernel/errorcheck.h" -#include "xAODEventInfo/EventInfo.h" - -DQEventFlagFilterTool::DQEventFlagFilterTool(const std::string& type,const std::string& name,const IInterface* parent) -: AthAlgTool( type, name, parent ) -, m_alwaysReturnTrue(false) -, m_invert(false) -, m_doLAr(true) -, m_doTile(true) -, m_doSCT(true) -, m_doCore(true) -{ - declareInterface<IDQFilterTool>(this); - declareProperty("alwaysReturnTrue", m_alwaysReturnTrue); - declareProperty("invert", m_invert); - declareProperty("doLAr", m_doLAr); - declareProperty("doTile", m_doTile); - declareProperty("doSCT", m_doSCT); - declareProperty("doCore", m_doCore); -} - -DQEventFlagFilterTool::~DQEventFlagFilterTool () {} - -StatusCode DQEventFlagFilterTool::initialize() -{ - ATH_MSG_VERBOSE("ATLAS Ready initialize"); - // don't register callback if we always return true anyway - if (m_alwaysReturnTrue) return StatusCode::SUCCESS; - - return StatusCode::SUCCESS; -} - -bool DQEventFlagFilterTool::accept() const { - if (m_alwaysReturnTrue) { - return true; - } else { - const xAOD::EventInfo* eventInfo(0); - CHECK( evtStore()->retrieve( eventInfo ) ); - bool passed(true); //event passes - auto errorcode(xAOD::EventInfo::Error); - if (m_doLAr && (eventInfo->errorState(xAOD::EventInfo::LAr) == errorcode)) { - ATH_MSG_DEBUG("Event fails LAr event veto"); - passed = false; - } else if (m_doTile && (eventInfo->errorState(xAOD::EventInfo::Tile) == errorcode)) { - ATH_MSG_DEBUG("Event fails Tile event veto"); - passed = false; - } else if (m_doSCT && (eventInfo->errorState(xAOD::EventInfo::SCT) == errorcode)) { - ATH_MSG_DEBUG("Event fails SCT event veto"); - passed = false; - } else if (m_doCore && (eventInfo->eventFlags(xAOD::EventInfo::Core) & 0x40000)) { - ATH_MSG_DEBUG("Event fais data corruption veto"); - passed = false; - } - passed ^= m_invert; - ATH_MSG_VERBOSE("Event flag DQ tool accept called, passed " << passed); - return passed; - } -} diff --git a/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx b/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx index 0b0fe4ee291fc0fa6e7294f800ac47851301f910..e3033b075757186611fca6eba7413d8e13edaa9d 100644 --- a/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx +++ b/Control/AthenaMonitoring/src/DQFilledBunchFilterTool.cxx @@ -4,7 +4,8 @@ #include "AthenaMonitoring/DQFilledBunchFilterTool.h" #include "AthenaKernel/errorcheck.h" -#include "xAODEventInfo/EventInfo.h" +#include "EventInfo/EventInfo.h" +#include "EventInfo/EventID.h" DQFilledBunchFilterTool::DQFilledBunchFilterTool(const std::string& type,const std::string& name,const IInterface* parent) : AthAlgTool( type, name, parent ) @@ -34,10 +35,10 @@ bool DQFilledBunchFilterTool::accept() const { if (m_alwaysReturnTrue) { return true; } else { - const xAOD::EventInfo* eventInfo(0); + const EventInfo* eventInfo(0); CHECK( evtStore()->retrieve( eventInfo ) ); - auto bcid = eventInfo->bcid(); + EventID::number_type bcid = eventInfo->event_ID()->bunch_crossing_id(); bool value = m_bunchtool->isFilled(bcid) ^ m_invert; ATH_MSG_VERBOSE("Filled bunch DQ tool accept called, value " << value); return value; diff --git a/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx b/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx index 7f268f068abf634fdd9f359be1a840ec2a7aae53..b3162e0ca5a21e3cd94c6d30dd6717d7f6e8e208 100755 --- a/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx +++ b/Control/AthenaMonitoring/src/components/AthenaMonitoring_entries.cxx @@ -3,7 +3,6 @@ #include "AthenaMonitoring/ManagedMonitorToolTest.h" #include "AthenaMonitoring/DQAtlasReadyFilterTool.h" #include "AthenaMonitoring/DQFilledBunchFilterTool.h" -#include "AthenaMonitoring/DQEventFlagFilterTool.h" #include "AthenaMonitoring/DQDummyFilterTool.h" #include "AthenaMonitoring/DQBadLBFilterTool.h" #include "AthenaMonitoring/TriggerTranslatorSimple.h" @@ -16,7 +15,6 @@ DECLARE_ALGORITHM_FACTORY(AthenaMonManager) DECLARE_TOOL_FACTORY(ManagedMonitorToolTest) DECLARE_TOOL_FACTORY(DQAtlasReadyFilterTool) DECLARE_TOOL_FACTORY(DQFilledBunchFilterTool) -DECLARE_TOOL_FACTORY(DQEventFlagFilterTool) DECLARE_TOOL_FACTORY(DQDummyFilterTool) DECLARE_TOOL_FACTORY(DQBadLBFilterTool) DECLARE_TOOL_FACTORY(TriggerTranslatorToolSimple) @@ -28,7 +26,6 @@ DECLARE_FACTORY_ENTRIES(AthenaMonitoring) { DECLARE_ALGTOOL(ManagedMonitorToolTest) DECLARE_ALGTOOL(DQAtlasReadyFilterTool) DECLARE_ALGTOOL(DQFilledBunchFilterTool) - DECLARE_ALGTOOL(DQEventFlagFilterTool) DECLARE_ALGTOOL(DQDummyFilterTool) DECLARE_ALGTOOL(DQBadLBFilterTool) DECLARE_ALGTOOL(TriggerTranslatorToolSimple)