CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Static Private Member Functions | Private Attributes
LogErrorEventFilter Class Reference
Inheritance diagram for LogErrorEventFilter:
edm::global::EDFilter< edm::RunCache< leef::RunErrors >, edm::LuminosityBlockCache< LumiErrors >, edm::EndLuminosityBlockProducer > edm::global::EDFilterBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void endJob () override
 
bool filter (edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
 
std::shared_ptr< LumiErrorsglobalBeginLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &iSetup) const override
 
std::shared_ptr< RunErrorsglobalBeginRun (const edm::Run &run, const edm::EventSetup &iSetup) const override
 
void globalEndLuminosityBlock (const edm::LuminosityBlock &lumi, const edm::EventSetup &iSetup) const override
 
void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, const edm::EventSetup &iSetup) const override
 
void globalEndRun (const edm::Run &run, const edm::EventSetup &iSetup) const override
 
 LogErrorEventFilter (const edm::ParameterSet &iConfig)
 
 ~LogErrorEventFilter () override
 
- Public Member Functions inherited from edm::global::EDFilter< edm::RunCache< leef::RunErrors >, edm::LuminosityBlockCache< LumiErrors >, edm::EndLuminosityBlockProducer >
 EDFilter ()=default
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDFilterBase
 EDFilterBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilterBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

typedef edm::ErrorSummaryEntry Error
 
typedef std::vector< edm::ErrorSummaryEntryErrorList
 

Static Private Member Functions

template<typename Collection >
static void increment (ErrorSet &scoreboard, Collection &list)
 
template<typename Collection >
static void print (const Collection &errors)
 
static std::unique_ptr< ErrorListserialize (const ErrorSet &set)
 

Private Attributes

std::set< std::string > categoriesToIgnore_
 
std::set< std::string > categoriesToWatch_
 
ErrorSet errorCollectionAll_
 
bool forcedValue_
 
size_t maxSavedEventsPerLumi_
 
std::set< std::string > modulesToIgnore_
 
std::set< std::string > modulesToWatch_
 
bool readSummaryMode_
 
edm::InputTag src_
 
edm::EDGetTokenT< ErrorListsrcT_
 
std::atomic< bool > statsGuard_
 
std::map< std::pair< uint32_t, uint32_t >, std::pair< size_t, size_t > > statsPerLumi_
 
std::map< uint32_t, std::pair< size_t, size_t > > statsPerRun_
 
bool taggedMode_
 
double thresholdPerLumi_
 
double thresholdPerRun_
 
bool verbose_
 
bool veryVerbose_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDFilterBase
typedef EDFilterBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDFilterBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 83 of file LogErrorEventFilter.cc.

Member Typedef Documentation

Definition at line 99 of file LogErrorEventFilter.cc.

Definition at line 100 of file LogErrorEventFilter.cc.

Constructor & Destructor Documentation

LogErrorEventFilter::LogErrorEventFilter ( const edm::ParameterSet iConfig)
explicit

Definition at line 126 of file LogErrorEventFilter.cc.

References myMessageLogger_cff::categories, categoriesToIgnore_, categoriesToWatch_, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), modulesToIgnore_, and modulesToWatch_.

126  :
127  src_(iConfig.getParameter<edm::InputTag>("src")),
128  srcT_(consumes<ErrorList>(iConfig.getParameter<edm::InputTag>("src"))),
129  readSummaryMode_(iConfig.existsAs<bool>("readSummaryMode") ? iConfig.getParameter<bool>("readSummaryMode") : false),
130  thresholdPerLumi_(iConfig.getParameter<double>("maxErrorFractionInLumi")),
131  thresholdPerRun_(iConfig.getParameter<double>("maxErrorFractionInRun")),
132  maxSavedEventsPerLumi_(iConfig.getParameter<uint32_t>("maxSavedEventsPerLumiAndError")),
133  verbose_(iConfig.getUntrackedParameter<bool>("verbose", false)),
134  veryVerbose_(iConfig.getUntrackedParameter<bool>("veryVerbose", false)),
135  taggedMode_(iConfig.getUntrackedParameter<bool>("taggedMode", false)),
136  forcedValue_(iConfig.getUntrackedParameter<bool>("forcedValue", true))
137 {
138  produces<ErrorList, edm::Transition::EndLuminosityBlock>();
139  produces<int, edm::Transition::EndLuminosityBlock>("pass");
140  produces<int, edm::Transition::EndLuminosityBlock>("fail");
141  //produces<ErrorList, edm::InRun>();
142  produces<bool>();
143 
144  if (iConfig.existsAs<std::vector<std::string> >("modulesToWatch")) {
145  std::vector<std::string> modules = iConfig.getParameter<std::vector<std::string> >("modulesToWatch");
146  if (!(modules.size() == 1 && modules[0] == "*")) {
147  modulesToWatch_.insert(modules.begin(), modules.end());
148  }
149  }
150  if (iConfig.existsAs<std::vector<std::string> >("modulesToIgnore")) {
151  std::vector<std::string> modules = iConfig.getParameter<std::vector<std::string> >("modulesToIgnore");
152  if (!(modules.size() == 1 && modules[0] == "*")) {
153  modulesToIgnore_.insert(modules.begin(), modules.end());
154  }
155  }
156  if (iConfig.existsAs<std::vector<std::string> >("categoriesToWatch")) {
157  std::vector<std::string> categories = iConfig.getParameter<std::vector<std::string> >("categoriesToWatch");
158  if (!(categories.size() == 1 && categories[0] == "*")) {
159  categoriesToWatch_.insert(categories.begin(), categories.end());
160  }
161  }
162  if (iConfig.existsAs<std::vector<std::string> >("categoriesToIgnore")) {
163  std::vector<std::string> categories = iConfig.getParameter<std::vector<std::string> >("categoriesToIgnore");
164  if (!(categories.size() == 1 && categories[0] == "*")) {
165  categoriesToIgnore_.insert(categories.begin(), categories.end());
166  }
167  }
168  //std::ostream_iterator<std::string> dump(std::cout, ", ");
169  //std::cout << "\nWatch modules: " ; std::copy(modulesToWatch_.begin(), modulesToWatch_.end(), dump);
170  //std::cout << "\nIgnore modules: " ; std::copy(modulesToIgnore_.begin(), modulesToIgnore_.end(), dump);
171  //std::cout << "\nIgnore categories: " ; std::copy(categoriesToIgnore_.begin(), categoriesToIgnore_.end(), dump);
172  //std::cout << "\nWatch categories: " ; std::copy(categoriesToWatch_.begin(), categoriesToWatch_.end(), dump);
173  //std::cout << std::endl;
174 
175 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::set< std::string > categoriesToIgnore_
std::set< std::string > modulesToWatch_
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:161
std::set< std::string > categoriesToWatch_
std::set< std::string > modulesToIgnore_
edm::EDGetTokenT< ErrorList > srcT_
LogErrorEventFilter::~LogErrorEventFilter ( )
inlineoverride

Definition at line 88 of file LogErrorEventFilter.cc.

References ALCARECOTkAlBeamHalo_cff::filter, iEvent, and writedatasetfile::run.

88 { }

Member Function Documentation

void LogErrorEventFilter::endJob ( void  )
overridevirtual

Reimplemented from edm::global::EDFilterBase.

Definition at line 270 of file LogErrorEventFilter.cc.

References counter, gather_cfg::cout, errorCollectionAll_, funct::fract(), print(), statsGuard_, statsPerLumi_, statsPerRun_, thresholdPerLumi_, thresholdPerRun_, and verbose_.

270  {
271  if (verbose_) {
272  std::cout << "\n === REPORT FOR JOB === " << std::endl;
273  //synchronizes statsPerRun_ and errorCollectionAll_
274  auto guard = make_guard(statsGuard_);
276 
277  typedef std::pair<size_t,size_t> counter;
278 
279  std::cout << "\n === SCOREBOARD PER RUN === " << std::endl;
280  typedef std::pair<uint32_t, counter> hitRun;
281  for(auto const& hit : statsPerRun_) {
282  double fract = hit.second.second/double(hit.second.first + hit.second.second);
283  printf("run %6d: fail %7zu, pass %7zu, fraction %7.3f%%%s\n", hit.first, hit.second.second, hit.second.first, fract*100., (fract >= thresholdPerRun_ ? " (run excluded from summary list)" : ""));
284  }
285 
286  std::cout << "\n === SCOREBOARD PER LUMI === " << std::endl;
287  typedef std::pair<std::pair<uint32_t,uint32_t>, counter> hitLumi;
288  for(auto const& hit : statsPerLumi_) {
289  double fract = hit.second.second/double(hit.second.first + hit.second.second);
290  printf("run %6d, lumi %4d: fail %zu, pass %zu, fraction %7.3f%%%s\n", hit.first.first, hit.first.second, hit.second.second, hit.second.first, fract*100., (fract >= thresholdPerLumi_ ? " (lumi excluded from run list)" : ""));
291  }
292  }
293 }
static void print(const Collection &errors)
std::atomic< bool > statsGuard_
const Fraction< n, m >::type & fract()
Definition: Fraction.h:37
std::map< uint32_t, std::pair< size_t, size_t > > statsPerRun_
std::map< std::pair< uint32_t, uint32_t >, std::pair< size_t, size_t > > statsPerLumi_
static std::atomic< unsigned int > counter
bool LogErrorEventFilter::filter ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
override

Definition at line 296 of file LogErrorEventFilter.cc.

References categoriesToIgnore_, categoriesToWatch_, gather_cfg::cout, benchmark_cfg::errors, edm::EventID::event(), cmsPerfPublish::fail(), forcedValue_, edm::Event::getByToken(), edm::Event::getLuminosityBlock(), edm::Event::getRun(), edm::EventBase::id(), edm::LuminosityBlock::index(), edm::Run::index(), edm::EventBase::luminosityBlock(), maxSavedEventsPerLumi_, modulesToIgnore_, modulesToWatch_, print(), edm::Event::put(), readSummaryMode_, mps_fire::result, edm::Event::run(), cuy::save, srcT_, taggedMode_, and veryVerbose_.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

296  {
297  if (readSummaryMode_) return true;
298 
299  bool fail = false, save = false;
300 
302  iEvent.getByToken(srcT_, errors);
303 
304  auto runC = runCache(iEvent.getRun().index());
305  auto lumiC = luminosityBlockCache(iEvent.getLuminosityBlock().index());
306 
307  if (errors->empty()) {
308  ++(runC->npass_);
309  ++(lumiC->npass_);
310  iEvent.put(std::make_unique<bool>(false));
311 
312  if(taggedMode_) return forcedValue_;
313  return false;
314  }
315 
316  for(auto const& err : *errors) {
317  if (!modulesToWatch_.empty() && (modulesToWatch_.count(err.module) == 0)) continue;
318  if (!categoriesToWatch_.empty() && (categoriesToWatch_.count(err.category) == 0)) continue;
319  if (!modulesToIgnore_.empty() && (modulesToIgnore_.count(err.module) != 0)) continue;
320  if (!categoriesToIgnore_.empty() && (categoriesToIgnore_.count(err.category) != 0)) continue;
321 
322  fail = true;
323 
324  //synchronize errorCollection_
325  auto guard = make_guard(lumiC->collectionGuard_);
326 
327  std::pair<ErrorSet::iterator, bool> result = lumiC->errorCollection_.insert(err);
328  if (!result.second) { // already there
329  // need the const_cast as set elements are const
330  const_cast<unsigned int &>(result.first->count) += err.count;
331  if (result.first->count < maxSavedEventsPerLumi_) save = true;
332  } else {
333  save = true;
334  }
335 
336  }
337  if (save && veryVerbose_) {
338  std::cout << "\n === REPORT FOR EVENT " << iEvent.id().event() << " RUN " << iEvent.run() << " LUMI " << iEvent.luminosityBlock() << " === " << std::endl;
339  print(*errors);
340  }
341 
342 
343  if (fail) { ++(lumiC->nfail_); ++(runC->nfail_); } else { ++(runC->npass_); ++(lumiC->npass_); }
344  iEvent.put(std::make_unique<bool>(fail)); // fail is the unbiased boolean
345 
346  if(taggedMode_) return forcedValue_;
347  return save;
348 }
EventNumber_t event() const
Definition: EventID.h:41
static void print(const Collection &errors)
std::set< std::string > categoriesToIgnore_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
std::set< std::string > modulesToWatch_
LuminosityBlockIndex index() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
Run const & getRun() const
Definition: Event.cc:99
RunNumber_t run() const
Definition: Event.h:101
RunIndex index() const
Definition: Run.cc:21
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:97
std::set< std::string > categoriesToWatch_
std::set< std::string > modulesToIgnore_
edm::EventID id() const
Definition: EventBase.h:59
def fail(errstr="")
edm::EDGetTokenT< ErrorList > srcT_
save
Definition: cuy.py:1165
std::shared_ptr< LumiErrors > LogErrorEventFilter::globalBeginLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup iSetup 
) const
override

Definition at line 178 of file LogErrorEventFilter.cc.

References edm::LuminosityBlock::getByLabel(), edm::LuminosityBlock::getRun(), cmsBatch::handle, increment(), edm::Run::index(), edm::InputTag::label(), edm::InputTag::process(), readSummaryMode_, and src_.

178  {
179  auto ret = std::make_shared<LumiErrors>();
180  if (readSummaryMode_) {
182  edm::Handle<int> hpass, hfail;
183  lumi.getByLabel(src_, handle);
184  lumi.getByLabel(edm::InputTag(src_.label(), "pass", src_.process()), hpass);
185  lumi.getByLabel(edm::InputTag(src_.label(), "fail", src_.process()), hfail);
186  increment(ret->errorCollection_, *handle);
187  ret->npass_ = *hpass;
188  ret->nfail_ = *hfail;
189 
190  auto runC = runCache(lumi.getRun().index());
191  runC->npass_ +=*hpass;
192  runC->nfail_ += *hfail;
193  }
194  return ret;
195 }
bool getByLabel(std::string const &label, Handle< PROD > &result) const
static void increment(ErrorSet &scoreboard, Collection &list)
RunIndex index() const
Definition: Run.cc:21
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
Run const & getRun() const
std::shared_ptr< RunErrors > LogErrorEventFilter::globalBeginRun ( const edm::Run run,
const edm::EventSetup iSetup 
) const
override

Definition at line 240 of file LogErrorEventFilter.cc.

240  {
241  return std::make_shared<RunErrors>();
242 }
void LogErrorEventFilter::globalEndLuminosityBlock ( const edm::LuminosityBlock lumi,
const edm::EventSetup iSetup 
) const
override

Definition at line 197 of file LogErrorEventFilter.cc.

References gather_cfg::cout, edm::LuminosityBlock::getRun(), increment(), edm::LuminosityBlock::index(), edm::Run::index(), edm::LuminosityBlockBase::luminosityBlock(), print(), edm::LuminosityBlockBase::run(), statsGuard_, statsPerLumi_, thresholdPerLumi_, and verbose_.

197  {
198  auto lumiC = luminosityBlockCache(lumi.index());
199  auto nfail = lumiC->nfail_.load();
200  auto npass = lumiC->npass_.load();
201  {
202  auto guard = make_guard(statsGuard_);
203  statsPerLumi_[std::pair<uint32_t,uint32_t>(lumi.run(), lumi.luminosityBlock())] = std::pair<size_t,size_t>(npass, nfail);
204  }
205  {
206  //synchronize lumiC->errorCollection_
207  auto guard = make_guard(lumiC->collectionGuard_);
208 
209  {
210  if (nfail < thresholdPerLumi_*(npass+nfail)) {
211  //synchronize runC->errorCollection_
212  auto runC = runCache(lumi.getRun().index());
213  auto guard = make_guard(runC->collectionGuard_);
214  increment(runC->errorCollection_, lumiC->errorCollection_);
215  }
216  }
217  if (verbose_) {
218  if (!lumiC->errorCollection_.empty()) {
219  std::cout << "\n === REPORT FOR RUN " << lumi.run() << " LUMI " << lumi.luminosityBlock() << " === " << std::endl;
220  print(lumiC->errorCollection_);
221  }
222  }
223  }
224 }
static void print(const Collection &errors)
LuminosityBlockIndex index() const
LuminosityBlockNumber_t luminosityBlock() const
static void increment(ErrorSet &scoreboard, Collection &list)
std::atomic< bool > statsGuard_
RunIndex index() const
Definition: Run.cc:21
RunNumber_t run() const
std::map< std::pair< uint32_t, uint32_t >, std::pair< size_t, size_t > > statsPerLumi_
Run const & getRun() const
void LogErrorEventFilter::globalEndLuminosityBlockProduce ( edm::LuminosityBlock lumi,
const edm::EventSetup iSetup 
) const
override

Definition at line 227 of file LogErrorEventFilter.cc.

References edm::LuminosityBlock::index(), edm::LuminosityBlock::put(), and serialize().

227  {
228  auto lumiC = luminosityBlockCache(lumi.index());
229  {
230  //synchronize errorCollection_
231  auto guard = make_guard(lumiC->collectionGuard_);
232  lumi.put(serialize(lumiC->errorCollection_));
233  }
234  lumi.put(std::make_unique<int>(lumiC->npass_.load()), "pass");
235  lumi.put(std::make_unique<int>(lumiC->nfail_.load()), "fail");
236 }
LuminosityBlockIndex index() const
static std::unique_ptr< ErrorList > serialize(const ErrorSet &set)
void put(std::unique_ptr< PROD > product)
Put a new product.
void LogErrorEventFilter::globalEndRun ( const edm::Run run,
const edm::EventSetup iSetup 
) const
override

Definition at line 245 of file LogErrorEventFilter.cc.

References gather_cfg::cout, errorCollectionAll_, increment(), edm::Run::index(), print(), edm::RunBase::run(), statsGuard_, statsPerRun_, thresholdPerRun_, and verbose_.

245  {
246  auto runC = runCache(run.index());
247  auto npass = runC->npass_.load();
248  auto nfail = runC->nfail_.load();
249  {
250  auto guard = make_guard(statsGuard_);
251  statsPerRun_[run.run()] = std::pair<size_t,size_t>(npass, nfail);
252  }
253  {
254  //synchronize errorCollection_
255  auto guard = make_guard(runC->collectionGuard_);
256  if (nfail < thresholdPerRun_*(npass+nfail)) {
257  auto guard = make_guard(statsGuard_);
258  increment(errorCollectionAll_, runC->errorCollection_);
259  }
260  if (verbose_) {
261  if (!runC->errorCollection_.empty()) {
262  std::cout << "\n === REPORT FOR RUN " << run.run() << " === " << std::endl;
263  print(runC->errorCollection_);
264  }
265  }
266  }
267 }
static void print(const Collection &errors)
RunNumber_t run() const
Definition: RunBase.h:40
static void increment(ErrorSet &scoreboard, Collection &list)
std::atomic< bool > statsGuard_
RunIndex index() const
Definition: Run.cc:21
std::map< uint32_t, std::pair< size_t, size_t > > statsPerRun_
template<typename Collection >
void LogErrorEventFilter::increment ( ErrorSet scoreboard,
Collection &  list 
)
staticprivate

Definition at line 352 of file LogErrorEventFilter.cc.

References mps_fire::result.

Referenced by globalBeginLuminosityBlock(), globalEndLuminosityBlock(), and globalEndRun().

352  {
353  for(auto const& err : list) {
354  std::pair<ErrorSet::iterator, bool> result = scoreboard.insert(err);
355  // need the const_cast as set elements are const
356  if (!result.second) const_cast<unsigned int &>(result.first->count) += err.count;
357  }
358 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
template<typename Collection >
void LogErrorEventFilter::print ( const Collection &  errors)
staticprivate

Definition at line 362 of file LogErrorEventFilter.cc.

References gather_cfg::cout, and DEFINE_FWK_MODULE.

Referenced by endJob(), filter(), globalEndLuminosityBlock(), and globalEndRun().

362  {
363  using namespace std;
364  cout << setw(40) << left << "Category" << " " <<
365  setw(60) << left << "Module" << " " <<
366  setw(10) << left << "Level" << " " <<
367  setw(9) << right << "Count" << "\n";
368  cout << setw(40) << left << "----------------------------------------" << " " <<
369  setw(60) << left << "------------------------------------------------------------" << " " <<
370  setw(10) << left << "----------" << " " <<
371  setw(9) << right << "---------" << "\n";
372  for(auto const& err : errors) {
373  cout << setw(40) << left << err.category << " " <<
374  setw(60) << left << err.module << " " <<
375  setw(10) << left << err.severity.getName() << " " <<
376  setw(9) << right << err.count << "\n";
377  }
378  cout << flush;
379 }
Definition: errors.py:1
static std::unique_ptr<ErrorList > LogErrorEventFilter::serialize ( const ErrorSet set)
inlinestaticprivate

Definition at line 121 of file LogErrorEventFilter.cc.

Referenced by globalEndLuminosityBlockProduce().

121  {
122  return std::make_unique<ErrorList>(set.begin(), set.end());
123  }

Member Data Documentation

std::set<std::string> LogErrorEventFilter::categoriesToIgnore_
private

Definition at line 108 of file LogErrorEventFilter.cc.

Referenced by filter(), and LogErrorEventFilter().

std::set<std::string> LogErrorEventFilter::categoriesToWatch_
private

Definition at line 107 of file LogErrorEventFilter.cc.

Referenced by filter(), and LogErrorEventFilter().

ErrorSet LogErrorEventFilter::errorCollectionAll_
mutableprivate

Definition at line 111 of file LogErrorEventFilter.cc.

Referenced by endJob(), and globalEndRun().

bool LogErrorEventFilter::forcedValue_
private

Definition at line 115 of file LogErrorEventFilter.cc.

Referenced by filter().

size_t LogErrorEventFilter::maxSavedEventsPerLumi_
private

Definition at line 113 of file LogErrorEventFilter.cc.

Referenced by filter().

std::set<std::string> LogErrorEventFilter::modulesToIgnore_
private

Definition at line 106 of file LogErrorEventFilter.cc.

Referenced by filter(), and LogErrorEventFilter().

std::set<std::string> LogErrorEventFilter::modulesToWatch_
private

Definition at line 105 of file LogErrorEventFilter.cc.

Referenced by filter(), and LogErrorEventFilter().

bool LogErrorEventFilter::readSummaryMode_
private

Definition at line 104 of file LogErrorEventFilter.cc.

Referenced by filter(), and globalBeginLuminosityBlock().

edm::InputTag LogErrorEventFilter::src_
private

Definition at line 102 of file LogErrorEventFilter.cc.

Referenced by globalBeginLuminosityBlock().

edm::EDGetTokenT<ErrorList> LogErrorEventFilter::srcT_
private

Definition at line 103 of file LogErrorEventFilter.cc.

Referenced by filter().

std::atomic<bool> LogErrorEventFilter::statsGuard_
mutableprivate

Definition at line 116 of file LogErrorEventFilter.cc.

Referenced by endJob(), globalEndLuminosityBlock(), and globalEndRun().

std::map<std::pair<uint32_t,uint32_t>, std::pair<size_t,size_t> > LogErrorEventFilter::statsPerLumi_
mutableprivate

Definition at line 109 of file LogErrorEventFilter.cc.

Referenced by endJob(), and globalEndLuminosityBlock().

std::map<uint32_t, std::pair<size_t,size_t> > LogErrorEventFilter::statsPerRun_
mutableprivate

Definition at line 110 of file LogErrorEventFilter.cc.

Referenced by endJob(), and globalEndRun().

bool LogErrorEventFilter::taggedMode_
private

Definition at line 115 of file LogErrorEventFilter.cc.

Referenced by filter().

double LogErrorEventFilter::thresholdPerLumi_
private

Definition at line 112 of file LogErrorEventFilter.cc.

Referenced by endJob(), and globalEndLuminosityBlock().

double LogErrorEventFilter::thresholdPerRun_
private

Definition at line 112 of file LogErrorEventFilter.cc.

Referenced by endJob(), and globalEndRun().

bool LogErrorEventFilter::verbose_
private

Definition at line 114 of file LogErrorEventFilter.cc.

Referenced by endJob(), globalEndLuminosityBlock(), and globalEndRun().

bool LogErrorEventFilter::veryVerbose_
private

Definition at line 114 of file LogErrorEventFilter.cc.

Referenced by filter().