CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELlog4cplus.h
Go to the documentation of this file.
1 #ifndef EventFilter_ELlog4cplus_h
2 #define EventFilter_ELlog4cplus_h 2
3 
4 // ----------------------------------------------------------------------
5 //
6 // ELoutput is a subclass of ELdestination representing the standard
7 // provided destination.
8 //
9 // 7/8/98 mf Created file.
10 // 6/17/99 jvr Made output format options available for ELdestControl only
11 // 7/2/99 jvr Added separate/attachTime, Epilogue, and Serial options
12 // 2/22/00 mf Changed myDetX to myOutputX (to avoid future puzzlement!)
13 // and added ELoutput(ox) to cacilitate inherited classes.
14 // 6/7/00 web Consolidated ELoutput/X; add filterModule()
15 // 6/14/00 web Declare classes before granting friendship; remove using
16 // 10/4/00 mf add excludeModule()
17 // 4/4/01 mf Removed moduleOfInterest and moduleToExclude, in favor
18 // of using base class method.
19 // 6/23/03 mf changeFile(), flush()
20 //
21 // ----------------------------------------------------------------------
22 
23 #include <sstream>
24 
25 
29 
31 
32 namespace xdaq {
33  class Application;
34 }
35 
36 namespace edm {
37 
38 
39 // ----------------------------------------------------------------------
40 // prerequisite classes:
41 // ----------------------------------------------------------------------
42 
43 class ErrorObj;
44 class ELdestControl;
45 
46 
47 // ----------------------------------------------------------------------
48 // ELoutput:
49 // ----------------------------------------------------------------------
50 
52 
53  friend class service::ELdestControl;
54 
55 public:
56 
57  // --- Birth/death:
58  //
59  ELlog4cplus();
60  ELlog4cplus( const ELlog4cplus & orig );
61  virtual ~ELlog4cplus();
62 
63  // --- Methods invoked by the ELadministrator:
64  //
65 public:
66  virtual
67  ELlog4cplus *
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 ErrorObj & msg );
75 
76 
77  // --- Methods invoked through the ELdestControl handle:
78  //
79 protected:
80  // trivial clearSummary(), wipe(), zero() from base class
81  // trivial three summary(..) from base class
82 
83  // --- Data affected by methods of specific ELdestControl handle:
84  //
85 protected:
86  // ELlog4cplus uses the generic ELdestControl handle
87 
88  // --- Internal Methods -- Users should not invoke these:
89  //
90 protected:
91  virtual void emit( const ELstring & s, bool nl=false );
92 
93  virtual void suppressTime(); virtual void includeTime();
94  virtual void suppressModule(); virtual void includeModule();
95  virtual void suppressSubroutine(); virtual void includeSubroutine();
96  virtual void suppressText(); virtual void includeText();
97  virtual void suppressContext(); virtual void includeContext();
98  virtual void suppressSerial(); virtual void includeSerial();
99  virtual void useFullContext(); virtual void useContext();
100  virtual void separateTime(); virtual void attachTime();
101  virtual void separateEpilogue(); virtual void attachEpilogue();
102 
103  virtual void summarization ( const ELstring & fullTitle
104  , const ELstring & sumLines );
105 
106 
107  // --- Maintenance and Testing Methods -- Users should not invoke these:
108  //
109 public:
110  void xxxxSet( int i ); // Testing only
111  void xxxxShout(); // Testing only
112  void setAppl(xdaq::Application *a);
113 
114 protected:
115  // --- member data:
116  //
117  std::ostringstream os_;
118  std::ostringstream * os;
119  bool osIsOwned;
122 
123  bool wantTimestamp
126  , wantText
128  , wantSerial
132  ;
133 
134  // *** Maintenance and Testing Data ***
135  int xxxxInt; // Testing only
136 
137  // --- Verboten method:
138  //
139  ELlog4cplus & operator=( const ELlog4cplus & orig );
140 
141  private:
142 
143  xdaq::Application *appl_;
144 
145 }; // ELlog4cplus
146 
147 
148 // ----------------------------------------------------------------------
149 
150 
151 } // end of namespace edm
152 
153 
154 #endif // ELlog4cplus_h
int i
Definition: DBlmapReader.cc:9
virtual ~ELlog4cplus()
Definition: ELlog4cplus.cc:163
virtual void suppressSerial()
Definition: ELlog4cplus.cc:485
std::ostringstream * os
Definition: ELlog4cplus.h:118
virtual void attachEpilogue()
Definition: ELlog4cplus.cc:495
virtual void separateTime()
Definition: ELlog4cplus.cc:491
virtual void includeSerial()
Definition: ELlog4cplus.cc:486
virtual void suppressSubroutine()
Definition: ELlog4cplus.cc:477
virtual void includeText()
Definition: ELlog4cplus.cc:479
virtual void includeSubroutine()
Definition: ELlog4cplus.cc:476
virtual void includeTime()
Definition: ELlog4cplus.cc:470
void setAppl(xdaq::Application *a)
Definition: ELlog4cplus.cc:531
virtual void suppressContext()
Definition: ELlog4cplus.cc:483
std::ostringstream os_
Definition: ELlog4cplus.h:117
void xxxxSet(int i)
Definition: ELlog4cplus.cc:382
virtual void separateEpilogue()
Definition: ELlog4cplus.cc:494
virtual void emit(const ELstring &s, bool nl=false)
Definition: ELlog4cplus.cc:395
virtual bool log(const ErrorObj &msg)
Definition: ELlog4cplus.cc:189
virtual void attachTime()
Definition: ELlog4cplus.cc:492
virtual ELlog4cplus * clone() const
Definition: ELlog4cplus.cc:182
xdaq::Application * appl_
Definition: ELlog4cplus.h:143
virtual void includeModule()
Definition: ELlog4cplus.cc:473
virtual void suppressModule()
Definition: ELlog4cplus.cc:474
ELlog4cplus & operator=(const ELlog4cplus &orig)
virtual void suppressText()
Definition: ELlog4cplus.cc:480
double a
Definition: hdecay.h:121
ELextendedID xid
Definition: ELlog4cplus.h:121
virtual void suppressTime()
Definition: ELlog4cplus.cc:471
virtual void includeContext()
Definition: ELlog4cplus.cc:482
virtual void useFullContext()
Definition: ELlog4cplus.cc:488
bool wantEpilogueSeparate
Definition: ELlog4cplus.h:124
std::string ELstring
Definition: ELstring.h:26
virtual void useContext()
Definition: ELlog4cplus.cc:489
virtual void summarization(const ELstring &fullTitle, const ELstring &sumLines)
Definition: ELlog4cplus.cc:502