diff --git a/Tools/PyUtils/python/MetaReaderPeeker.py b/Tools/PyUtils/python/MetaReaderPeeker.py index fc78df8b49594973a8024cfa56cae4a00df2db90..3569ecfd1cd772c926a64134059a1af25d629975 100644 --- a/Tools/PyUtils/python/MetaReaderPeeker.py +++ b/Tools/PyUtils/python/MetaReaderPeeker.py @@ -9,7 +9,7 @@ metadata_all_files = {} def _setup(): - + from PyUtils.MetaReader import read_metadata from AthenaCommon.Logging import logging @@ -18,12 +18,9 @@ def _setup(): global metadata global metadata_all_files - # get input file name - from RecExConfig.RecoFunctions import InputFileNames - inFiles = InputFileNames() from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - if athenaCommonFlags.isOnline() and not inFiles: + if athenaCommonFlags.isOnline(): # set minimal items of inputFileSummary metadata = { 'file_type':'BS', @@ -31,6 +28,11 @@ def _setup(): 'TagStreamsRef':'' } else: + + # get input file name + from RecExConfig.RecoFunctions import InputFileNames + inFiles = InputFileNames() + if len(inFiles) < 1: msg.warning("No input files specified yet! Cannot do anything.") return diff --git a/Tools/PyUtils/python/MetaReaderPeekerFull.py b/Tools/PyUtils/python/MetaReaderPeekerFull.py index 17aefd5c452cd84a983edf7631bcc38a26368ab3..b6e6595eca72a654d38f2c6508d0dc57626cbccd 100644 --- a/Tools/PyUtils/python/MetaReaderPeekerFull.py +++ b/Tools/PyUtils/python/MetaReaderPeekerFull.py @@ -17,13 +17,9 @@ def _setup(): global metadata global metadata_all_files - - # get input file name - from RecExConfig.RecoFunctions import InputFileNames - inFiles = InputFileNames() from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - if athenaCommonFlags.isOnline() and not inFiles: + if athenaCommonFlags.isOnline(): # set minimal items of inputFileSummary metadata = { 'file_type':'BS', @@ -31,6 +27,11 @@ def _setup(): 'TagStreamsRef':'' } else: + + # get input file name + from RecExConfig.RecoFunctions import InputFileNames + inFiles = InputFileNames() + if len(inFiles) < 1: msg.warning("No input files specified yet! Cannot do anything.") return