CMS 3D CMS Logo

ELdestControl.h

Go to the documentation of this file.
00001 #ifndef FWCore_MessageService_ELdestControl_h
00002 #define FWCore_MessageService_ELdestControl_h
00003 
00004 
00005 // ----------------------------------------------------------------------
00006 //
00007 // ELdestControl  is a handle class whose purpose is to dispatch orders
00008 //                from the framework to an ELdestination, without
00009 //                allowing the framework to destruct that instance of the
00010 //                destination (which would be a disasterous way to foul up).
00011 //                The ELadministrator creates an ELdestControl handle
00012 //                to its own copy whenever an ELdestination is attached.
00013 //
00014 // 7/5/98  mf   Created file.
00015 // 6/16/99 jvr  Allows suppress/include options on destinations
00016 // 7/2/99  jvr  Added separate/attachTime, Epilogue, and Serial options
00017 // 6/7/00  web  Reflect consolidation of ELdestination/X; add
00018 //              filterModule()
00019 // 10/04/00 mf  add excludeModule()
00020 // 01/15/00 mf  mods to give user control of line length
00021 // 03/13/01 mf  mod to give user control of hex trigger and 
00022 //              statisticsMap() method
00023 // 04/04/01 mf  add ignoreMOdule and respondToModule
00024 // 10/17/01 mf  add setTableLimit which had been omitted
00025 // 10/18/01 mf  Corrected default in summary title =0 to empty string
00026 //  6/23/03 mf  changeFile() and flush() 
00027 //  6/19/08 mf  summaryForJobReport()
00028 //
00029 // ----------------------------------------------------------------------
00030 
00031 
00032 #include "FWCore/MessageLogger/interface/ELstring.h"
00033 #include "FWCore/MessageLogger/interface/ELmap.h"
00034 #include "FWCore/MessageLogger/interface/ELseverityLevel.h"
00035 #include "FWCore/MessageLogger/interface/ErrorObj.h"
00036 
00037 
00038 namespace edm {       
00039 namespace service {       
00040 
00041 // ----------------------------------------------------------------------
00042 // prerequisite classes:
00043 // ----------------------------------------------------------------------
00044 
00045 class ELdestination;
00046 
00047 // ----------------------------------------------------------------------
00048 // ELdestControl:
00049 // ----------------------------------------------------------------------
00050 
00051 class ELdestControl  {
00052 
00053 public:
00054   ELdestControl( ELdestination * dest );
00055   ELdestControl();
00056   virtual ~ELdestControl();
00057 
00058   // -----  Behavior control methods invoked by the framework:
00059   //
00060   virtual ELdestControl & setThreshold( const ELseverityLevel & sv );
00061   virtual ELdestControl & setTraceThreshold( const ELseverityLevel & sv );
00062   virtual ELdestControl & setLimit( const ELstring & s, int n );
00063   virtual ELdestControl & setLimit( const ELseverityLevel & sv, int n );
00064   virtual ELdestControl & setInterval( const ELstring & s, int interval );
00065   virtual ELdestControl & setInterval( const ELseverityLevel& sv, int interval);
00066   virtual ELdestControl & setTimespan( const ELstring& s, int n );
00067   virtual ELdestControl & setTimespan( const ELseverityLevel & sv, int n );
00068 
00069   virtual ELdestControl & setTableLimit( int n );
00070 
00071   // -----  Select output format options:
00072   //
00073   virtual void suppressText();           virtual void includeText();  // $$ jvr
00074   virtual void suppressModule();         virtual void includeModule();
00075   virtual void suppressSubroutine();     virtual void includeSubroutine();
00076   virtual void suppressTime();           virtual void includeTime();
00077   virtual void suppressContext();        virtual void includeContext();
00078   virtual void suppressSerial();         virtual void includeSerial();
00079   virtual void useFullContext();         virtual void useContext();
00080   virtual void separateTime();           virtual void attachTime();
00081   virtual void separateEpilogue();       virtual void attachEpilogue();
00082   virtual void noTerminationSummary();
00083   virtual int  setLineLength(int len);   virtual int  getLineLength() const;
00084 
00085   virtual void filterModule    ( ELstring const & moduleName );
00086   virtual void excludeModule   ( ELstring const & moduleName );
00087   virtual void respondToModule ( ELstring const & moduleName );
00088   virtual void ignoreModule    ( ELstring const & moduleName );
00089 
00090   virtual ELdestControl & clearSummary();
00091   virtual ELdestControl & wipe();
00092   virtual ELdestControl & zero();
00093 
00094   virtual ELdestControl & setPreamble( const ELstring & preamble );
00095   virtual ELdestControl & setNewline( const ELstring & newline );
00096 
00097   // -----  Active methods invoked by the framework:
00098   //
00099   virtual void summary( ELdestControl & dest, char * title="" );
00100   virtual void summary( std::ostream  & os  , char * title="" );
00101   virtual void summary( ELstring      & s   , char * title="" );
00102   virtual void summary( );
00103   virtual void summaryForJobReport( std::map<std::string, double> & sm);
00104 
00105   virtual std::map<ELextendedID , StatsCount> statisticsMap() const;
00106 
00107   virtual bool log( edm::ErrorObj & msg );  // Backdoor to log a formed message
00108                                             // to only this destination.
00109                                        
00110   virtual void changeFile (std::ostream & os);
00111   virtual void changeFile (const ELstring & filename);
00112   virtual void flush();                                        
00113   
00114   // -----  Helper methods invoked by other ErrorLogger classes
00115 
00116   virtual void summarization( const ELstring & title
00117                             , const ELstring & sumLines
00118                             );
00119 
00120   ELstring getNewline() const;
00121 
00122   // -----  Data implementing the trivial handle pattern:
00123   //
00124 protected:
00125   ELdestination   * d;
00126 
00127 };  // ELdestControl
00128 
00129 
00130 // ----------------------------------------------------------------------
00131 
00132 
00133 }        // end of namespace service
00134 }        // end of namespace edm
00135 
00136 
00137 #endif // FWCore_MessageService_ELdestControl_h

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