CMS 3D CMS Logo

ELlimitsTable.h
Go to the documentation of this file.
1 #ifndef FWCore_MessageService_ELlimitsTable_h
2 #define FWCore_MessageService_ELlimitsTable_h
3 
4 // ----------------------------------------------------------------------
5 //
6 // ELlimitsTable is a class holding two maps: One listing various
7 // limits associated with each id, and one counting occurrences
8 // and tracking latest times of each type of extended-id
9 // (id + severity + module + subroutine + process).
10 // In addition, there is a table by severity of defaults,
11 // and a single wildcard default limit.
12 //
13 // The fundamental operation is
14 //
15 // bool add( const ELextendedID & )
16 //
17 // which checks if the extended id is in the main map. If it is not, it
18 // looks for the specified limit (by id, then severity, then wildcard) and
19 // cretes an entry in the main map for this extended id. The count is
20 // incremented, (perhaps zero-ed first if the timespan was exceeded) and
21 // checked against its limit. If the limit is not exceeded, OR is exceeded
22 // by 2**N times the limit, this returns true.
23 //
24 // Limits of -1 mean react to this error always.
25 // Limits of 0 in the auxilliary defaults indicate that the corresponding
26 // limit was not specified.
27 //
28 // 7/6/98 mf Created file.
29 // 6/7/00 web Reflect consolidation of ELdestination/X
30 // 6/14/00 web Declare classes before granting friendship.
31 // 6/15/01 mf Grant friendship to ELoutput so that faithful copying of
32 // ELoutput destinations becomes possible.
33 // 5/16/06 mf Added wildcardInterval member, and severityIntervals
34 //
35 // ----------------------------------------------------------------------
36 
41 
42 namespace edm {
43  namespace service {
44 
45  // ----------------------------------------------------------------------
46  // Prerequisite class:
47  // ----------------------------------------------------------------------
48 
49  class ELdestination;
50  class ELoutput;
51 
52  // ----------------------------------------------------------------------
53  // ELlimitsTable:
54  // ----------------------------------------------------------------------
55 
56  class ELlimitsTable {
57  friend class ELdestination;
58  friend class ELoutput;
59 
60  public:
61  ELlimitsTable();
63 
64  // ----- Methods invoked by the destination under impetus from the logger:
65  //
66  public:
67  bool add(const ELextendedID& xid);
68  void setTableLimit(int n);
69 
70  // ----- Control methods invoked by the framework:
71  //
72  public:
73  void wipe(); // Clears everything -- counts and limits established.
74  void zero(); // Clears only counts.
75 
76  void setLimit(const ELstring& id, int n);
77  void setLimit(const ELseverityLevel& sev, int n);
78  void setInterval(const ELstring& id, int interval);
79  void setInterval(const ELseverityLevel& sev, int interval);
80  void setTimespan(const ELstring& id, int n);
81  void setTimespan(const ELseverityLevel& sev, int n);
82 
84 
85  // ----- Tables and auxilliary private data:
86  //
87  protected:
94 
98 
99  }; // ELlimitsTable
100 
101  // ----------------------------------------------------------------------
102 
103  } // end of namespace service
104 } // end of namespace edm
105 
106 #endif // FWCore_MessageService_ELlimitsTable_h
service
Definition: service.py:1
edm::service::ELoutput
Definition: ELoutput.h:44
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::service::ELdestination
Definition: ELdestination.h:53
ELextendedID.h
edm::ELmap_counts
std::map< ELextendedID, CountAndLimit > ELmap_counts
Definition: ELmap.h:86
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::ELlimitsTable::setTimespan
void setTimespan(const ELstring &id, int n)
Definition: ELlimitsTable.cc:216
edm::service::ELlimitsTable::operator=
ELlimitsTable & operator=(const ELlimitsTable &t)
Definition: ELlimitsTable.cc:229
edm::service::ELlimitsTable::severityLimits
int severityLimits[ELseverityLevel::nLevels]
Definition: ELlimitsTable.h:88
edm::ELextendedID
Definition: ELextendedID.h:24
edm::service::ELlimitsTable::severityTimespans
int severityTimespans[ELseverityLevel::nLevels]
Definition: ELlimitsTable.h:89
edm::service::ELlimitsTable::setLimit
void setLimit(const ELstring &id, int n)
Definition: ELlimitsTable.cc:196
edm::service::ELlimitsTable::wipe
void wipe()
Definition: ELlimitsTable.cc:165
edm::ELmap_limits
std::map< ELstring, LimitAndTimespan > ELmap_limits
Definition: ELmap.h:84
edm::service::ELlimitsTable::wildcardTimespan
int wildcardTimespan
Definition: ELlimitsTable.h:93
edm::ELstring
std::string ELstring
Definition: ELstring.h:21
edm::service::ELlimitsTable::~ELlimitsTable
~ELlimitsTable()
Definition: ELlimitsTable.cc:52
edm::service::ELlimitsTable
Definition: ELlimitsTable.h:56
OrderedSet.t
t
Definition: OrderedSet.py:90
ELmap.h
edm::service::ELlimitsTable::severityIntervals
int severityIntervals[ELseverityLevel::nLevels]
Definition: ELlimitsTable.h:90
edm::service::ELlimitsTable::add
bool add(const ELextendedID &xid)
Definition: ELlimitsTable.cc:65
edm::ELseverityLevel::nLevels
Definition: ELseverityLevel.h:121
edm::service::ELlimitsTable::setTableLimit
void setTableLimit(int n)
Definition: ELlimitsTable.cc:63
edm::service::ELlimitsTable::limits
ELmap_limits limits
Definition: ELlimitsTable.h:96
edm::service::ELlimitsTable::wildcardInterval
int wildcardInterval
Definition: ELlimitsTable.h:92
readEcalDQMStatus.interval
interval
Definition: readEcalDQMStatus.py:18
edm::service::ELlimitsTable::tableLimit
int tableLimit
Definition: ELlimitsTable.h:95
ELseverityLevel.h
edm::service::ELlimitsTable::wildcardLimit
int wildcardLimit
Definition: ELlimitsTable.h:91
edm::ELseverityLevel
Definition: ELseverityLevel.h:96
edm::service::ELlimitsTable::setInterval
void setInterval(const ELstring &id, int interval)
Definition: ELlimitsTable.cc:205
edm::service::ELlimitsTable::zero
void zero()
Definition: ELlimitsTable.cc:187
edm::service::ELlimitsTable::counts
ELmap_counts counts
Definition: ELlimitsTable.h:97
ELstring.h
edm::service::ELlimitsTable::ELlimitsTable
ELlimitsTable()
Definition: ELlimitsTable.cc:38