CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
edm::service::MessageLoggerDefaults Struct Reference

#include <MessageLoggerDefaults.h>

Classes

struct  Category
 
struct  Destination
 

Public Member Functions

void hardwireAnalysisJobMode ()
 
void hardwireGridJobMode ()
 
void hardwireNilJobMode ()
 
void hardwireReleaseValidationJobMode ()
 
int limit (std::string const &dest, std::string const &cat)
 
 MessageLoggerDefaults (edm::JobMode mode=GridJobMode)
 
std::string output (std::string const &dest)
 
int reportEvery (std::string const &dest, std::string const &cat)
 
int sev_limit (std::string const &dest, std::string const &sev)
 
int sev_reportEvery (std::string const &dest, std::string const &sev)
 
int sev_timespan (std::string const &dest, std::string const &sev)
 
std::string threshold (std::string const &dest)
 
int timespan (std::string const &dest, std::string const &cat)
 

Static Public Member Functions

static edm::JobMode mode (std::string const &jm)
 

Public Attributes

std::vector< std::string > categories
 
std::map< std::string, Destinationdestination
 
std::vector< std::string > destinations
 
std::vector< std::string > fwkJobReports
 
std::vector< std::string > statistics
 

Static Public Attributes

static const int NO_VALUE_SET = -45654
 

Detailed Description

Definition at line 69 of file MessageLoggerDefaults.h.

Constructor & Destructor Documentation

edm::service::MessageLoggerDefaults::MessageLoggerDefaults ( edm::JobMode  mode = GridJobMode)
inlineexplicit

Definition at line 120 of file MessageLoggerDefaults.h.

References edm::AnalysisJobMode, edm::GridJobMode, hardwireAnalysisJobMode(), hardwireGridJobMode(), hardwireNilJobMode(), hardwireReleaseValidationJobMode(), mode(), edm::NilJobMode, and edm::ReleaseValidationJobMode.

120  {
121  // mode-independent defaults
122 
123  // mode-dependent defaults
124  switch (mode) {
125  // GridJobMode: Intended for automated batch-like processing, in which
126  // the output stream for cerr is routed to an apropro
127  // file. LogInfo messages are enabled, and at least
128  // one such message is delivered from the framework per
129  // event, so this mode is not suitable for many-Hz light
130  // event processing.
131  case GridJobMode:
133  break;
136  break;
137  case AnalysisJobMode:
139  break;
140  case NilJobMode:
142  break;
143  default:
144  // this should never happen! No user error can get here.
145  bool Invalid_JobMode_in_ctor_of_MessageLoggerDefaults = false;
146  assert(Invalid_JobMode_in_ctor_of_MessageLoggerDefaults);
147  } // end of switch on mode
148  }
static edm::JobMode mode(std::string const &jm)

Member Function Documentation

void MessageLoggerDefaults::hardwireAnalysisJobMode ( )

Definition at line 155 of file HardwiredDefaults.cc.

References categories, edm::service::MessageLoggerDefaults::Destination::category, MessageLogger_cfi::cerr, destination, destinations, ecalTB2006H4_GenSimDigiReco_cfg::FwkJob, ecalTB2006H4_GenSimDigiReco_cfg::FwkReport, ecalTB2006H4_GenSimDigiReco_cfg::FwkSummary, edm::service::MessageLoggerDefaults::Category::limit, edm::service::MessageLoggerDefaults::Category::reportEvery, ecalTB2006H4_GenSimDigiReco_cfg::Root_NoDictionary, edm::service::MessageLoggerDefaults::Destination::sev, statistics, edm::service::MessageLoggerDefaults::Destination::threshold, and benchmark_cfg::warnings.

Referenced by MessageLoggerDefaults().

155  {
156  // std::cerr << " ======= hardwireAnalysisJobMode() \n";
157  destinations.push_back("warnings");
158  categories.push_back("FwkJob");
159  categories.push_back("FwkReport");
160  categories.push_back("FwkSummary");
161  categories.push_back("Root_NoDictionary");
162  statistics.push_back("cerr");
163  // cerr destination -
164  // note that using the name cerr is OK since it is not std::cerr
165  // but when we want to use default as a name, we have to be circumspect
166  {
167  Destination warnings; // PSet warnings
168  warnings.threshold = "INFO"; // string threshold = "INFO"
169  Category INFO_limits; // PSet INFO = { ... }
170  INFO_limits.limit = 0; // int32 limit = 0
171  warnings.sev["INFO"] = INFO_limits;
172  Category default_for_dest; // PSet default
173  default_for_dest.limit = 1000; // int32 limit = 1000
174  warnings.category["default"] = default_for_dest;
175  Category FwkReport; // PSet FwkReport
176  FwkReport.limit = 10000000; // int32 limit = 10000000
177  FwkReport.reportEvery = 100; // int32 reportEvery = 100
178  warnings.category["FwkReport"] = FwkReport;
179  Category FwkSummary; // PSet FwkSummary
180  FwkSummary.limit = 10000000; // int32 limit = 10000000
181  warnings.category["FwkSummary"] = FwkSummary;
182  Category FwkJob; // PSet FwkJob
183  FwkJob.limit = 0; // int32 limit = 0
184  warnings.category["FwkJob"] = FwkJob;
185  Category Root_NoDictionary; // PSet Root_NoDictionary
186  Root_NoDictionary.limit = 0; // int32 limit = 0
187  warnings.category["Root_NoDictionary"] = Root_NoDictionary;
188  destination["warnings"] = warnings;
189  }
190  {
191  Destination cerr; // PSet cerr
192  cerr.threshold = "INFO"; // string threshold = "INFO"
193  destination["cerr"] = cerr;
194  }
195  } // hardwireAnalysisJobMode
std::map< std::string, Destination > destination
std::vector< std::string > statistics
std::vector< std::string > destinations
std::vector< std::string > categories
void MessageLoggerDefaults::hardwireGridJobMode ( )

Definition at line 45 of file HardwiredDefaults.cc.

References categories, edm::service::MessageLoggerDefaults::Destination::category, MessageLogger_cfi::cerr, benchmark_cfg::cerr_stats, destination, destinations, MessageLogger_cfi::FrameworkJobReport, ecalTB2006H4_GenSimDigiReco_cfg::FwkJob, ecalTB2006H4_GenSimDigiReco_cfg::FwkReport, ecalTB2006H4_GenSimDigiReco_cfg::FwkSummary, edm::service::MessageLoggerDefaults::Category::limit, edm::service::MessageLoggerDefaults::Destination::output, edm::service::MessageLoggerDefaults::Category::reportEvery, ecalTB2006H4_GenSimDigiReco_cfg::Root_NoDictionary, edm::service::MessageLoggerDefaults::Destination::sev, statistics, and edm::service::MessageLoggerDefaults::Destination::threshold.

Referenced by MessageLoggerDefaults().

45  {
46  // std::cerr << " ======= hardwireGridJobMode() \n";
47  destinations.push_back("cerr");
48  categories.push_back("FwkJob");
49  categories.push_back("FwkReport");
50  categories.push_back("FwkSummary");
51  categories.push_back("Root_NoDictionary");
52  statistics.push_back("cerr_stats");
53  // cerr destination -
54  // note that using the name cerr is OK since it is not std::cerr
55  // but when we want to use default as a name, we have to be circumspect
56  {
57  Destination cerr; // PSet cerr
58  cerr.threshold = "INFO"; // string threshold = "INFO"
59  Category INFO_limits; // PSet INFO = { ... }
60  INFO_limits.limit = 0; // int32 limit = 0
61  cerr.sev["INFO"] = INFO_limits;
62  Category default_for_dest; // PSet default
63  default_for_dest.limit = 10000000; // int32 limit = 10000000
64  cerr.category["default"] = default_for_dest;
65  Category FwkReport; // PSet FwkReport
66  FwkReport.limit = 10000000; // int32 limit = 10000000
67  FwkReport.reportEvery = 1; // int32 reportEvery = 1
68  cerr.category["FwkReport"] = FwkReport;
69  Category FwkSummary; // PSet FwkSummary
70  FwkSummary.limit = 10000000; // int32 limit = 10000000
71  FwkSummary.reportEvery = 1; // int32 reportEvery = 1
72  cerr.category["FwkSummary"] = FwkSummary;
73  Category FwkJob; // PSet FwkJob
74  FwkJob.limit = 0; // int32 limit = 0
75  cerr.category["FwkJob"] = FwkJob;
76  Category Root_NoDictionary; // PSet Root_NoDictionary
77  Root_NoDictionary.limit = 0; // int32 limit = 0
78  cerr.category["Root_NoDictionary"] = Root_NoDictionary;
79  destination["cerr"] = cerr;
80  }
81  {
82  Destination FrameworkJobReport; // PSet FrameworkJobReport
83  Category default_for_dest; // PSet default
84  default_for_dest.limit = 0; // int32 limit = 0
85  FrameworkJobReport.category["default"] = default_for_dest;
86  Category FwkJob; // PSet FwkJob
87  FwkJob.limit = 10000000; // int32 limit = 10000000
88  FrameworkJobReport.category["FwkJob"] = FwkJob;
89  destination["FrameworkJobReport"] = FrameworkJobReport;
90  }
91  {
92  Destination cerr_stats; // PSet cerr_stats
93  cerr_stats.threshold = "WARNING"; // string threshold = "WARNING"
94  cerr_stats.output = "cerr"; // string output = "cerr"
95  destination["cerr_stats"] = cerr_stats;
96  }
97 
98  } // hardwireGridJobMode
std::map< std::string, Destination > destination
std::vector< std::string > statistics
std::vector< std::string > destinations
std::vector< std::string > categories
void MessageLoggerDefaults::hardwireNilJobMode ( )

Definition at line 197 of file HardwiredDefaults.cc.

Referenced by MessageLoggerDefaults().

197  {
198  // std::cerr << " ======= hardwireNilJobMode() \n";
199  } // hardwireNilJobMode
void MessageLoggerDefaults::hardwireReleaseValidationJobMode ( )

Definition at line 100 of file HardwiredDefaults.cc.

References categories, edm::service::MessageLoggerDefaults::Destination::category, MessageLogger_cfi::cerr, benchmark_cfg::cerr_stats, destination, destinations, MessageLogger_cfi::FrameworkJobReport, ecalTB2006H4_GenSimDigiReco_cfg::FwkJob, ecalTB2006H4_GenSimDigiReco_cfg::FwkReport, ecalTB2006H4_GenSimDigiReco_cfg::FwkSummary, edm::service::MessageLoggerDefaults::Category::limit, edm::service::MessageLoggerDefaults::Destination::output, edm::service::MessageLoggerDefaults::Category::reportEvery, ecalTB2006H4_GenSimDigiReco_cfg::Root_NoDictionary, edm::service::MessageLoggerDefaults::Destination::sev, statistics, and edm::service::MessageLoggerDefaults::Destination::threshold.

Referenced by MessageLoggerDefaults().

100  {
101  // std::cerr << " ======= hardwireReleaseValidationJobMode() \n";
102  destinations.push_back("cerr");
103  categories.push_back("FwkJob");
104  categories.push_back("FwkReport");
105  categories.push_back("FwkSummary");
106  categories.push_back("Root_NoDictionary");
107  statistics.push_back("cerr_stats");
108  // cerr destination -
109  // note that using the name cerr is OK since it is not std::cerr
110  // but when we want to use default as a name, we have to be circumspect
111  {
112  Destination cerr; // PSet cerr
113  cerr.threshold = "INFO"; // string threshold = "INFO"
114  Category INFO_limits; // PSet INFO = { ... }
115  INFO_limits.limit = 5; // int32 limit = 5
116  cerr.sev["INFO"] = INFO_limits;
117  Category default_for_dest; // PSet default
118  default_for_dest.limit = 10000000; // int32 limit = 10000000
119  cerr.category["default"] = default_for_dest;
120  Category FwkReport; // PSet FwkReport
121  FwkReport.limit = 10000000; // int32 limit = 10000000
122  FwkReport.reportEvery = 1; // int32 reportEvery = 1
123  cerr.category["FwkReport"] = FwkReport;
124  Category FwkSummary; // PSet FwkSummary
125  FwkSummary.limit = 10000000; // int32 limit = 10000000
126  FwkSummary.reportEvery = 1; // int32 reportEvery = 1
127  cerr.category["FwkSummary"] = FwkSummary;
128  Category FwkJob; // PSet FwkJob
129  FwkJob.limit = 0; // int32 limit = 0
130  cerr.category["FwkJob"] = FwkJob;
131  Category Root_NoDictionary; // PSet Root_NoDictionary
132  Root_NoDictionary.limit = 0; // int32 limit = 0
133  cerr.category["Root_NoDictionary"] = Root_NoDictionary;
134  destination["cerr"] = cerr;
135  }
136  {
137  Destination FrameworkJobReport; // PSet FrameworkJobReport
138  Category default_for_dest; // PSet default
139  default_for_dest.limit = 0; // int32 limit = 0
140  FrameworkJobReport.category["default"] = default_for_dest;
141  Category FwkJob; // PSet FwkJob
142  FwkJob.limit = 10000000; // int32 limit = 10000000
143  FrameworkJobReport.category["FwkJob"] = FwkJob;
144  destination["FrameworkJobReport"] = FrameworkJobReport;
145  }
146  {
147  Destination cerr_stats; // PSet cerr_stats
148  cerr_stats.threshold = "INFO"; // string threshold = "INFO"
149  cerr_stats.output = "cerr"; // string output = "cerr"
150  destination["cerr_stats"] = cerr_stats;
151  }
152 
153  } // hardwireReleaseValidationJobMode
std::map< std::string, Destination > destination
std::vector< std::string > statistics
std::vector< std::string > destinations
std::vector< std::string > categories
int MessageLoggerDefaults::limit ( std::string const &  dest,
std::string const &  cat 
)

Definition at line 52 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, edm::service::MessageLoggerDefaults::Destination::category, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, and NO_VALUE_SET.

52  {
53  int lim = NO_VALUE_SET;
54  std::map<std::string, Destination>::iterator d = destination.find(dest);
55  if (d != destination.end()) {
56  Destination& destin = d->second;
57  std::map<std::string, Category>::iterator c = destin.category.find(cat);
58  if (c != destin.category.end()) {
59  lim = c->second.limit;
60  }
61  }
62  std::map<std::string, Destination>::iterator dd = destination.find("default");
63  if (lim == NO_VALUE_SET) {
64  if (dd != destination.end()) {
65  Destination& def_destin = dd->second;
66  std::map<std::string, Category>::iterator c = def_destin.category.find(cat);
67  if (c != def_destin.category.end()) {
68  lim = c->second.limit;
69  }
70  }
71  }
72  if (lim == NO_VALUE_SET) {
73  if (d != destination.end()) {
74  Destination& destin = d->second;
75  std::map<std::string, Category>::iterator cd = destin.category.find("default");
76  if (cd != destin.category.end()) {
77  lim = cd->second.limit;
78  }
79  }
80  }
81  if (lim == NO_VALUE_SET) {
82  if (dd != destination.end()) {
83  Destination& def_destin = dd->second;
84  std::map<std::string, Category>::iterator cdd = def_destin.category.find("default");
85  if (cdd != def_destin.category.end()) {
86  lim = cdd->second.limit;
87  }
88  }
89  }
90  return lim;
91  } // limit
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401
edm::JobMode MessageLoggerDefaults::mode ( std::string const &  jm)
static

Definition at line 30 of file HardwiredDefaults.cc.

References edm::AnalysisJobMode, MessageLogger_cfi::cerr, edm::GridJobMode, edm::NilJobMode, and edm::ReleaseValidationJobMode.

Referenced by MessageLoggerDefaults(), edm::service::ThreadSafeLogMessageLoggerScribe::runCommand(), and edm::service::MessageLoggerScribe::runCommand().

30  {
31  if (jm.empty())
32  return GridJobMode; // no -mode option = grid
33  if (jm == "grid")
34  return GridJobMode;
35  if (jm == "infos")
37  if (jm == "analysis")
38  return AnalysisJobMode;
39  if (jm == "nil")
40  return NilJobMode;
41  std::cerr << "Unrecognized Job Mode Option: " << jm << " -- defaulting to analysis mode ";
42  return AnalysisJobMode;
43  }
std::string MessageLoggerDefaults::output ( std::string const &  dest)

Definition at line 41 of file MessageLoggerDefaults.cc.

References edmIntegrityCheck::d, destination, edm::service::MessageLoggerDefaults::Destination::output, and AlCaHLTBitMon_QueryRunRegistry::string.

41  {
42  std::string otpt = "";
43  std::map<std::string, Destination>::iterator d = destination.find(dest);
44  if (d != destination.end()) {
45  Destination& destin = d->second;
46  otpt = destin.output;
47  }
48  // There is no default output; so if we did not find the dest, then return ""
49  return otpt;
50  } // output
std::map< std::string, Destination > destination
int MessageLoggerDefaults::reportEvery ( std::string const &  dest,
std::string const &  cat 
)

Definition at line 93 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, edm::service::MessageLoggerDefaults::Destination::category, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, and NO_VALUE_SET.

93  {
94  int re = NO_VALUE_SET;
95  std::map<std::string, Destination>::iterator d = destination.find(dest);
96  if (d != destination.end()) {
97  Destination& destin = d->second;
98  std::map<std::string, Category>::iterator c = destin.category.find(cat);
99  if (c != destin.category.end()) {
100  re = c->second.reportEvery;
101  }
102  }
103  std::map<std::string, Destination>::iterator dd = destination.find("default");
104  if (re == NO_VALUE_SET) {
105  if (dd != destination.end()) {
106  Destination& def_destin = dd->second;
107  std::map<std::string, Category>::iterator c = def_destin.category.find(cat);
108  if (c != def_destin.category.end()) {
109  re = c->second.reportEvery;
110  }
111  }
112  }
113  if (re == NO_VALUE_SET) {
114  if (d != destination.end()) {
115  Destination& destin = d->second;
116  std::map<std::string, Category>::iterator cd = destin.category.find("default");
117  if (cd != destin.category.end()) {
118  re = cd->second.reportEvery;
119  }
120  }
121  }
122  if (re == NO_VALUE_SET) {
123  if (dd != destination.end()) {
124  Destination& def_destin = dd->second;
125  std::map<std::string, Category>::iterator cdd = def_destin.category.find("default");
126  if (cdd != def_destin.category.end()) {
127  re = cdd->second.reportEvery;
128  }
129  }
130  }
131  return re;
132  } // reportEvery
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401
int MessageLoggerDefaults::sev_limit ( std::string const &  dest,
std::string const &  sev 
)

Definition at line 175 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, NO_VALUE_SET, and edm::service::MessageLoggerDefaults::Destination::sev.

175  {
176  int lim = NO_VALUE_SET;
177  std::map<std::string, Destination>::iterator d = destination.find(dest);
178  if (d != destination.end()) {
179  Destination& destin = d->second;
180  std::map<std::string, Category>::iterator c = destin.sev.find(cat);
181  if (c != destin.sev.end()) {
182  lim = c->second.limit;
183  }
184  }
185  std::map<std::string, Destination>::iterator dd = destination.find("default");
186  if (lim == NO_VALUE_SET) {
187  if (dd != destination.end()) {
188  Destination& def_destin = dd->second;
189  std::map<std::string, Category>::iterator c = def_destin.sev.find(cat);
190  if (c != def_destin.sev.end()) {
191  lim = c->second.limit;
192  }
193  }
194  }
195  if (lim == NO_VALUE_SET) {
196  if (d != destination.end()) {
197  Destination& destin = d->second;
198  std::map<std::string, Category>::iterator cd = destin.sev.find("default");
199  if (cd != destin.sev.end()) {
200  lim = cd->second.limit;
201  }
202  }
203  }
204  if (lim == NO_VALUE_SET) {
205  if (dd != destination.end()) {
206  Destination& def_destin = dd->second;
207  std::map<std::string, Category>::iterator cdd = def_destin.sev.find("default");
208  if (cdd != def_destin.sev.end()) {
209  lim = cdd->second.limit;
210  }
211  }
212  }
213  return lim;
214  } // sev_limit
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401
int MessageLoggerDefaults::sev_reportEvery ( std::string const &  dest,
std::string const &  sev 
)

Definition at line 216 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, NO_VALUE_SET, and edm::service::MessageLoggerDefaults::Destination::sev.

216  {
217  int re = NO_VALUE_SET;
218  std::map<std::string, Destination>::iterator d = destination.find(dest);
219  if (d != destination.end()) {
220  Destination& destin = d->second;
221  std::map<std::string, Category>::iterator c = destin.sev.find(cat);
222  if (c != destin.sev.end()) {
223  re = c->second.reportEvery;
224  }
225  }
226  std::map<std::string, Destination>::iterator dd = destination.find("default");
227  if (re == NO_VALUE_SET) {
228  if (dd != destination.end()) {
229  Destination& def_destin = dd->second;
230  std::map<std::string, Category>::iterator c = def_destin.sev.find(cat);
231  if (c != def_destin.sev.end()) {
232  re = c->second.reportEvery;
233  }
234  }
235  }
236  if (re == NO_VALUE_SET) {
237  if (d != destination.end()) {
238  Destination& destin = d->second;
239  std::map<std::string, Category>::iterator cd = destin.sev.find("default");
240  if (cd != destin.sev.end()) {
241  re = cd->second.reportEvery;
242  }
243  }
244  }
245  if (re == NO_VALUE_SET) {
246  if (dd != destination.end()) {
247  Destination& def_destin = dd->second;
248  std::map<std::string, Category>::iterator cdd = def_destin.sev.find("default");
249  if (cdd != def_destin.sev.end()) {
250  re = cdd->second.reportEvery;
251  }
252  }
253  }
254  return re;
255  } // sev_reportEvery
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401
int MessageLoggerDefaults::sev_timespan ( std::string const &  dest,
std::string const &  sev 
)

Definition at line 257 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, NO_VALUE_SET, and edm::service::MessageLoggerDefaults::Destination::sev.

257  {
258  int tim = NO_VALUE_SET;
259  std::map<std::string, Destination>::iterator d = destination.find(dest);
260  if (d != destination.end()) {
261  Destination& destin = d->second;
262  std::map<std::string, Category>::iterator c = destin.sev.find(cat);
263  if (c != destin.sev.end()) {
264  tim = c->second.timespan;
265  }
266  }
267  std::map<std::string, Destination>::iterator dd = destination.find("default");
268  if (tim == NO_VALUE_SET) {
269  if (dd != destination.end()) {
270  Destination& def_destin = dd->second;
271  std::map<std::string, Category>::iterator c = def_destin.sev.find(cat);
272  if (c != def_destin.sev.end()) {
273  tim = c->second.timespan;
274  }
275  }
276  }
277  if (tim == NO_VALUE_SET) {
278  if (d != destination.end()) {
279  Destination& destin = d->second;
280  std::map<std::string, Category>::iterator cd = destin.sev.find("default");
281  if (cd != destin.sev.end()) {
282  tim = cd->second.timespan;
283  }
284  }
285  }
286  if (tim == NO_VALUE_SET) {
287  if (dd != destination.end()) {
288  Destination& def_destin = dd->second;
289  std::map<std::string, Category>::iterator cdd = def_destin.sev.find("default");
290  if (cdd != def_destin.sev.end()) {
291  tim = cdd->second.timespan;
292  }
293  }
294  }
295  return tim;
296  } // sev_timespan
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401
std::string MessageLoggerDefaults::threshold ( std::string const &  dest)

Definition at line 24 of file MessageLoggerDefaults.cc.

References edmIntegrityCheck::d, createTree::dd, destination, AlCaHLTBitMon_QueryRunRegistry::string, and edm::service::MessageLoggerDefaults::Destination::threshold.

24  {
25  std::string thr = "";
26  std::map<std::string, Destination>::iterator d = destination.find(dest);
27  if (d != destination.end()) {
28  Destination& destin = d->second;
29  thr = destin.threshold;
30  }
31  std::map<std::string, Destination>::iterator dd = destination.find("default");
32  if (thr.empty()) {
33  if (dd != destination.end()) {
34  Destination& def_destin = dd->second;
35  thr = def_destin.threshold;
36  }
37  }
38  return thr;
39  } // threshold
std::map< std::string, Destination > destination
int MessageLoggerDefaults::timespan ( std::string const &  dest,
std::string const &  cat 
)

Definition at line 134 of file MessageLoggerDefaults.cc.

References EnergyCorrector::c, edm::service::MessageLoggerDefaults::Destination::category, hippyaddtobaddatafiles::cd(), edmIntegrityCheck::d, createTree::dd, destination, and NO_VALUE_SET.

134  {
135  int tim = NO_VALUE_SET;
136  std::map<std::string, Destination>::iterator d = destination.find(dest);
137  if (d != destination.end()) {
138  Destination& destin = d->second;
139  std::map<std::string, Category>::iterator c = destin.category.find(cat);
140  if (c != destin.category.end()) {
141  tim = c->second.timespan;
142  }
143  }
144  std::map<std::string, Destination>::iterator dd = destination.find("default");
145  if (tim == NO_VALUE_SET) {
146  if (dd != destination.end()) {
147  Destination& def_destin = dd->second;
148  std::map<std::string, Category>::iterator c = def_destin.category.find(cat);
149  if (c != def_destin.category.end()) {
150  tim = c->second.timespan;
151  }
152  }
153  }
154  if (tim == NO_VALUE_SET) {
155  if (d != destination.end()) {
156  Destination& destin = d->second;
157  std::map<std::string, Category>::iterator cd = destin.category.find("default");
158  if (cd != destin.category.end()) {
159  tim = cd->second.timespan;
160  }
161  }
162  }
163  if (tim == NO_VALUE_SET) {
164  if (dd != destination.end()) {
165  Destination& def_destin = dd->second;
166  std::map<std::string, Category>::iterator cdd = def_destin.category.find("default");
167  if (cdd != def_destin.category.end()) {
168  tim = cdd->second.timespan;
169  }
170  }
171  }
172  return tim;
173  } // timespan
std::map< std::string, Destination > destination
def cat(path)
Definition: eostools.py:401

Member Data Documentation

std::vector<std::string> edm::service::MessageLoggerDefaults::categories
std::map<std::string, Destination> edm::service::MessageLoggerDefaults::destination
std::vector<std::string> edm::service::MessageLoggerDefaults::destinations
std::vector<std::string> edm::service::MessageLoggerDefaults::fwkJobReports

Definition at line 92 of file MessageLoggerDefaults.h.

const int edm::service::MessageLoggerDefaults::NO_VALUE_SET = -45654
static
std::vector<std::string> edm::service::MessageLoggerDefaults::statistics