CMS 3D CMS Logo

ClusterCheckerEDProducer.cc
Go to the documentation of this file.
6 
8 
10 public:
12  ~ClusterCheckerEDProducer() override = default;
13 
14  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
15 
16  void produce(edm::Event& iEvent, const edm::EventSetup& iSetup) override;
17 
18 private:
21 };
22 
24  : theClusterCheck(iConfig, consumesCollector()),
25  theSilentOnClusterCheck(iConfig.getUntrackedParameter<bool>("silentClusterCheck")) {
26  produces<bool>();
27 }
28 
32  desc.addUntracked<bool>("silentClusterCheck", false);
33 
34  descriptions.add("trackerClusterCheckDefault", desc);
35 }
36 
38  auto ret = std::make_unique<bool>(true);
39 
40  //protection for big ass events...
41  size_t clustsOrZero = theClusterCheck.tooManyClusters(iEvent);
42  if (clustsOrZero) {
44  edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.";
45  *ret = false;
46  }
47 
48  iEvent.put(std::move(ret));
49 }
50 
ConfigurationDescriptions.h
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
ClusterCheckerEDProducer::produce
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
Definition: ClusterCheckerEDProducer.cc:37
electrons_cff.bool
bool
Definition: electrons_cff.py:393
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:20
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
ClusterCheckerEDProducer::theClusterCheck
ClusterChecker theClusterCheck
Definition: ClusterCheckerEDProducer.cc:19
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:38
edm::EventSetup
Definition: EventSetup.h:57
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
ClusterChecker.h
ClusterCheckerEDProducer
Definition: ClusterCheckerEDProducer.cc:9
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:29
ClusterCheckerEDProducer::~ClusterCheckerEDProducer
~ClusterCheckerEDProducer() override=default
ClusterCheckerEDProducer::ClusterCheckerEDProducer
ClusterCheckerEDProducer(const edm::ParameterSet &iConfig)
Definition: ClusterCheckerEDProducer.cc:23
ParameterSet.h
edm::Event
Definition: Event.h:73
ClusterChecker::tooManyClusters
size_t tooManyClusters(const edm::Event &e) const
Definition: ClusterChecker.cc:44