Skip to content
Snippets Groups Projects
Commit c27baef0 authored by scott snyder's avatar scott snyder
Browse files

DerivationFrameworkTau: Python 3 / flake 8 fixes

Updates for python 3 compatibility.

Also enable flake8 checking and fix warnings.
parent 805a6e70
No related branches found
No related tags found
6 merge requests!58791DataQualityConfigurations: Modify L1Calo config for web display,!46784MuonCondInterface: Enable thread-safety checking.,!46776Updated LArMonitoring config file for WD to match new files produced using MT,!45405updated ART test cron job,!42417Draft: DIRE and VINCIA Base Fragments for Pythia 8.3,!30835DerivationFrameworkTau: Python 3 / flake 8 fixes
......@@ -31,3 +31,7 @@ atlas_add_component( DerivationFrameworkTau
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py )
atlas_add_test( flake8
SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python
POST_EXEC_SCRIPT nopost.sh )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#********************************************************************
# TauCommon.py
# Schedules all tools needed for tau object selection and writes
# results into SG. These may then be accessed along the train.
#********************************************************************
from DerivationFrameworkCore.DerivationFrameworkMaster import *
from __future__ import print_function
from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob
from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon import CfgMgr
#====================================================================
# MAKE TAU ENUMS AVAILABLE
......@@ -30,7 +35,7 @@ DFCommonTausLooseWrapper = DerivationFramework__AsgSelectionToolWrapper( name =
StoreGateEntryName = "DFCommonTausLoose",
ContainerName = "TauJets")
ToolSvc += DFCommonTausLooseWrapper
print DFCommonTausLooseWrapper
print (DFCommonTausLooseWrapper)
DFCommonTauWrapperTools.append(DFCommonTausLooseWrapper)
# Medium
......@@ -43,7 +48,7 @@ DFCommonTausMediumWrapper = DerivationFramework__AsgSelectionToolWrapper( name =
StoreGateEntryName = "DFCommonTausMedium",
ContainerName = "TauJets")
ToolSvc += DFCommonTausMediumWrapper
print DFCommonTausMediumWrapper
print (DFCommonTausMediumWrapper)
DFCommonTauWrapperTools.append(DFCommonTausMediumWrapper)
# Tight
......@@ -56,13 +61,12 @@ DFCommonTausTightWrapper = DerivationFramework__AsgSelectionToolWrapper( name =
StoreGateEntryName = "DFCommonTausTight",
ContainerName = "TauJets")
ToolSvc += DFCommonTausTightWrapper
print DFCommonTausTightWrapper
print (DFCommonTausTightWrapper)
DFCommonTauWrapperTools.append(DFCommonTausTightWrapper)
#=======================================
# CREATE THE DERIVATION KERNEL ALGORITHM
#=======================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("TauCommonKernel",
AugmentationTools = DFCommonTauWrapperTools)
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
#********************************************************************
# TauTruthCommon.py
# Schedules all tools needed for tau truth object selection and writes
# results into SG. These may then be accessed along the train.
#********************************************************************
from DerivationFrameworkCore.DerivationFrameworkMaster import *
from __future__ import print_function
from DerivationFrameworkCore.DerivationFrameworkMaster import DerivationFrameworkJob, DerivationFrameworkIsMonteCarlo
from AthenaCommon.AppMgr import ToolSvc
from AthenaCommon import CfgMgr
#====================================================================
# AUGMENTATION TOOLS
......@@ -43,13 +48,12 @@ if DerivationFrameworkIsMonteCarlo:
TauTruthMatchingTool = DFCommonTauTruthMatchingTool,
TauContainerName = "TauJets")
ToolSvc += DFCommonTauTruthMatchingWrapper
print DFCommonTauTruthMatchingWrapper
print (DFCommonTauTruthMatchingWrapper)
DFCommonTauTruthWrapperTools.append(DFCommonTauTruthMatchingWrapper)
#=======================================
# CREATE THE DERIVATION KERNEL ALGORITHM
#=======================================
from DerivationFrameworkCore.DerivationFrameworkCoreConf import DerivationFramework__CommonAugmentation
DerivationFrameworkJob += CfgMgr.DerivationFramework__CommonAugmentation("TauTruthCommonKernel",
AugmentationTools = DFCommonTauTruthWrapperTools)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment