CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/MessageService/interface/ELoutput.h

Go to the documentation of this file.
00001 #ifndef FWCore_MessageService_ELoutput_h
00002 #define FWCore_MessageService_ELoutput_h
00003 
00004 
00005 // ----------------------------------------------------------------------
00006 //
00007 // ELoutput     is a subclass of ELdestination representing the standard
00008 //              provided destination.
00009 //
00010 // 7/8/98 mf    Created file.
00011 // 6/17/99 jvr  Made output format options available for ELdestControl only
00012 // 7/2/99 jvr   Added separate/attachTime, Epilogue, and Serial options
00013 // 2/22/00 mf   Changed myDetX to myOutputX (to avoid future puzzlement!)
00014 //              and added ELoutput(ox) to cacilitate inherited classes.
00015 // 6/7/00 web   Consolidated ELoutput/X; add filterModule()
00016 // 6/14/00 web  Declare classes before granting friendship; remove using
00017 // 10/4/00 mf   add excludeModule()
00018 //  4/4/01 mf   Removed moduleOfInterest and moduleToExclude, in favor
00019 //              of using base class method.
00020 //  6/23/03 mf  changeFile(), flush() 
00021 //  6/11/07 mf  changed default for emitAtStart to false  
00022 //
00023 // ----------------------------------------------------------------------
00024 
00025 #include "FWCore/MessageService/interface/ELdestination.h"
00026 
00027 #include "FWCore/MessageLogger/interface/ELstring.h"
00028 #include "FWCore/MessageLogger/interface/ELextendedID.h"
00029 
00030 #include "boost/shared_ptr.hpp"
00031 
00032 namespace edm {       
00033 
00034 
00035 // ----------------------------------------------------------------------
00036 // prerequisite classes:
00037 // ----------------------------------------------------------------------
00038 
00039 class ErrorObj;
00040 namespace service {       
00041 
00042 class ELdestControl;
00043 
00044 
00045 // ----------------------------------------------------------------------
00046 // ELoutput:
00047 // ----------------------------------------------------------------------
00048 
00049 class ELoutput : public ELdestination  {
00050 
00051   friend class ELdestControl;
00052 
00053 public:
00054 
00055   // ---  Birth/death:
00056   //
00057   ELoutput();
00058   ELoutput( std::ostream & os, bool emitAtStart = false );      // 6/11/07 mf
00059   ELoutput( const ELstring & fileName, bool emitAtStart = false );
00060   ELoutput( const ELoutput & orig );
00061   virtual ~ELoutput();
00062 
00063   // ---  Methods invoked by the ELadministrator:
00064   //
00065 public:
00066   virtual
00067   ELoutput *
00068   clone() const;
00069   // Used by attach() to put the destination on the ELadministrators list
00070                 //-| There is a note in Design Notes about semantics
00071                 //-| of copying a destination onto the list:  ofstream
00072                 //-| ownership is passed to the new copy.
00073 
00074   virtual bool log( const edm::ErrorObj & msg );
00075 
00076   // ---  Methods invoked through the ELdestControl handle:
00077   //
00078 protected:
00079     // trivial clearSummary(), wipe(), zero() from base class
00080     // trivial three summary(..) from base class
00081 
00082   // ---  Data affected by methods of specific ELdestControl handle:
00083   //
00084 protected:
00085     // ELoutput uses the generic ELdestControl handle
00086 
00087   // ---  Internal Methods -- Users should not invoke these:
00088   //
00089 protected:
00090   virtual void emitToken( const ELstring & s, bool nl=false );
00091 
00092   virtual void suppressTime();        virtual void includeTime();
00093   virtual void suppressModule();      virtual void includeModule();
00094   virtual void suppressSubroutine();  virtual void includeSubroutine();
00095   virtual void suppressText();        virtual void includeText();
00096   virtual void suppressContext();     virtual void includeContext();
00097   virtual void suppressSerial();      virtual void includeSerial();
00098   virtual void useFullContext();      virtual void useContext();
00099   virtual void separateTime();        virtual void attachTime();
00100   virtual void separateEpilogue();    virtual void attachEpilogue();
00101 
00102   virtual void summarization ( const ELstring & fullTitle
00103                              , const ELstring & sumLines );
00104                              
00105   virtual void changeFile (std::ostream & os);
00106   virtual void changeFile (const ELstring & filename);
00107   virtual void flush();                                        
00108 
00109 
00110 protected:
00111   // --- member data:
00112   //
00113   boost::shared_ptr<std::ostream> os;
00114   int                             charsOnLine;
00115   edm::ELextendedID               xid;
00116 
00117   bool wantTimestamp
00118   ,    wantModule
00119   ,    wantSubroutine
00120   ,    wantText
00121   ,    wantSomeContext
00122   ,    wantSerial
00123   ,    wantFullContext
00124   ,    wantTimeSeparate
00125   ,    wantEpilogueSeparate
00126   ,    preambleMode
00127   ;
00128 
00129   // --- Verboten method:
00130   //
00131   ELoutput & operator=( const ELoutput & orig );
00132 
00133 };  // ELoutput
00134 
00135 
00136 // ----------------------------------------------------------------------
00137 
00138 
00139 }        // end of namespace service
00140 }        // end of namespace edm
00141 
00142 
00143 #endif // FWCore_MessageService_ELoutput_h