Skip to content
Snippets Groups Projects
Commit 95592787 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

AthenaRootComps: flake8 fixes

parent f79da756
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file AthenaRootComps/python/AthenaRootBase.py
# @purpose make the Athena framework write a set of ROOT files
......@@ -11,7 +11,7 @@ def _loadBasicAthenaRoot():
from AthenaCommon import CfgMgr
## make sure we have been -at least- minimally correctly configured
import AthenaCommon.AtlasUnixStandardJob
import AthenaCommon.AtlasUnixStandardJob # noqa: F401
from AthenaCommon.Logging import logging
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
......@@ -22,8 +22,6 @@ def _loadBasicAthenaRoot():
svcMgr += CfgMgr.Athena__RootSvc("AthenaRootSvc")
svcMgr += CfgMgr.Athena__RootCnvSvc("AthenaRootCnvSvc")
from AthenaCommon.AppMgr import theApp
if not hasattr (svcMgr, 'EventPersistencySvc'):
svcMgr += CfgMgr.EvtPersistencySvc( "EventPersistencySvc" )
svcMgr.EventPersistencySvc.CnvServices += [ "AthenaRootCnvSvc" ]
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file: Configurables.py
# @purpose: customized Configurable classes for AthenaRootComps
# @author: Sebastien Binet <binet@cern.ch>
### ---------------------------------------------------------------------------
from AthenaRootComps.OutputStreamAthenaRoot import createNtupleOutputStream
from AthenaRootComps.OutputStreamAthenaRoot import createNtupleOutputStream # noqa: F401
### ---------------------------------------------------------------------------
## import the automatically generated Configurables
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
## @file OutputStreamAthenaRoot.py
## @brief Helper methods to create output streams
## @author Sebastien Binet <binet@cern.ch>, Peter van Gemmeren <gemmeren@bnl.gov>
## $Id: OutputStreamAthenaRoot.py 723505 2016-02-11 22:29:40Z gemmeren $
###############################################################
from __future__ import print_function
import AthenaCommon.CfgMgr as CfgMgr
from AthenaCommon.AppMgr import theApp
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaRootComps.AthenaRootCompsConf import Athena__RootOutputStreamTool as AthenaRootOutputStreamTool
def createNtupleOutputStream(streamName, fileName, tupleName="physics", asAlg = False):
......@@ -107,7 +103,6 @@ class AthenaRootOutputStreamProtect(CfgMgr.AthenaOutputStream):
pass
"""
from AthenaCommon import CfgMgr
class AthenaRootNtupleOutputStreamProtect(CfgMgr.Athena__RootNtupleOutputStream):
def __init__(self, name='Stream1', **kw):
kw['name'] = kw.get('name', name)
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file AthenaRootComps/python/ReadAthenaRoot.py
# @purpose make the Athena framework read a set of ROOT files to emulate the
......@@ -52,7 +52,7 @@ def _configure():
evtloop = getattr(svcMgr, theApp.EventLoop)
try:
evtloop.EventPrintoutInterval = 10000
except Exception as err:
except Exception:
msg.info('disabling event loop heartbeat... [failed]')
msg.info('performances might be sub-par... sorry.')
pass
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file AthenaRootComps/python/ReadAthenaxAOD.py
# @purpose make the Athena framework read a set of xAOD files to emulate the
......@@ -50,7 +50,7 @@ def _configure():
evtloop = getattr(svcMgr, theApp.EventLoop)
try:
evtloop.EventPrintoutInterval = 10000
except Exception as err:
except Exception:
msg.info('disabling event loop heartbeat... [failed]')
msg.info('performances might be sub-par... sorry.')
pass
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file AthenaRootComps/python/ReadAthenaxAODHybrid.py
# @purpose make the Athena framework read a set of xAOD files to emulate the
......@@ -61,7 +61,7 @@ def _configure():
evtloop = getattr(svcMgr, theApp.EventLoop)
try:
evtloop.EventPrintoutInterval = 10000
except Exception as err:
except Exception:
msg.info('disabling event loop heartbeat... [failed]')
msg.info('performances might be sub-par... sorry.')
pass
......
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# @file AthenaRootComps/python/WriteAthenaRoot.py
# @purpose make the Athena framework write a set of ROOT files
......@@ -19,7 +19,7 @@ def _configureWriteAthenaRoot():
msg.debug( "Configuring Athena for writing ROOT files..." )
# Load the basic services
import AthenaRootComps.AthenaRootBase
import AthenaRootComps.AthenaRootBase # noqa: F401
'''
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
......
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