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  ~ELoutput() override;
58 
59  // --- Methods invoked by the ELadministrator:
60  //
61 public:
62  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  void suppressTime() override;
75  void includeTime() override;
76  void suppressModule()override;
77  void includeModule() override;
78  void suppressSubroutine() override;
79  void includeSubroutine() override;
80  void suppressText() override;
81  void includeText() override;
82  void suppressContext() override;
83  void includeContext() override;
84  void suppressSerial() override;
85  void includeSerial() override;
86  void useFullContext() override;
87  void useContext() override;
88  void separateTime() override;
89  void attachTime() override;
90  void separateEpilogue() override;
91  void attachEpilogue() override;
92 
93  void changeFile (std::ostream & os) override;
94  void changeFile (const ELstring & filename) override;
95  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
void suppressText() override
Definition: ELoutput.cc:622
~ELoutput() override
Definition: ELoutput.cc:294
void separateEpilogue() override
Definition: ELoutput.cc:636
edm::ELextendedID xid
Definition: ELoutput.h:103
void flush() override
Definition: ELoutput.cc:662
void includeModule() override
Definition: ELoutput.cc:615
void includeSubroutine() override
Definition: ELoutput.cc:618
void includeContext() override
Definition: ELoutput.cc:624
ELoutput & operator=(const ELoutput &orig)=delete
void attachEpilogue() override
Definition: ELoutput.cc:637
void suppressSerial() override
Definition: ELoutput.cc:627
void separateTime() override
Definition: ELoutput.cc:633
void suppressTime() override
Definition: ELoutput.cc:613
std::shared_ptr< std::ostream > os
Definition: ELoutput.h:101
void useFullContext() override
Definition: ELoutput.cc:630
void includeSerial() override
Definition: ELoutput.cc:628
void emitToken(const ELstring &s, bool nl=false)
Definition: ELoutput.cc:528
void attachTime() override
Definition: ELoutput.cc:634
void suppressModule() override
Definition: ELoutput.cc:616
tuple msg
Definition: mps_check.py:277
void includeTime() override
Definition: ELoutput.cc:612
void useContext() override
Definition: ELoutput.cc:631
HLT enums.
bool log(const edm::ErrorObj &msg) override
Definition: ELoutput.cc:310
void suppressContext() override
Definition: ELoutput.cc:625
std::string ELstring
Definition: ELstring.h:26
void changeFile(std::ostream &os) override
Definition: ELoutput.cc:644
void includeText() override
Definition: ELoutput.cc:621
void suppressSubroutine() override
Definition: ELoutput.cc:619