CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELdestControl.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELdestControl_h
2 #define FWCore_MessageService_ELdestControl_h
3 
4 
5 // ----------------------------------------------------------------------
6 //
7 // ELdestControl is a handle class whose purpose is to dispatch orders
8 // from the framework to an ELdestination, without
9 // allowing the framework to destruct that instance of the
10 // destination (which would be a disasterous way to foul up).
11 // The ELadministrator creates an ELdestControl handle
12 // to its own copy whenever an ELdestination is attached.
13 //
14 // 7/5/98 mf Created file.
15 // 6/16/99 jvr Allows suppress/include options on destinations
16 // 7/2/99 jvr Added separate/attachTime, Epilogue, and Serial options
17 // 6/7/00 web Reflect consolidation of ELdestination/X; add
18 // filterModule()
19 // 10/04/00 mf add excludeModule()
20 // 01/15/00 mf mods to give user control of line length
21 // 03/13/01 mf mod to give user control of hex trigger and
22 // statisticsMap() method
23 // 04/04/01 mf add ignoreMOdule and respondToModule
24 // 10/17/01 mf add setTableLimit which had been omitted
25 // 10/18/01 mf Corrected default in summary title =0 to empty string
26 // 6/23/03 mf changeFile() and flush()
27 // 6/19/08 mf summaryForJobReport()
28 //
29 // ----------------------------------------------------------------------
30 
31 
36 
37 #include "boost/shared_ptr.hpp"
38 
39 
40 namespace edm {
41 namespace service {
42 
43 // ----------------------------------------------------------------------
44 // prerequisite classes:
45 // ----------------------------------------------------------------------
46 
47 class ELdestination;
48 
49 // ----------------------------------------------------------------------
50 // ELdestControl:
51 // ----------------------------------------------------------------------
52 
54 
55 public:
56  ELdestControl( boost::shared_ptr<ELdestination> dest );
57  ELdestControl();
58  virtual ~ELdestControl();
59 
60  // ----- Behavior control methods invoked by the framework:
61  //
62  virtual ELdestControl & setThreshold( const ELseverityLevel & sv );
63  virtual ELdestControl & setTraceThreshold( const ELseverityLevel & sv );
64  virtual ELdestControl & setLimit( const ELstring & s, int n );
65  virtual ELdestControl & setLimit( const ELseverityLevel & sv, int n );
66  virtual ELdestControl & setInterval( const ELstring & s, int interval );
67  virtual ELdestControl & setInterval( const ELseverityLevel& sv, int interval);
68  virtual ELdestControl & setTimespan( const ELstring& s, int n );
69  virtual ELdestControl & setTimespan( const ELseverityLevel & sv, int n );
70 
71  virtual ELdestControl & setTableLimit( int n );
72 
73  // ----- Select output format options:
74  //
75  virtual void suppressText(); virtual void includeText(); // $$ jvr
76  virtual void suppressModule(); virtual void includeModule();
77  virtual void suppressSubroutine(); virtual void includeSubroutine();
78  virtual void suppressTime(); virtual void includeTime();
79  virtual void suppressContext(); virtual void includeContext();
80  virtual void suppressSerial(); virtual void includeSerial();
81  virtual void useFullContext(); virtual void useContext();
82  virtual void separateTime(); virtual void attachTime();
83  virtual void separateEpilogue(); virtual void attachEpilogue();
84  virtual void noTerminationSummary();
85  virtual int setLineLength(int len); virtual int getLineLength() const;
86 
87  virtual void filterModule ( ELstring const & moduleName );
88  virtual void excludeModule ( ELstring const & moduleName );
89  virtual void respondToModule ( ELstring const & moduleName );
90  virtual void ignoreModule ( ELstring const & moduleName );
91 
92  virtual ELdestControl & clearSummary();
93  virtual ELdestControl & wipe();
94  virtual ELdestControl & zero();
95 
96  virtual ELdestControl & setPreamble( const ELstring & preamble );
97  virtual ELdestControl & setNewline( const ELstring & newline );
98 
99  // ----- Active methods invoked by the framework:
100  //
101  virtual void summary( ELdestControl & dest, char * title="" );
102  virtual void summary( std::ostream & os , char * title="" );
103  virtual void summary( ELstring & s , char * title="" );
104  virtual void summary( );
105  virtual void summaryForJobReport( std::map<std::string, double> & sm);
106 
107  virtual std::map<ELextendedID , StatsCount> statisticsMap() const;
108 
109  virtual bool log( edm::ErrorObj & msg ); // Backdoor to log a formed message
110  // to only this destination.
111 
112  virtual void changeFile (std::ostream & os);
113  virtual void changeFile (const ELstring & filename);
114  virtual void flush();
115 
116  // ----- Helper methods invoked by other ErrorLogger classes
117 
118  virtual void summarization( const ELstring & title
119  , const ELstring & sumLines
120  );
121 
122  ELstring getNewline() const;
123 
124  // ----- Data implementing the trivial handle pattern:
125  //
126 protected:
127  boost::shared_ptr<ELdestination> d;
128 
129 }; // ELdestControl
130 
131 
132 // ----------------------------------------------------------------------
133 
134 
135 } // end of namespace service
136 } // end of namespace edm
137 
138 
139 #endif // FWCore_MessageService_ELdestControl_h
boost::shared_ptr< ELdestination > d
virtual void includeSubroutine()
virtual ELdestControl & setLimit(const ELstring &s, int n)
ELstring getNewline() const
virtual ELdestControl & setThreshold(const ELseverityLevel &sv)
tuple interval
Definition: MergeJob_cfg.py:20
virtual void changeFile(std::ostream &os)
virtual bool log(edm::ErrorObj &msg)
virtual ELdestControl & setTimespan(const ELstring &s, int n)
virtual ELdestControl & setTraceThreshold(const ELseverityLevel &sv)
virtual void ignoreModule(ELstring const &moduleName)
virtual int setLineLength(int len)
virtual void respondToModule(ELstring const &moduleName)
virtual ELdestControl & setPreamble(const ELstring &preamble)
virtual void filterModule(ELstring const &moduleName)
virtual int getLineLength() const
virtual ELdestControl & clearSummary()
virtual void noTerminationSummary()
virtual std::map< ELextendedID, StatsCount > statisticsMap() const
virtual void summaryForJobReport(std::map< std::string, double > &sm)
virtual ELdestControl & setNewline(const ELstring &newline)
virtual ELdestControl & zero()
virtual void suppressSubroutine()
virtual void excludeModule(ELstring const &moduleName)
virtual ELdestControl & setTableLimit(int n)
virtual ELdestControl & setInterval(const ELstring &s, int interval)
tuple filename
Definition: lut2db_cfg.py:20
virtual ELdestControl & wipe()
virtual void summarization(const ELstring &title, const ELstring &sumLines)
std::string ELstring
Definition: ELstring.h:26