CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELoutput.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELoutput_h
2 #define FWCore_MessageService_ELoutput_h
3 
4 
5 // ----------------------------------------------------------------------
6 //
7 // ELoutput is a subclass of ELdestination representing the standard
8 // provided destination.
9 //
10 // 7/8/98 mf Created file.
11 // 6/17/99 jvr Made output format options available for ELdestControl only
12 // 7/2/99 jvr Added separate/attachTime, Epilogue, and Serial options
13 // 2/22/00 mf Changed myDetX to myOutputX (to avoid future puzzlement!)
14 // and added ELoutput(ox) to cacilitate inherited classes.
15 // 6/7/00 web Consolidated ELoutput/X; add filterModule()
16 // 6/14/00 web Declare classes before granting friendship; remove using
17 // 10/4/00 mf add excludeModule()
18 // 4/4/01 mf Removed moduleOfInterest and moduleToExclude, in favor
19 // of using base class method.
20 // 6/23/03 mf changeFile(), flush()
21 // 6/11/07 mf changed default for emitAtStart to false
22 //
23 // ----------------------------------------------------------------------
24 
26 
29 
30 #include <memory>
31 
32 namespace edm {
33 
34 
35 // ----------------------------------------------------------------------
36 // prerequisite classes:
37 // ----------------------------------------------------------------------
38 
39 class ErrorObj;
40 namespace service {
41 
42 class ELdestControl;
43 
44 
45 // ----------------------------------------------------------------------
46 // ELoutput:
47 // ----------------------------------------------------------------------
48 
49 class ELoutput : public ELdestination {
50 
51  friend class ELdestControl;
52 
53 public:
54 
55  // --- Birth/death:
56  //
57  ELoutput();
58  ELoutput( std::ostream & os, bool emitAtStart = false ); // 6/11/07 mf
59  ELoutput( const ELstring & fileName, bool emitAtStart = false );
60  ELoutput( const ELoutput & orig );
61  virtual ~ELoutput();
62 
63  // --- Methods invoked by the ELadministrator:
64  //
65 public:
66  virtual
67  ELoutput *
68  clone() const;
69  // Used by attach() to put the destination on the ELadministrators list
70  //-| There is a note in Design Notes about semantics
71  //-| of copying a destination onto the list: ofstream
72  //-| ownership is passed to the new copy.
73 
74  virtual bool log( const edm::ErrorObj & msg );
75 
76  // --- Methods invoked through the ELdestControl handle:
77  //
78 protected:
79  // trivial clearSummary(), wipe(), zero() from base class
80  // trivial three summary(..) from base class
81 
82  // --- Data affected by methods of specific ELdestControl handle:
83  //
84 protected:
85  // ELoutput uses the generic ELdestControl handle
86 
87  // --- Internal Methods -- Users should not invoke these:
88  //
89 protected:
90  virtual void emitToken( const ELstring & s, bool nl=false );
91 
92  virtual void suppressTime(); virtual void includeTime();
93  virtual void suppressModule(); virtual void includeModule();
94  virtual void suppressSubroutine(); virtual void includeSubroutine();
95  virtual void suppressText(); virtual void includeText();
96  virtual void suppressContext(); virtual void includeContext();
97  virtual void suppressSerial(); virtual void includeSerial();
98  virtual void useFullContext(); virtual void useContext();
99  virtual void separateTime(); virtual void attachTime();
100  virtual void separateEpilogue(); virtual void attachEpilogue();
101 
102  virtual void summarization ( const ELstring & fullTitle
103  , const ELstring & sumLines );
104 
105  virtual void changeFile (std::ostream & os);
106  virtual void changeFile (const ELstring & filename);
107  virtual void flush();
108 
109 
110 protected:
111  // --- member data:
112  //
113  std::shared_ptr<std::ostream> os;
116 
117  bool wantTimestamp
120  , wantText
122  , wantSerial
126  , preambleMode
127  ;
128 
129  // --- Verboten method:
130  //
131  ELoutput & operator=( const ELoutput & orig );
132 
133 }; // ELoutput
134 
135 
136 // ----------------------------------------------------------------------
137 
138 
139 } // end of namespace service
140 } // end of namespace edm
141 
142 
143 #endif // FWCore_MessageService_ELoutput_h
virtual ELoutput * clone() const
Definition: ELoutput.cc:308
virtual void useFullContext()
Definition: ELoutput.cc:637
virtual void separateTime()
Definition: ELoutput.cc:640
virtual void changeFile(std::ostream &os)
Definition: ELoutput.cc:685
virtual void suppressSubroutine()
Definition: ELoutput.cc:626
virtual void suppressContext()
Definition: ELoutput.cc:632
edm::ELextendedID xid
Definition: ELoutput.h:115
virtual void includeSerial()
Definition: ELoutput.cc:635
virtual void suppressTime()
Definition: ELoutput.cc:620
virtual void attachEpilogue()
Definition: ELoutput.cc:644
virtual void includeSubroutine()
Definition: ELoutput.cc:625
virtual void useContext()
Definition: ELoutput.cc:638
virtual bool log(const edm::ErrorObj &msg)
Definition: ELoutput.cc:317
virtual void includeContext()
Definition: ELoutput.cc:631
virtual void suppressSerial()
Definition: ELoutput.cc:634
virtual void includeTime()
Definition: ELoutput.cc:619
virtual void separateEpilogue()
Definition: ELoutput.cc:643
std::shared_ptr< std::ostream > os
Definition: ELoutput.h:113
virtual void attachTime()
Definition: ELoutput.cc:641
virtual void emitToken(const ELstring &s, bool nl=false)
Definition: ELoutput.cc:535
virtual void summarization(const ELstring &fullTitle, const ELstring &sumLines)
Definition: ELoutput.cc:651
virtual void suppressModule()
Definition: ELoutput.cc:623
virtual void flush()
Definition: ELoutput.cc:703
ELoutput & operator=(const ELoutput &orig)
virtual void suppressText()
Definition: ELoutput.cc:629
tuple filename
Definition: lut2db_cfg.py:20
virtual void includeText()
Definition: ELoutput.cc:628
virtual void includeModule()
Definition: ELoutput.cc:622
std::string ELstring
Definition: ELstring.h:26