CMS 3D CMS Logo

GeneralVerbosity.h

Go to the documentation of this file.
00001 #ifndef UTILITIES_GENERAL_GENERALVERBOSITY_H
00002 #define UTILITIES_GENERAL_GENERALVERBOSITY_H
00003 #include "Utilities/General/interface/envUtil.h"
00004 #include <ostream>
00005 
00008 template<typename Tag>
00009 class EnvVerbosity {
00010 public:
00011 
00012   static bool on() { 
00013     return me();
00014   }
00015 
00016   static bool silent() { 
00017     return silence();
00018   }
00019 
00020   static void switchOn() { me()=true; silence()=false;}
00021   static void switchOff() { me()=false;}
00022   static void quiet() { silence()=true; me()=false;}
00023 
00024 private:
00025   EnvVerbosity(){}
00026 
00027 private:
00028   static envSwitch & me();
00029   static envSwitch & silence();
00030 };
00031 
00032 namespace GeneralUtilities {
00033 
00034   struct Tag{};
00035 
00036   extern std::ostream cout;
00037 }
00038 
00039 typedef EnvVerbosity<GeneralUtilities::Tag> GeneralVerbosity ;
00040 
00041 #endif // UTILITIES_GENERAL_GENERALVERBOSITY_H

Generated on Tue Jun 9 17:48:45 2009 for CMSSW by  doxygen 1.5.4