From 3be04d9f39d1c4a955be7ef18231f0ad64ad6577 Mon Sep 17 00:00:00 2001
From: Rafal Bielski <rafal.bielski@cern.ch>
Date: Tue, 4 Aug 2020 03:26:31 +0200
Subject: [PATCH] TriggerMenuMT+TriggerJobOpts+TrigHLTJetHypo: Move some
 messages from INFO to DEBUG

---
 .../python/TrigJetHypoToolConfig.py           |  4 ++--
 .../TriggerJobOpts/python/TriggerConfig.py    | 12 +++++-----
 .../HLTMenuConfig/Menu/ChainDictTools.py      |  2 +-
 .../python/HLTMenuConfig/Menu/ChainMerging.py | 22 +++++++++----------
 .../python/HLTMenuConfig/Menu/HLTCFConfig.py  |  2 +-
 .../HLTMenuConfig/Menu/MenuComponents.py      | 10 ++++-----
 6 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
index 0a88e3db38c..53f9ec62020 100644
--- a/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
+++ b/Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
@@ -82,7 +82,7 @@ def  trigJetHypoToolHelperFromDict(chain_dict):
     A Helper Tool returned by this function may be the root of a Helper
     Tool tree structure."""
 
-    log.info('trigJetHypoToolFromDictc chainDict %s', str(chain_dict))
+    log.debug('trigJetHypoToolFromDictc chainDict %s', str(chain_dict))
 
     try:
         chain_label = chainDict2jetLabel(chain_dict)
@@ -113,7 +113,7 @@ def  trigJetHypoToolHelperFromDict(chain_dict):
 def  trigJetHypoToolFromDict(chain_dict):
     """Produce  a jet trigger hypo tool from a chainDict"""
 
-    log.info('trigJetHypoToolFromDict chainDict %s', str(chain_dict))
+    log.debug('trigJetHypoToolFromDict chainDict %s', str(chain_dict))
 
     chain_name = chain_dict['chainName']
     tool = CompFactory.TrigJetHypoToolMT(name=chain_name)
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
index 1506f9a602c..57d15e63bde 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
@@ -27,10 +27,10 @@ def collectHypos( steps ):
             continue
         
         if "filter" in stepSeq.getName():
-            __log.info("Skipping filtering steps " +stepSeq.getName() )
+            __log.debug("Skipping filtering steps " +stepSeq.getName() )
             continue
 
-        __log.info( "collecting hypos from step " + stepSeq.getName() )
+        __log.debug( "collecting hypos from step " + stepSeq.getName() )
 #        start = {}
         for seq,algs in six.iteritems (flatAlgorithmSequences( stepSeq )):
             for alg in algs:
@@ -38,9 +38,9 @@ def collectHypos( steps ):
                     continue
                 # will replace by function once dependencies are sorted
                 if hasProp( alg, 'HypoInputDecisions'):
-                    __log.info( "found hypo " + alg.getName() + " in " +stepSeq.getName() )
+                    __log.debug( "found hypo " + alg.getName() + " in " +stepSeq.getName() )
                     if __isCombo( alg ) and len(alg.ComboHypoTools):
-                        __log.info( "    with %d comboHypoTools: %s", len(alg.ComboHypoTools), ' '.join(map(str, [tool.getName() for  tool in alg.ComboHypoTools])))
+                        __log.debug( "    with %d comboHypoTools: %s", len(alg.ComboHypoTools), ' '.join(map(str, [tool.getName() for  tool in alg.ComboHypoTools])))
                     hypos[stepSeq.getName()].append( alg )
                 else:
                     __log.verbose("Not a hypo" + alg.getName())
@@ -93,7 +93,7 @@ def collectFilters( steps ):
     for stepSeq in getSequenceChildren( steps ):
         if "filter" in stepSeq.getName():
             filters[stepSeq.getName()] = getSequenceChildren( stepSeq )
-            __log.info("Found Filters in Step {} : {}".format(stepSeq.getName(), getSequenceChildren( stepSeq )))
+            __log.debug("Found Filters in Step {} : {}".format(stepSeq.getName(), getSequenceChildren( stepSeq )))
 
     return filters
 
@@ -187,7 +187,7 @@ def triggerSummaryCfg(flags, hypos):
     else:
         for chainName, chainDict in six.iteritems (TriggerConfigHLT.dicts()):
             if chainName not in allChains:
-                __log.warn("The chain %s is not mentioned in any step", chainName)
+                __log.debug("The chain %s is not mentioned in any step", chainName)
                 # TODO once sequences available in the menu we need to crosscheck it here
                 assert len(chainDict['chainParts'])  == 1, "Chains w/o the steps can not have mutiple parts in chainDict, it makes no sense: %s"%chainName
                 allChains[chainName] = mapThresholdToL1DecisionCollection( chainDict['chainParts'][0]['L1threshold'] )
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
index 3dd2db85335..e2752a8dcdf 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainDictTools.py
@@ -70,7 +70,7 @@ def splitInterSignatureChainDict(chainDict):
     if "mergingOrder" not in chainDict:
         log.debug("No merging order given for chain %s.", chainDict['chainName'])
     elif chainDict["mergingOrder"] == []:
-        log.info("No merging order given for chain %s.", chainDict['chainName'])
+        log.debug("No merging order given for chain %s.", chainDict['chainName'])
     else:
         for chainPartName in chainDict["mergingOrder"]:
             for splitChainDict in listOfSplitChainDicts:                
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
index 6d9439df8f1..5664e5881d4 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/ChainMerging.py
@@ -63,9 +63,9 @@ def mergeParallel(chainDefList, offset):
                                   
     combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds)
 
-    log.info("Parallel merged chain %s with these steps:", chainName)
+    log.debug("Parallel merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
-        log.info('\n   %s', step)
+        log.debug('\n   %s', step)
 
     return combinedChainDef
 
@@ -87,13 +87,13 @@ def serial_zip(allSteps, chainName):
     newsteps = []
     for chain_index, chainsteps in enumerate(allSteps):
         for step_index, step in enumerate(chainsteps):
-            log.info('chain_index: ' + str(chain_index) + " step_index: " + str(step_index))
+            log.debug('chain_index: ' + str(chain_index) + " step_index: " + str(step_index))
             # create list of correct length
             stepList = [None]*n_chains
             
             # put the step from the current sub-chain into the right place
             stepList[chain_index] = step
-            log.info('Put step: ' + str(step.name))
+            log.debug('Put step: ' + str(step.name))
 
             # all other steps should contain an empty sequence
             for step_index2, emptyStep in enumerate(stepList):
@@ -114,8 +114,8 @@ def mergeSerial(chainDefList):
     chainName = ''
     l1Thresholds = []
 
-    log.info('Merge chainDefList:')
-    log.info(chainDefList)
+    log.debug('Merge chainDefList:')
+    log.debug(chainDefList)
 
     for cConfig in chainDefList:
         if chainName == '':
@@ -144,9 +144,9 @@ def mergeSerial(chainDefList):
                                   
     combinedChainDef = Chain(chainName, ChainSteps=combChainSteps, L1Thresholds=l1Thresholds)
 
-    log.info("Serial merged chain %s with these steps:", chainName)
+    log.debug("Serial merged chain %s with these steps:", chainName)
     for step in combinedChainDef.steps:
-        log.info('   %s', step)
+        log.debug('   %s', step)
 
     return combinedChainDef
 
@@ -169,7 +169,7 @@ def makeCombinedStep(steps, stepNumber, chainDefList):
             # this happens for merging chains with different numbers of steps, we need to "pad" out with empty sequences to propogate the decisions
             currentStepName = "Step" + str(stepNumber) + "_Empty" + str(chain_index)
             seqName = getEmptySeqName(currentStepName, chain_index, stepNumber)
-            log.info("  step %s,  empty sequence %s", currentStepName, seqName)
+            log.debug("  step %s,  empty sequence %s", currentStepName, seqName)
             emptySeq = RecoFragmentsPool.retrieve(getEmptyMenuSequence, flags=None, name=seqName)
 
 
@@ -179,9 +179,9 @@ def makeCombinedStep(steps, stepNumber, chainDefList):
             stepDicts.append(deepcopy(chainDefList[chain_index].steps[-1].chainDicts[-1]))
         else:
             # Standard step, append it to the combined step
-            log.info("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
+            log.debug("  step %s, multiplicity  = %s", step.name, str(step.multiplicity))
             if len(step.sequences):
-                log.info("      with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
+                log.debug("      with sequences = %s", ' '.join(map(str, [seq.name for seq in step.sequences])))
 
             # this function only works if the input chains are single-object chains (one menu seuqnce)
             if len(step.sequences) > 1:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
index 1d39d07b34b..8374df12dd5 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
@@ -330,7 +330,7 @@ def createDataFlow(chains, allDicts):
 
     # loop over chains
     for chain in chains:
-        log.info("\n Configuring chain %s with %d steps: \n   - %s ", chain.name,len(chain.steps),'\n   - '.join(map(str, [{step.name:step.multiplicity} for step in chain.steps])))
+        log.debug("\n Configuring chain %s with %d steps: \n   - %s ", chain.name,len(chain.steps),'\n   - '.join(map(str, [{step.name:step.multiplicity} for step in chain.steps])))
 
         lastCFseq = None
         for nstep, chainStep in enumerate( chain.steps ):
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index 4d477e93dda..de4c92295ad 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -766,18 +766,18 @@ class Chain(object):
 
             if len(step.chainDicts) > 0:
                 # new way to configure hypo tools, works if the chain dictionaries have been attached to the steps
-                log.info('%s in new hypo tool creation method, step mult= %d, isCombo=%d', self.name, sum(step.multiplicity), step.isCombo)
-                log.info("N(seq)=%d, N(chainDicts)=%d", len(step.sequences), len(step.chainDicts))
+                log.debug('%s in new hypo tool creation method, step mult= %d, isCombo=%d', self.name, sum(step.multiplicity), step.isCombo)
+                log.debug("N(seq)=%d, N(chainDicts)=%d", len(step.sequences), len(step.chainDicts))
                 assert len(step.sequences)==len(step.chainDicts), "createHypoTools only makes sense if number of sequences == number of chain dicts"
                 for seq, onePartChainDict in zip(step.sequences, step.chainDicts):
-                    log.info('    seq: %s, onePartChainDict:', seq.name)
-                    log.info('    ' + str(onePartChainDict))
+                    log.debug('    seq: %s, onePartChainDict:', seq.name)
+                    log.debug('    ' + str(onePartChainDict))
                     seq.createHypoTools( onePartChainDict )              
 
             else:
                 # legacy way, to be removed once all signatures pass the chainDicts to the steps
                 step_mult = [str(m) for m in step.multiplicity]
-                log.info('%s in old hypo tool creation method', self.name)
+                log.debug('%s in old hypo tool creation method', self.name)
                 menu_mult = [ part['chainParts'][0]['multiplicity'] for part in listOfChainDictsLegs ]
                 if step_mult != menu_mult:
                     # Probably this shouldn't happen, but it currently does
-- 
GitLab