CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELstatistics.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELstatistics_h
2 #define FWCore_MessageService_ELstatistics_h
3 
4 
5 // ----------------------------------------------------------------------
6 //
7 // ELstatistics is a subclass of ELdestination representing the
8 // provided statistics (for summary) keeping.
9 //
10 // 7/8/98 mf Created file.
11 // 7/2/99 jvr Added noTerminationSummary() function
12 // 12/20/99 mf Added virtual destructor.
13 // 6/7/00 web Reflect consolidation of ELdestination/X; consolidate
14 // ELstatistics/X.
15 // 6/14/00 web Declare classes before granting friendship.
16 // 10/4/00 mf Add filterModule() and excludeModule()
17 // 1/15/00 mf line length control: changed ELoutputLineLen to
18 // the base class lineLen (no longer static const)
19 // 3/13/01 mf statisticsMap()
20 // 4/4/01 mf Removed moduleOfInterest and moduleToExclude, in favor
21 // of using base class method.
22 // 1/17/06 mf summary() for use in MessageLogger
23 // 8/16/07 mf noteGroupedCategory(cat) to support grouping of modules in
24 // specified categories. Also, a static vector of such categories.
25 // 6/19/08 mf summaryForJobReport() for use in CMS framework
26 //
27 // ----------------------------------------------------------------------
28 
30 
34 
35 #include <set>
36 
37 namespace edm {
38 
39 
40 // ----------------------------------------------------------------------
41 // prerequisite classes:
42 // ----------------------------------------------------------------------
43 
44 class ErrorObj;
45 namespace service {
46 class ELadministrator;
47 class ELdestControl;
48 
49 
50 // ----------------------------------------------------------------------
51 // ELstatistics:
52 // ----------------------------------------------------------------------
53 
54 class ELstatistics : public ELdestination {
55 
56  friend class ELadministrator;
57  friend class ELdestControl;
58 
59 public:
60  // ----- constructor/destructor:
61  ELstatistics();
62  ELstatistics( std::ostream & osp );
63  ELstatistics( int spaceLimit );
64  ELstatistics( int spaceLimit, std::ostream & osp );
65  ELstatistics( const ELstatistics & orig );
66  virtual ~ELstatistics();
67 
68  // ----- Methods invoked by the ELadministrator:
69  //
70 public:
71  virtual
72  ELstatistics *
73  clone() const;
74  // Used by attach() to put the destination on the ELadministrators list
75  //-| There is a note in Design Notes about semantics
76  //-| of copying a destination onto the list: ofstream
77  //-| ownership is passed to the new copy.
78 
79  virtual bool log( const edm::ErrorObj & msg );
80 
81  // output( const ELstring & item, const ELseverityLevel & sev )
82  // from base class
83 
84  // ----- Methods invoked by the MessageLoggerScribe, bypassing destControl
85  //
86 public:
87  static void noteGroupedCategory(std::string const & cat); // 8/16/07 mf
88 
89 
90  // ----- Methods invoked through the ELdestControl handle:
91  //
92 protected:
93  virtual void clearSummary();
94 
95  virtual void wipe();
96  virtual void zero();
97 
98  virtual void summary( ELdestControl & dest, const ELstring & title="" );
99  virtual void summary( std::ostream & os , const ELstring & title="" );
100  virtual void summary( ELstring & s , const ELstring & title="" );
101  virtual void summary( );
102  void noTerminationSummary();
103 
104  virtual std::map<ELextendedID,StatsCount> statisticsMap() const;
105 
106  virtual void summaryForJobReport (std::map<std::string, double> & sm);
107 
108  // summarization( const ELstring & sumLines, const ELstring & sumLines )
109  // from base class
110 
111  // ----- Data affected by methods of specific ELdestControl handle:
112  //
113 protected:
117  std::ostream & termStream;
118 
120 
121  [[cms::thread_safe]] static std::set<std::string> groupedCategories; // 8/16/07 mf
122  static ELstring formSummary(ELmap_stats & stats); // 8/16/07 mf
123 
124  // ---- Helper methods specific to MessageLogger applicaton
125  //
126 private:
128  ELstatistics & operator=( const ELstatistics & orig ); // verboten
129 
130 }; // ELstatistics
131 
132 
133 // ----------------------------------------------------------------------
134 
135 
136 } // end of namespace service
137 } // end of namespace edm
138 
139 
140 #endif // FWCore_MessageService_ELstatistics_h
static std::set< std::string > groupedCategories
Definition: ELstatistics.h:121
virtual ELstatistics * clone() const
virtual std::map< ELextendedID, StatsCount > statisticsMap() const
std::string dualLogName(std::string const &s)
static ELstring formSummary(ELmap_stats &stats)
def cat
Definition: eostools.py:400
static void noteGroupedCategory(std::string const &cat)
std::map< ELextendedID, StatsCount > ELmap_stats
Definition: ELmap.h:103
virtual void summaryForJobReport(std::map< std::string, double > &sm)
std::string ELstring
Definition: ELstring.h:26
virtual bool log(const edm::ErrorObj &msg)
ELstatistics & operator=(const ELstatistics &orig)