CMS 3D CMS Logo

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 // ELstatistics is a subclass of ELdestination representing the
7 // provided statistics (for summary) keeping.
8 //
9 // 7/8/98 mf Created file.
10 // 7/2/99 jvr Added noTerminationSummary() function
11 // 12/20/99 mf Added virtual destructor.
12 // 6/7/00 web Reflect consolidation of ELdestination/X; consolidate
13 // ELstatistics/X.
14 // 6/14/00 web Declare classes before granting friendship.
15 // 10/4/00 mf Add filterModule() and excludeModule()
16 // 1/15/00 mf line length control: changed ELoutputLineLen to
17 // the base class lineLen (no longer static const)
18 // 3/13/01 mf statisticsMap()
19 // 4/4/01 mf Removed moduleOfInterest and moduleToExclude, in favor
20 // of using base class method.
21 // 1/17/06 mf summary() for use in MessageLogger
22 // 8/16/07 mf noteGroupedCategory(cat) to support grouping of modules in
23 // specified categories. Also, a static vector of such categories.
24 // 6/19/08 mf summaryForJobReport() for use in CMS framework
25 //
26 // ----------------------------------------------------------------------
27 
32 
33 #include <set>
34 
35 namespace edm {
36 
37  // ----------------------------------------------------------------------
38  // prerequisite classes:
39  // ----------------------------------------------------------------------
40 
41  class ErrorObj;
42  namespace service {
43  class ELadministrator;
44 
45  // ----------------------------------------------------------------------
46  // ELstatistics:
47  // ----------------------------------------------------------------------
48 
49  class ELstatistics : public ELdestination {
50  friend class ELadministrator;
51 
52  public:
53  // ----- constructor/destructor:
54  ELstatistics();
55  ELstatistics(std::ostream& osp);
56  ELstatistics(int spaceLimit);
57  ELstatistics(int spaceLimit, std::ostream& osp);
58  ELstatistics(const ELstatistics& orig);
59  ELstatistics& operator=(const ELstatistics& orig) = delete; // verboten
60  ~ELstatistics() override;
61 
62  // ----- Methods invoked by the ELadministrator:
63  //
64  public:
65  // Used by attach() to put the destination on the ELadministrators list
66  //-| There is a note in Design Notes about semantics
67  //-| of copying a destination onto the list: ofstream
68  //-| ownership is passed to the new copy.
69 
70  bool log(const edm::ErrorObj& msg) override;
71 
72  // ----- Methods invoked by the MessageLoggerScribe, bypassing destControl
73  //
74  public:
75  static void noteGroupedCategory(std::string const& cat); // 8/16/07 mf
76 
77  void summary(unsigned long overfullWaitCount);
78  void noTerminationSummary();
79  void summaryForJobReport(std::map<std::string, double>& sm);
80  void wipe() override;
81 
82  protected:
83  void clearSummary();
84 
85  void zero() override;
86 
87  std::map<ELextendedID, StatsCount> statisticsMap() const;
88 
89  protected:
93  std::ostream& termStream;
94 
96 
97  CMS_THREAD_SAFE static std::set<std::string> groupedCategories; // 8/16/07 mf
98  static std::string formSummary(ELmap_stats& stats); // 8/16/07 mf
99 
100  // ---- Helper methods specific to MessageLogger applicaton
101  //
102  private:
104 
105  void summary(std::ostream& os, std::string_view title);
106 
107  }; // ELstatistics
108 
109  // ----------------------------------------------------------------------
110 
111  } // end of namespace service
112 } // end of namespace edm
113 
114 #endif // FWCore_MessageService_ELstatistics_h
edm::service::ELstatistics::dualLogName
std::string dualLogName(std::string const &s)
Definition: ELstatistics.cc:468
service
Definition: service.py:1
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
edm::service::ELstatistics::noTerminationSummary
void noTerminationSummary()
Definition: ELstatistics.cc:361
edm::service::ELstatistics::~ELstatistics
~ELstatistics() override
Definition: ELstatistics.cc:140
edm::service::ELdestination
Definition: ELdestination.h:52
edm::service::ELstatistics::tableLimit
int tableLimit
Definition: ELstatistics.h:90
ELextendedID.h
edm
HLT enums.
Definition: AlignableModifier.h:19
eostools.cat
def cat(path)
Definition: eostools.py:401
edm::ErrorObj
Definition: ErrorObj.h:43
edm::service::ELstatistics::statisticsMap
std::map< ELextendedID, StatsCount > statisticsMap() const
Definition: ELstatistics.cc:363
mps_check.msg
tuple msg
Definition: mps_check.py:285
edm::service::ELstatistics::stats
ELmap_stats stats
Definition: ELstatistics.h:91
edm::ELmap_stats
std::map< ELextendedID, StatsCount > ELmap_stats
Definition: ELmap.h:88
edm::service::ELstatistics
Definition: ELstatistics.h:49
edm::service::ELstatistics::clearSummary
void clearSummary()
Definition: ELstatistics.cc:199
edm::service::ELstatistics::summary
void summary(unsigned long overfullWaitCount)
Definition: ELstatistics.cc:351
alignCSCRings.s
s
Definition: alignCSCRings.py:92
edm::service::ELstatistics::noteGroupedCategory
static void noteGroupedCategory(std::string const &cat)
Definition: ELstatistics.cc:484
edm::service::ELadministrator
Definition: ELadministrator.h:66
edm::service::ELstatistics::termStream
std::ostream & termStream
Definition: ELstatistics.h:93
edm::service::ELstatistics::wipe
void wipe() override
Definition: ELstatistics.cc:209
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition: thread_safety_macros.h:4
edm::service::ELstatistics::printAtTermination
bool printAtTermination
Definition: ELstatistics.h:95
ELmap.h
ELdestination.h
thread_safety_macros.h
edm::service::ELstatistics::summaryForJobReport
void summaryForJobReport(std::map< std::string, double > &sm)
Definition: ELstatistics.cc:368
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::service::ELstatistics::ELstatistics
ELstatistics()
Definition: ELstatistics.cc:75
edm::service::ELstatistics::operator=
ELstatistics & operator=(const ELstatistics &orig)=delete
edm::service::ELstatistics::zero
void zero() override
Definition: ELstatistics.cc:215
edm::service::ELstatistics::log
bool log(const edm::ErrorObj &msg) override
Definition: ELstatistics.cc:154
edm::service::ELstatistics::formSummary
static std::string formSummary(ELmap_stats &stats)
Definition: ELstatistics.cc:217
edm::service::ELstatistics::groupedCategories
static std::set< std::string > groupedCategories
Definition: ELstatistics.h:97
edm::service::ELstatistics::updatedStats
bool updatedStats
Definition: ELstatistics.h:92