CMS 3D CMS Logo

HardwiredDefaults.cc
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 //
3 // HardwiredDefaults.cc
4 //
5 // All the hardwired defaults, organized by which JobMode they apply to
6 //
7 // JobModes:
8 // JobModeGrid
9 // JobModeAnalysis
10 //
11 // Initial Version: mf 6/18/07
12 //
13 // Changes:
14 //
15 // 7/7/08 mf Statistics with different threshold (WARNING level)
16 //
17 // 7/10/08 mf New mode: infos --> ReleaseValidationJobMode
18 // Statistics at INFO threshold
19 // Default limit for INFO at 5 rather than 0
20 //
21 // ----------------------------------------------------------------------
22 
24 
25 #include <iostream>
26 
27 namespace edm {
28  namespace service {
29 
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  }
44 
46  // std::cerr << " ======= hardwireGridJobMode() \n";
47  destinations.push_back("cerr");
48  categories.push_back("FwkReport");
49  categories.push_back("FwkSummary");
50  categories.push_back("Root_NoDictionary");
51  statistics.push_back("cerr_stats");
52  // cerr destination -
53  // note that using the name cerr is OK since it is not std::cerr
54  // but when we want to use default as a name, we have to be circumspect
55  {
56  Destination cerr; // PSet cerr
57  cerr.threshold = "INFO"; // string threshold = "INFO"
58  Category INFO_limits; // PSet INFO = { ... }
59  INFO_limits.limit = 0; // int32 limit = 0
60  cerr.sev["INFO"] = INFO_limits;
61  Category default_for_dest; // PSet default
62  default_for_dest.limit = 10000000; // int32 limit = 10000000
63  cerr.category["default"] = default_for_dest;
64  Category FwkReport; // PSet FwkReport
65  FwkReport.limit = 10000000; // int32 limit = 10000000
66  FwkReport.reportEvery = 1; // int32 reportEvery = 1
67  cerr.category["FwkReport"] = FwkReport;
68  Category FwkSummary; // PSet FwkSummary
69  FwkSummary.limit = 10000000; // int32 limit = 10000000
70  FwkSummary.reportEvery = 1; // int32 reportEvery = 1
71  cerr.category["FwkSummary"] = FwkSummary;
72  Category Root_NoDictionary; // PSet Root_NoDictionary
73  Root_NoDictionary.limit = 0; // int32 limit = 0
74  cerr.category["Root_NoDictionary"] = Root_NoDictionary;
75  destination["cerr"] = cerr;
76  }
77  {
78  Destination cerr_stats; // PSet cerr_stats
79  cerr_stats.threshold = "WARNING"; // string threshold = "WARNING"
80  cerr_stats.output = "cerr"; // string output = "cerr"
81  destination["cerr_stats"] = cerr_stats;
82  }
83 
84  } // hardwireGridJobMode
85 
87  // std::cerr << " ======= hardwireReleaseValidationJobMode() \n";
88  destinations.push_back("cerr");
89  categories.push_back("FwkReport");
90  categories.push_back("FwkSummary");
91  categories.push_back("Root_NoDictionary");
92  statistics.push_back("cerr_stats");
93  // cerr destination -
94  // note that using the name cerr is OK since it is not std::cerr
95  // but when we want to use default as a name, we have to be circumspect
96  {
97  Destination cerr; // PSet cerr
98  cerr.threshold = "INFO"; // string threshold = "INFO"
99  Category INFO_limits; // PSet INFO = { ... }
100  INFO_limits.limit = 5; // int32 limit = 5
101  cerr.sev["INFO"] = INFO_limits;
102  Category default_for_dest; // PSet default
103  default_for_dest.limit = 10000000; // int32 limit = 10000000
104  cerr.category["default"] = default_for_dest;
105  Category FwkReport; // PSet FwkReport
106  FwkReport.limit = 10000000; // int32 limit = 10000000
107  FwkReport.reportEvery = 1; // int32 reportEvery = 1
108  cerr.category["FwkReport"] = FwkReport;
109  Category FwkSummary; // PSet FwkSummary
110  FwkSummary.limit = 10000000; // int32 limit = 10000000
111  FwkSummary.reportEvery = 1; // int32 reportEvery = 1
112  cerr.category["FwkSummary"] = FwkSummary;
113  Category Root_NoDictionary; // PSet Root_NoDictionary
114  Root_NoDictionary.limit = 0; // int32 limit = 0
115  cerr.category["Root_NoDictionary"] = Root_NoDictionary;
116  destination["cerr"] = cerr;
117  }
118  {
119  Destination cerr_stats; // PSet cerr_stats
120  cerr_stats.threshold = "INFO"; // string threshold = "INFO"
121  cerr_stats.output = "cerr"; // string output = "cerr"
122  destination["cerr_stats"] = cerr_stats;
123  }
124 
125  } // hardwireReleaseValidationJobMode
126 
128  // std::cerr << " ======= hardwireAnalysisJobMode() \n";
129  destinations.push_back("warnings");
130  categories.push_back("FwkReport");
131  categories.push_back("FwkSummary");
132  categories.push_back("Root_NoDictionary");
133  statistics.push_back("cerr");
134  // cerr destination -
135  // note that using the name cerr is OK since it is not std::cerr
136  // but when we want to use default as a name, we have to be circumspect
137  {
138  Destination warnings; // PSet warnings
139  warnings.threshold = "INFO"; // string threshold = "INFO"
140  Category INFO_limits; // PSet INFO = { ... }
141  INFO_limits.limit = 0; // int32 limit = 0
142  warnings.sev["INFO"] = INFO_limits;
143  Category default_for_dest; // PSet default
144  default_for_dest.limit = 1000; // int32 limit = 1000
145  warnings.category["default"] = default_for_dest;
146  Category FwkReport; // PSet FwkReport
147  FwkReport.limit = 10000000; // int32 limit = 10000000
148  FwkReport.reportEvery = 100; // int32 reportEvery = 100
149  warnings.category["FwkReport"] = FwkReport;
150  Category FwkSummary; // PSet FwkSummary
151  FwkSummary.limit = 10000000; // int32 limit = 10000000
152  warnings.category["FwkSummary"] = FwkSummary;
153  Category Root_NoDictionary; // PSet Root_NoDictionary
154  Root_NoDictionary.limit = 0; // int32 limit = 0
155  warnings.category["Root_NoDictionary"] = Root_NoDictionary;
156  destination["warnings"] = warnings;
157  }
158  {
159  Destination cerr; // PSet cerr
160  cerr.threshold = "INFO"; // string threshold = "INFO"
161  destination["cerr"] = cerr;
162  }
163  } // hardwireAnalysisJobMode
164 
166  // std::cerr << " ======= hardwireNilJobMode() \n";
167  } // hardwireNilJobMode
168 
169  } // end of namespace service
170 } // end of namespace edm
debug_messages_cfi.cerr_stats
cerr_stats
Definition: debug_messages_cfi.py:98
service
Definition: service.py:1
edm::service::MessageLoggerDefaults::Category
Definition: MessageLoggerDefaults.h:73
edm::service::MessageLoggerDefaults::hardwireReleaseValidationJobMode
void hardwireReleaseValidationJobMode()
Definition: HardwiredDefaults.cc:86
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::service::MessageLoggerDefaults::mode
static edm::JobMode mode(std::string const &jm)
Definition: HardwiredDefaults.cc:30
edm::service::MessageLoggerDefaults::Destination
Definition: MessageLoggerDefaults.h:81
MessageLogger_cfi.Root_NoDictionary
Root_NoDictionary
Definition: MessageLogger_cfi.py:76
edm::service::MessageLoggerDefaults::categories
std::vector< std::string > categories
Definition: MessageLoggerDefaults.h:90
edm::service::MessageLoggerDefaults::hardwireAnalysisJobMode
void hardwireAnalysisJobMode()
Definition: HardwiredDefaults.cc:127
MessageLogger_cfi.FwkSummary
FwkSummary
Definition: MessageLogger_cfi.py:79
edm::service::MessageLoggerDefaults::destination
std::map< std::string, Destination > destination
Definition: MessageLoggerDefaults.h:93
MessageLogger_cff.FwkReport
FwkReport
Definition: MessageLogger_cff.py:11
edm::AnalysisJobMode
Definition: JobMode.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::GridJobMode
Definition: JobMode.h:15
edm::service::MessageLoggerDefaults::Category::limit
int limit
Definition: MessageLoggerDefaults.h:75
debug_messages_cfi.warnings
warnings
Definition: debug_messages_cfi.py:48
edm::service::MessageLoggerDefaults::hardwireNilJobMode
void hardwireNilJobMode()
Definition: HardwiredDefaults.cc:165
edm::ReleaseValidationJobMode
Definition: JobMode.h:15
edm::NilJobMode
Definition: JobMode.h:15
edm::JobMode
JobMode
Definition: JobMode.h:15
edm::service::MessageLoggerDefaults::statistics
std::vector< std::string > statistics
Definition: MessageLoggerDefaults.h:92
edm::service::MessageLoggerDefaults::destinations
std::vector< std::string > destinations
Definition: MessageLoggerDefaults.h:91
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8
MessageLoggerDefaults.h
edm::service::MessageLoggerDefaults::hardwireGridJobMode
void hardwireGridJobMode()
Definition: HardwiredDefaults.cc:45