Skip to content
Snippets Groups Projects

jet hypo: remove raw print statements from production code.

Merged Peter Sherwood requested to merge peter/athena:master-22736-0 into master

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.

ATR-22736

@fwinkl @jbossios @valentem @peter

Edited by Peter Sherwood

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 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
    • 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

    • Author Developer
      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.

  • Author Developer

    Jona, please stop fooling with the assignee

  • You shouldn't be assigning any MR to you, as I mentioned already privately.

  • Author Developer

    Sounds like we want to slow down the rate of development by some large factor

    • 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.)

  • Author Developer

    OK Jona, fine.

    Someone else will take care of hypo issues at some point I suppose...

  • assigned to @peter

  • :negative_squared_cross_mark: CI Result FAILURE (hash df50ac60)

    Athena AthSimulation AthGeneration AnalysisBase AthAnalysis
    externals :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    cmake :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    make :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    required tests :o: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
    optional tests :cloud: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:

    Full details available on this CI monitor view
    :white_check_mark: Athena: number of compilation errors 0, warnings 0
    :white_check_mark: AthSimulation: number of compilation errors 0, warnings 0
    :white_check_mark: AthGeneration: number of compilation errors 0, warnings 0
    :white_check_mark: AnalysisBase: number of compilation errors 0, warnings 0
    :white_check_mark: AthAnalysis: number of compilation errors 0, warnings 0
    :pencil: For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 27656]

  • Peter Sherwood added 6 commits

    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

    Compare with previous version

  • Peter Sherwood added 123 commits

    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

    Compare with previous version

  • 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
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading