jet hypo: remove raw print statements from production code.
uncontrolled print statements were producing unwanted output when run in production. However, the agility and precision of such stastements are extemely useful while developing code.
Printing is now done via DebugPrinter. This has a boolean flag to control whether the printing is done. This is the same flage that produicess the chain diagnostic information from the C++ code.
Merge request reports
Activity
assigned to @peter
This merge request affects 1 package:
- Trigger/TrigHypothesis/TrigHLTJetHypo
This merge request affects 9 files:
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/DebugPrinter.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/cdTest.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetHypoChainLabelFromScenario.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/treeVisitors.py
added JetEtmiss Trigger master review-pending-level-1 labels
- Resolved by Frank Winklmeier
Instead of inventing your own logger class, can I suggest you do the following instead:
In one of your modules you define a dedicated logger:
from AthenaCommon.Logging import logging debug_logger = logging.getLogger('TrigHLTJetHypo_debug') if debug: from AthenaCommon.Constants import DEBUG debug_logger.setLevel(DEBUG)
When you need to print something to this
debug_logger
you import it from the above module. Since you set the output level explicitly it will print even if the rest of the athena job is on INFO level.
unassigned @peter
assigned to @peter
unassigned @peter
- Resolved by Frank Winklmeier
hi Frank
What I need is a easy to use developement way to output information I need for development. This does not concern production. Routing from to the logger system loses this directness.
Furthermore, I have had the rug pulled out from under me in the past when, in the past when logging information has been suppressed. You may remember our discussions on this, plus a vague promise that some improvement may be expected in the future. Furthermore, the formatting, the single line limits and the suppression of logging information means that development is severely impaired.
Most of the development in TrigHLTJetHypo concerns only this package. The development effort is intense. Any attempt to interfere with the flow of information during the development process will have a negative effect on the process.
Of course, The package is only one of many, and there must be cooperation when the packages are used together. That is not in question.
The current changes allow for both.
- Resolved by Frank Winklmeier
If you are talking about the assignment, it has been always like this (AFAIK, I think it has no purpose at all in the athena repository but even if it would have any functionality, the assignment is meant for someone that can/should review the MR and potentially merge it which is not your case.)
assigned to @peter
CI Result FAILURE (hash df50ac60)Athena AthSimulation AthGeneration AnalysisBase AthAnalysis externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
AthAnalysis: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 27656]removed review-pending-level-1 label
added 6 commits
-
df50ac60...8f938241 - 4 commits from branch
atlas:master
- 970d5b32 - Merge remote-tracking branch 'upstream/master' into master-22736-0
- 2aec39b8 - jet_hypo config - use logging module
-
df50ac60...8f938241 - 4 commits from branch
added 123 commits
-
2aec39b8...cdf029cb - 121 commits from branch
atlas:master
- 10f30f3f - Merge remote-tracking branch 'upstream/master' into master-22736-0
- 678bc4b3 - Merge remote-tracking branch 'upstream/master' into master-22736-0
-
2aec39b8...cdf029cb - 121 commits from branch
This merge request affects 1 package:
- Trigger/TrigHypothesis/TrigHLTJetHypo
This merge request affects 7 files:
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/ChainLabelParser.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/ConditionsToolSetterFastReduction.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/TrigJetHypoToolConfig.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/cdTest.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/chainDict2jetLabel.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/jetHypoChainLabelFromScenario.py
- Trigger/TrigHypothesis/TrigHLTJetHypo/python/testChainDictMaker.py
added review-pending-level-1 label