CMS 3D CMS Logo

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 
ConfigurationDescriptions.h
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
ClusterCheckerEDProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: ClusterCheckerEDProducer.cc:38
electrons_cff.bool
bool
Definition: electrons_cff.py:366
MessageLogger.h
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EDProducer.h
ClusterChecker::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &description)
Definition: ClusterChecker.cc:32
ClusterChecker
Definition: ClusterChecker.h:30
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ClusterCheckerEDProducer::theSilentOnClusterCheck
bool theSilentOnClusterCheck
Definition: ClusterCheckerEDProducer.cc:21
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ClusterCheckerEDProducer::theClusterCheck
ClusterChecker theClusterCheck
Definition: ClusterCheckerEDProducer.cc:20
ParameterSetDescription.h
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::stream::EDProducer
Definition: EDProducer.h:36
edm::EventSetup
Definition: EventSetup.h:58
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
ClusterChecker.h
ClusterCheckerEDProducer
Definition: ClusterCheckerEDProducer.cc:10
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
ClusterCheckerEDProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: ClusterCheckerEDProducer.cc:30
ClusterCheckerEDProducer::~ClusterCheckerEDProducer
~ClusterCheckerEDProducer() override=default
ClusterCheckerEDProducer::ClusterCheckerEDProducer
ClusterCheckerEDProducer(const edm::ParameterSet &iConfig)
Definition: ClusterCheckerEDProducer.cc:24
ParameterSet.h
edm::Event
Definition: Event.h:73
ClusterChecker::tooManyClusters
size_t tooManyClusters(const edm::Event &e) const
Definition: ClusterChecker.cc:44