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("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
99 
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
154 
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
196 
198  // std::cerr << " ======= hardwireNilJobMode() \n";
199  } // hardwireNilJobMode
200 
201  } // end of namespace service
202 } // end of namespace edm
std::map< std::string, Destination > destination
std::vector< std::string > statistics
std::vector< std::string > destinations
static edm::JobMode mode(std::string const &jm)
HLT enums.
JobMode
Definition: JobMode.h:15
std::vector< std::string > categories