CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ClusterCheckerEDProducer.cc
Go to the documentation of this file.
6 
8 
10 public:
11 
13  ~ClusterCheckerEDProducer() = default;
14 
15  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
16 
17  virtual 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 {
28  produces<bool>();
29 }
30 
34  desc.addUntracked<bool>("silentClusterCheck", false);
35 
36  descriptions.add("trackerClusterCheckDefault", desc);
37 }
38 
40  auto ret = std::make_unique<bool>(true);
41 
42  //protection for big ass events...
43  size_t clustsOrZero = theClusterCheck.tooManyClusters(iEvent);
44  if (clustsOrZero){
46  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.";
47  *ret = false;
48  }
49 
50  iEvent.put(std::move(ret));
51 }
52 
53 
~ClusterCheckerEDProducer()=default
virtual 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:122
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
static void fillDescriptions(edm::ParameterSetDescription &description)
int iEvent
Definition: GenABIO.cc:230
def move
Definition: eostools.py:510
size_t tooManyClusters(const edm::Event &e) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
ClusterCheckerEDProducer(const edm::ParameterSet &iConfig)