CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ClusterCheckerEDProducer.cc
Go to the documentation of this file.
7 
9 
11 public:
13  ~ClusterCheckerEDProducer() override = default;
14 
15  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
16 
17  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
18 
19 private:
22 };
23 
25  : theClusterCheck(iConfig, consumesCollector()),
26  theSilentOnClusterCheck(iConfig.getUntrackedParameter<bool>("silentClusterCheck")) {
27  produces<bool>();
28 }
29 
33  desc.addUntracked<bool>("silentClusterCheck", false);
34 
35  descriptions.add("trackerClusterCheckDefault", desc);
36 }
37 
39  auto ret = std::make_unique<bool>(true);
40 
41  //protection for big ass events...
42  size_t clustsOrZero = theClusterCheck.tooManyClusters(iEvent);
43  if (clustsOrZero) {
45  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.";
46  *ret = false;
47  }
48 
49  iEvent.put(std::move(ret));
50 }
51 
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
tuple ret
prodAgent to be discontinued
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillDescriptions(edm::ParameterSetDescription &description)
Log< level::Error, false > LogError
int iEvent
Definition: GenABIO.cc:224
def move
Definition: eostools.py:511
size_t tooManyClusters(const edm::Event &e) const
~ClusterCheckerEDProducer() override=default
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ClusterCheckerEDProducer(const edm::ParameterSet &iConfig)