nuisance is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#8 closed enhancement (fixed)

GENIE is too noisy

Reported by: cwilkinson Owned by: somebody
Priority: trivial Milestone: v1r0
Component: component1 Version: 1.0
Keywords: Cc:

Description

Can we suppress GENIE messages when reweighting? It prints reams of unnecessary information. I guess all generators could cause a similar issue, but GENIE seems to be the main culprit.

Change History (4)

comment:1 Changed 7 years ago by Patrick Stowell

GENIE is too noisy! Those kids keep going on my damn lawn again!

comment:2 Changed 7 years ago by lp208

We can probably redirect the standard out file descriptor before (and return after) calls to GENIE libs so that output is suppressed. Something like:

  static std::streambuf CacheBuff* = NULL;
  void ShhGENIE() {
    CacheBuff = std::cout.rdbuf(); // save original sbuf
    std::ofstream   fout("/dev/null");
    std::cout.rdbuf(fout.rdbuf()); // redirect 'cout' to a 'fout'
  }
  void YouCanSpeakNowGENIE(){ std::cout.rdbug(CacheBuff); }

comment:3 Changed 7 years ago by cwilkinson

Milestone: milestone1
Resolution: fixed
Status: newclosed

Normal std::cout and std::cerr behaviour can be stopped and restored with:
StopTalking?()
StartTalking?()

comment:4 Changed 7 years ago by Clarence Wret

Milestone: milestone1v1r0

Milestone renamed

Note: See TracTickets for help on using tickets.