CMS 3D CMS Logo

LogErrorHarvester.cc
Go to the documentation of this file.
1 //
2 // Package: LogErrorHarvester
3 // Class: LogErrorHarvester
4 
13 //
14 // Original Author: Giovanni Petrucciani
15 // Created: Thu Dec 4 16:22:40 CET 2008
16 //
17 
18 // user include files
26 
27 // system include files
28 #include <memory>
29 
30 //
31 // class decleration
32 //
33 
34 namespace edm {
36  public:
37  explicit LogErrorHarvester(ParameterSet const&);
38  static void fillDescriptions(ConfigurationDescriptions& descriptions);
39 
40  private:
41  void beginJob() override;
42  void produce(StreamID, Event&, EventSetup const&) const override;
43  void endJob() override;
44  };
45 
47  produces<std::vector<ErrorSummaryEntry>>();
48  }
49 
50  void
52  const auto index = sid.value();
53  if(!FreshErrorsExist(index)) {
54  iEvent.put(std::make_unique<std::vector<ErrorSummaryEntry>>());
55  } else {
56  iEvent.put(std::make_unique<std::vector<ErrorSummaryEntry>>(LoggedErrorsSummary(index)));
57  }
58  }
59 
60  // ------------ method called once each job just before starting event loop ------------
61  void
64  }
65 
66  // ------------ method called once each job just after ending the event loop ------------
67  void
70  }
71 
72 
73  // ------------ method called once each job for validation ------------
74  void
77  descriptions.add("logErrorHarvester", desc);
78  }
79 }
80 
81 //define this as a plug-in
static void fillDescriptions(ConfigurationDescriptions &descriptions)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:122
void produce(StreamID, Event &, EventSetup const &) const override
bool EnableLoggedErrorsSummary()
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool FreshErrorsExist(unsigned int iStreamID)
bool DisableLoggedErrorsSummary()
int iEvent
Definition: GenABIO.cc:230
unsigned int value() const
Definition: StreamID.h:46
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HLT enums.
std::vector< ErrorSummaryEntry > LoggedErrorsSummary(unsigned int iStreamID)
LogErrorHarvester(ParameterSet const &)