CMS 3D CMS Logo

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 
43 // ----------------------------------------------------------------------
44 // ELoutput:
45 // ----------------------------------------------------------------------
46 
47 class ELoutput : public ELdestination {
48 
49 public:
50 
51  // --- Birth/death:
52  //
53  ELoutput();
54  ELoutput( std::ostream & os, bool emitAtStart = false ); // 6/11/07 mf
55  ELoutput( const ELstring & fileName, bool emitAtStart = false );
56  ELoutput( const ELoutput & orig );
57  virtual ~ELoutput();
58 
59  // --- Methods invoked by the ELadministrator:
60  //
61 public:
62  virtual bool log( const edm::ErrorObj & msg ) override;
63 
64 protected:
65  // trivial clearSummary(), wipe(), zero() from base class
66  // trivial three summary(..) from base class
67 
68 protected:
69  // --- Internal Methods -- Users should not invoke these:
70  //
71 protected:
72  void emitToken( const ELstring & s, bool nl=false ) ;
73 
74  virtual void suppressTime() override;
75  virtual void includeTime() override;
76  virtual void suppressModule()override;
77  virtual void includeModule() override;
78  virtual void suppressSubroutine() override;
79  virtual void includeSubroutine() override;
80  virtual void suppressText() override;
81  virtual void includeText();
82  virtual void suppressContext() override;
83  virtual void includeContext() override;
84  virtual void suppressSerial() override;
85  virtual void includeSerial() override;
86  virtual void useFullContext() override;
87  virtual void useContext() override;
88  virtual void separateTime() override;
89  virtual void attachTime() override;
90  virtual void separateEpilogue() override;
91  virtual void attachEpilogue() override;
92 
93  virtual void changeFile (std::ostream & os) override;
94  virtual void changeFile (const ELstring & filename) override;
95  virtual void flush() override;
96 
97 
98 protected:
99  // --- member data:
100  //
101  std::shared_ptr<std::ostream> os;
104 
105  bool wantTimestamp
108  , wantText
110  , wantSerial
114  , preambleMode
115  ;
116 
117  // --- Verboten method:
118  //
119  ELoutput & operator=( const ELoutput & orig ) = delete;
120 
121 }; // ELoutput
122 
123 
124 // ----------------------------------------------------------------------
125 
126 
127 } // end of namespace service
128 } // end of namespace edm
129 
130 
131 #endif // FWCore_MessageService_ELoutput_h
virtual void suppressText() override
Definition: ELoutput.cc:622
virtual void separateEpilogue() override
Definition: ELoutput.cc:636
edm::ELextendedID xid
Definition: ELoutput.h:103
virtual void flush() override
Definition: ELoutput.cc:662
virtual void includeModule() override
Definition: ELoutput.cc:615
virtual void includeSubroutine() override
Definition: ELoutput.cc:618
virtual void includeContext() override
Definition: ELoutput.cc:624
ELoutput & operator=(const ELoutput &orig)=delete
virtual void attachEpilogue() override
Definition: ELoutput.cc:637
virtual void suppressSerial() override
Definition: ELoutput.cc:627
virtual void separateTime() override
Definition: ELoutput.cc:633
virtual void suppressTime() override
Definition: ELoutput.cc:613
std::shared_ptr< std::ostream > os
Definition: ELoutput.h:101
virtual void useFullContext() override
Definition: ELoutput.cc:630
virtual void includeSerial() override
Definition: ELoutput.cc:628
void emitToken(const ELstring &s, bool nl=false)
Definition: ELoutput.cc:528
virtual void attachTime() override
Definition: ELoutput.cc:634
virtual void suppressModule() override
Definition: ELoutput.cc:616
virtual void includeTime() override
Definition: ELoutput.cc:612
virtual void useContext() override
Definition: ELoutput.cc:631
HLT enums.
virtual bool log(const edm::ErrorObj &msg) override
Definition: ELoutput.cc:310
virtual void includeText()
Definition: ELoutput.cc:621
virtual void suppressContext() override
Definition: ELoutput.cc:625
std::string ELstring
Definition: ELstring.h:26
virtual void changeFile(std::ostream &os) override
Definition: ELoutput.cc:644
virtual void suppressSubroutine() override
Definition: ELoutput.cc:619