From d90033238de01e14a68d1786d04e30031b4ca4ac Mon Sep 17 00:00:00 2001 From: Stewart Martin-Haugh <stewart.martin-haugh@cern.ch> Date: Wed, 4 Mar 2020 10:42:20 +0000 Subject: [PATCH] py3 fixes for EventInfo --- Event/EventInfo/CMakeLists.txt | 10 --- Event/EventInfo/python/EventInfoParams.py | 47 ------------- Event/EventInfo/python/__init__.py | 9 --- Event/EventInfo/share/EventInfo_joboptions.py | 14 ---- .../share/CreateLumiBlocks_jobOptions.py | 14 ---- .../share/MakeMetaDataforAANT_jobOptions.py | 67 ------------------- 6 files changed, 161 deletions(-) delete mode 100755 Event/EventInfo/python/EventInfoParams.py delete mode 100755 Event/EventInfo/python/__init__.py delete mode 100755 Event/EventInfo/share/EventInfo_joboptions.py delete mode 100644 LumiBlock/LumiBlockComps/share/CreateLumiBlocks_jobOptions.py delete mode 100644 LumiBlock/LumiBlockComps/share/MakeMetaDataforAANT_jobOptions.py diff --git a/Event/EventInfo/CMakeLists.txt b/Event/EventInfo/CMakeLists.txt index 881f64f14bd..41f0b455454 100644 --- a/Event/EventInfo/CMakeLists.txt +++ b/Event/EventInfo/CMakeLists.txt @@ -60,13 +60,3 @@ atlas_add_test( TagInfo_test ) set_target_properties( EventInfo_TagInfo_test PROPERTIES ENABLE_EXPORTS True ) - - -# Install files from the package: -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 ) - diff --git a/Event/EventInfo/python/EventInfoParams.py b/Event/EventInfo/python/EventInfoParams.py deleted file mode 100755 index 14fd5dec324..00000000000 --- a/Event/EventInfo/python/EventInfoParams.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - -from __future__ import print_function - -# -# Params for EventInfo classes -# -# Set values for EventType bits -# To use one accesses each bit value as: -# -# EventInfoParams.EventType.is_simulation_bit() -# EventInfoParams.EventType.is_testbeam_bit() -# EventInfoParams.EventType.is_calibration_bit() -# -# for example: -# bit = EventInfoParams.EventType.is_calibration_bit() -# - -class EventInfoParams: - - # EventType - class EventType: - - is_simulation = 0 - is_testbeam = 1 - is_calibration = 2 - - def Print (cls): - for attr in dir(cls)[:]: - print (attr) - - def is_simulation_bit (self): - return self.is_simulation - - def is_testbeam_bit (self): - return self.is_testbeam - - def is_calibration_bit (self): - return self.is_calibration - - # Define class methods to allow use of - # EventInfoParams.EventType.is_simulation_bit() - is_simulation_bit = classmethod(is_simulation_bit) - is_testbeam_bit = classmethod(is_testbeam_bit) - is_calibration_bit = classmethod(is_calibration_bit) - - diff --git a/Event/EventInfo/python/__init__.py b/Event/EventInfo/python/__init__.py deleted file mode 100755 index f437da74a28..00000000000 --- a/Event/EventInfo/python/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - -# File: EventInfo/python/__init__.py -# Author: RD Schaffer (R.D.Schaffer@cern.ch) - -__version__ = '0.2.9' -__author__ = 'RD Schaffer (R.D.Schaffer@cern.ch)' - -__all__ = [ 'EventInfoParams' ] diff --git a/Event/EventInfo/share/EventInfo_joboptions.py b/Event/EventInfo/share/EventInfo_joboptions.py deleted file mode 100755 index f4274752037..00000000000 --- a/Event/EventInfo/share/EventInfo_joboptions.py +++ /dev/null @@ -1,14 +0,0 @@ -# -# Access parameters for EventInfo classes -# -# See EventInfoParams.py for details -# - -include.block ( "EventInfo/EventInfo_joboptions.py" ) - -from EventInfo.EventInfoParams import EventInfoParams - -# test values: -#print EventInfoParams.EventType.is_simulation_bit() -#print EventInfoParams.EventType.is_testbeam_bit() -#print EventInfoParams.EventType.is_calibration_bit() diff --git a/LumiBlock/LumiBlockComps/share/CreateLumiBlocks_jobOptions.py b/LumiBlock/LumiBlockComps/share/CreateLumiBlocks_jobOptions.py deleted file mode 100644 index 5c9b5b48e86..00000000000 --- a/LumiBlock/LumiBlockComps/share/CreateLumiBlocks_jobOptions.py +++ /dev/null @@ -1,14 +0,0 @@ -#-------------------------------------------------------------- -# job options fragment to bootstrap metadata -#-------------------------------------------------------------- - -#include ( "EventInfo/EventInfoDict_joboptions.py" ) -include ( "EventInfo/EventInfo_joboptions.py" ) -include ( "LumiBlockAthenaPool/LumiBlockAthenaPool_joboptions.py") - -#To run the luminosity block from event info 'bootstrap' algo -theApp.Dlls += [ "LumiBlockComps" ] -theApp.TopAlg += [ "CreateLumiBlockCollectionFromFile" ] -CreateLumiBlockCollectionFromFile = Algorithm( "CreateLumiBlockCollectionFromFile"); - - diff --git a/LumiBlock/LumiBlockComps/share/MakeMetaDataforAANT_jobOptions.py b/LumiBlock/LumiBlockComps/share/MakeMetaDataforAANT_jobOptions.py deleted file mode 100644 index 7e1a718cf5f..00000000000 --- a/LumiBlock/LumiBlockComps/share/MakeMetaDataforAANT_jobOptions.py +++ /dev/null @@ -1,67 +0,0 @@ -# Basic setup for Athena job -from AthenaCommon.AppMgr import ServiceMgr -from AthenaCommon.AppMgr import ToolSvc -import AthenaPoolCnvSvc.ReadAthenaPool -from AthenaCommon.AlgSequence import AlgSequence - - -# the POOL converters -include( "ParticleBuilderOptions/ESD_PoolCnv_jobOptions.py" ) -include( "ParticleBuilderOptions/AOD_PoolCnv_jobOptions.py") -include( "ParticleBuilderOptions/McAOD_PoolCnv_jobOptions.py") -include( "EventAthenaPool/EventAthenaPool_joboptions.py" ) - -# the Top Algorithm Sequence -topSequence = AlgSequence() - -### -# Modify the following to run over exactly the AOD files being used in your analysis -### -ServiceMgr.EventSelector.InputCollections = ["/afs/atlass01.physik.uni-bonn.de/data/share/top/topmix/AOD/user.RichardHawkings.0108173.topmix_Egamma.AOD.v2/user.RichardHawkings.0108173.topmix_Egamma.AOD.v2._00139.pool.root"] - - -# Number of Events to process -if not "EvtMax" in dir(): EvtMax=-1 -theApp.EvtMax = EvtMax - -# Number of Events to skip -if not "SkipEvents" in dir(): SkipEvents=0 -ServiceMgr.EventSelector.SkipEvents = SkipEvents - -from LumiBlockComps.LumiBlockCompsConf import CreateAANTFromLumiBlockCollection -CreateAANTFromLB = CreateAANTFromLumiBlockCollection("CreateAANTFromLB") -topSequence += CreateAANTFromLB - -###################### Output Ntuple files -# User CBNTMaker Tool to create TTree -from GaudiSvc.GaudiSvcConf import THistSvc -from AnalysisTools.AnalysisToolsConf import AANTupleStream - -# create instance of THistSvc -ServiceMgr += THistSvc() - -# ntuples: AANT (Athena Aware NTuples) -ntupleFile = "testlumi.root" -ServiceMgr.THistSvc.Output += [ "AANT DATAFILE='%s' OPT='RECREATE'" % ntupleFile ] - -# also add default CollectionTree -AANTupleStream = AANTupleStream() -AANTupleStream.ExtraRefNames = [ "StreamESD","StreamRDO" ] -AANTupleStream.OutputName = ntupleFile -AANTupleStream.WriteInputDataHeader = True -AANTupleStream.OutputLevel = WARNING -topSequence += AANTupleStream - -# Root Ntuple output file and name -theApp.Dlls += [ "RootHistCnv" ] -theApp.HistogramPersistency = "ROOT" - -# Dump list of containers on StoreGate to output log -StoreGateSvc = Service( "StoreGateSvc" ) -StoreGateSvc.Dump = FALSE - -# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL ) -MessageSvc.OutputLevel = INFO - -# Print the job schedule/sequence on output -print topSequence -- GitLab