Public Member Functions | Protected Attributes | List of all members
ana::IFDHSilent Class Reference

ifdh calls between construction and destruction produce no output More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-01/CAFAna/Core/Utilities.h"

Public Member Functions

 IFDHSilent ()
 
 ~IFDHSilent ()
 

Protected Attributes

bool fSet
 

Detailed Description

ifdh calls between construction and destruction produce no output

Upon going out of scope, restores the previous setting

Definition at line 47 of file Utilities.h.

Constructor & Destructor Documentation

ana::IFDHSilent::IFDHSilent ( )

Definition at line 49 of file Utilities.cxx.

References om::cout, allTimeWatchdog::endl, cet::getenv(), and string.

50  {
51  const char* s = getenv("IFDH_SILENT");
52  fSet = (s && s == std::string("0"));
53  if(!fSet) setenv("IFDH_SILENT", "1", 1);
54  if(s) std::cout << "IFDH_SILENT=" << s << std::endl;
55  }
const XML_Char * s
Definition: expat.h:262
std::string getenv(std::string const &name)
OStream cout
Definition: OStream.cxx:6
enum BeamMode string
ana::IFDHSilent::~IFDHSilent ( )

Definition at line 58 of file Utilities.cxx.

59  {
60  if(!fSet) unsetenv("IFDH_SILENT");
61  }

Member Data Documentation

bool ana::IFDHSilent::fSet
protected

Definition at line 53 of file Utilities.h.


The documentation for this class was generated from the following files: