Skip to content

Commit

Permalink
Re #9264. Generalized log message for chunking.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Apr 3, 2014
1 parent 0b1be84 commit 435f20c
Showing 1 changed file with 8 additions and 4 deletions.
Expand Up @@ -492,6 +492,13 @@ def _getStrategy(self, runnumber, extension):

return strategy

def __logChunkInfo(self, chunk):
keys = chunk.keys()
keys.sort()

keys = [ str(key) + "=" + str(chunk[key]) for key in keys ]
self.log().information("Working on chunk [" + ", ".join(keys) + "]")

def _focusChunks(self, runnumber, extension, filterWall, calib, splitwksp=None, preserveEvents=True):
""" Load, (optional) split and focus data in chunks
Expand Down Expand Up @@ -545,10 +552,7 @@ def _focusChunks(self, runnumber, extension, filterWall, calib, splitwksp=None,
ichunk += 1

# Log information
if "ChunkNumber" in chunk:
self.log().information("Working on chunk %d of %d" % (chunk["ChunkNumber"], chunk["TotalChunks"]))
elif "SpectrumMin" in chunk:
self.log().information("Working on spectrums %d through %d" % (chunk["SpectrumMin"], chunk["SpectrumMax"]))
self.__logChunkInfo(chunk)

# Load chunk
temp = self._loadData(runnumber, extension, filterWall, **chunk)
Expand Down

0 comments on commit 435f20c

Please sign in to comment.