test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELdestination.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELdestination_h
2 #define FWCore_MessageService_ELdestination_h
3 
4 
5 // ----------------------------------------------------------------------
6 //
7 // ELdestination is a virtual class defining the interface to a
8 // destination. Concrete classes derived from this include
9 // ELoutput and ELstatistics. The ELadministrator owns
10 // a list of ELdestination* as well as the objects those
11 // list elements point to.
12 //
13 // 7/5/98 mf Created file.
14 // 6/16/99 jvr Allows suppress/include options on destinations
15 // 7/1/99 mf Forward-declared ELdestControl for strict C++ (thanks cg).
16 // 7/2/99 jvr Added separate/attachTime, Epilogue, and Serial options
17 // 12/20/99 mf Added virtual destructor.
18 // 6/7/00 web Consolidated ELdestination/X; add filterModule()
19 // 6/14/00 web Declare classes before granting friendship.
20 // 10/4/00 mf Add excludeModule
21 // 1/15/01 mf setLineLength()
22 // 2/13/01 mf fix written by pc to accomodate NT problem with
23 // static init { $001$ }. Corresponding fix is in .cc file.
24 // 3/13/01 mf statisticsMap()
25 // 04/04/01 mf add ignoreMOdule and respondToModule
26 // 6/23/03 mf changeFile() and flush()
27 // 1/10/06 mf finish
28 // 6/19/08 mf summaryForJobReport()
29 //
30 // ----------------------------------------------------------------------
31 
34 
38 
39 namespace edm {
40 namespace service {
41 
42 // ----------------------------------------------------------------------
43 // prerequisite classes:
44 // ----------------------------------------------------------------------
45 
46 class ELdestControl;
47 class ELadministrator;
48 
49 
50 // ----------------------------------------------------------------------
51 // ELdestination:
52 // ----------------------------------------------------------------------
53 
55 
56  friend class ELadministrator;
57  friend class ELdestControl;
58 
59 public:
60 
61  ELdestination();
62  virtual ~ELdestination();
63 
64  // ----- Methods invoked by the ELadministrator:
65  //
66 public:
67  virtual ELdestination * clone() const = 0;
68  virtual bool log( const edm::ErrorObj & msg );
69 
70  virtual void summarization(
71  const edm::ELstring & title,
72  const edm::ELstring & sumLines );
73 
74  virtual ELstring getNewline() const;
75 
76  virtual void finish();
77 
78  // ----- Methods invoked through the ELdestControl handle:
79  //
80 protected:
81  virtual void clearSummary();
82  virtual void wipe();
83  virtual void zero();
84  virtual void filterModule( ELstring const & moduleName );
85  virtual void excludeModule( ELstring const & moduleName );
86  virtual void ignoreModule( ELstring const & moduleName );
87  virtual void respondToModule( ELstring const & moduleName );
88  virtual bool thisShouldBeIgnored(const ELstring & s) const;
89 
90  virtual void summary( ELdestControl & dest, const ELstring & title="" );
91  virtual void summary( std::ostream & os , const ELstring & title="" );
92  virtual void summary( ELstring & s , const ELstring & title="" );
93  virtual void summary( );
94  virtual void summaryForJobReport(std::map<std::string, double> & sm);
95 
96  virtual void setTableLimit( int n );
97 
98  virtual std::map<ELextendedID,StatsCount> statisticsMap() const;
99 
100  virtual void changeFile (std::ostream & os);
101  virtual void changeFile (const ELstring & filename);
102  virtual void flush();
103 
104  // ----- Select output format options:
105  //
106 private:
107  virtual void suppressText(); virtual void includeText(); // $$ jvr
108  virtual void suppressModule(); virtual void includeModule();
109  virtual void suppressSubroutine(); virtual void includeSubroutine();
110  virtual void suppressTime(); virtual void includeTime();
111  virtual void suppressContext(); virtual void includeContext();
112  virtual void suppressSerial(); virtual void includeSerial();
113  virtual void useFullContext(); virtual void useContext();
114  virtual void separateTime(); virtual void attachTime();
115  virtual void separateEpilogue(); virtual void attachEpilogue();
116  virtual void noTerminationSummary();
117  virtual int setLineLength(int len); virtual int getLineLength() const;
118 
119  // ----- Data affected by methods of the ELdestControl handle:
120  //
121 protected:
133  // Fix $001 2/13/01 mf
134 #ifndef DEFECT_NO_STATIC_CONST_INIT
135  static const int defaultLineLength = 80;
136 #else
137  static const int defaultLineLength;
138 #endif
139 
140  // ----- Verboten methods:
141  //
142 private:
143  ELdestination( const ELdestination & orig );
144  ELdestination& operator= ( const ELdestination & orig );
145 
146 }; // ELdestination
147 
149  void operator()(std::ostream* os) const;
150 };
151 
152 } // end of namespace service
153 } // end of namespace edm
154 
155 
156 #endif // FWCore_MessageService_ELdestination_h
ELseverityLevel traceThreshold
virtual void excludeModule(ELstring const &moduleName)
virtual void includeSubroutine()
void operator()(std::ostream *os) const
virtual bool thisShouldBeIgnored(const ELstring &s) const
ELdestination & operator=(const ELdestination &orig)
virtual int setLineLength(int len)
virtual void summaryForJobReport(std::map< std::string, double > &sm)
static const int defaultLineLength
virtual int getLineLength() const
virtual void ignoreModule(ELstring const &moduleName)
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
virtual void summarization(const edm::ELstring &title, const edm::ELstring &sumLines)
virtual void filterModule(ELstring const &moduleName)
virtual void noTerminationSummary()
std::set< ELsetS > ELset_string
Definition: ELset.h:33
virtual std::map< ELextendedID, StatsCount > statisticsMap() const
virtual ELdestination * clone() const =0
virtual void suppressSubroutine()
virtual void changeFile(std::ostream &os)
virtual void respondToModule(ELstring const &moduleName)
virtual ELstring getNewline() const
tuple filename
Definition: lut2db_cfg.py:20
virtual bool log(const edm::ErrorObj &msg)
virtual void setTableLimit(int n)
std::string ELstring
Definition: ELstring.h:26