From 71ee1b7b3a8fccab71f3dfb8881c0e1c86c8b55d Mon Sep 17 00:00:00 2001 From: lintao <lintao51@gmail.com> Date: Wed, 21 Dec 2022 21:50:04 +0800 Subject: [PATCH] WIP: mute the info in simulation. --- Generator/src/GenPrinter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Generator/src/GenPrinter.cpp b/Generator/src/GenPrinter.cpp index 4840bee1..359f26de 100644 --- a/Generator/src/GenPrinter.cpp +++ b/Generator/src/GenPrinter.cpp @@ -4,6 +4,13 @@ DECLARE_COMPONENT(GenPrinter) bool GenPrinter::mutate(MyHepMC::GenEvent& event){ + auto msglevel = msgLevel(); + + // only print when current msglevel is MSG::DEBUG/VERBOSE + if (msglevel != MSG::NIL && msglevel != MSG::VERBOSE && msglevel != MSG::DEBUG) { + return true; + } + std::cout << "print mc info for event "<< event.getID() << ", mc size ="<< event.m_mc_vec.size() << std::endl; for ( int i =0; i < event.m_mc_vec.size(); i++ ) { auto p = event.m_mc_vec.at(i); -- GitLab