CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
ClusterCheckerEDProducer Class Reference
Inheritance diagram for ClusterCheckerEDProducer:
edm::stream::EDProducer<>

Public Member Functions

 ClusterCheckerEDProducer (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~ClusterCheckerEDProducer () override=default
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Attributes

ClusterChecker theClusterCheck
 
bool theSilentOnClusterCheck
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Definition at line 10 of file ClusterCheckerEDProducer.cc.

Constructor & Destructor Documentation

◆ ClusterCheckerEDProducer()

ClusterCheckerEDProducer::ClusterCheckerEDProducer ( const edm::ParameterSet iConfig)

Definition at line 24 of file ClusterCheckerEDProducer.cc.

25  : theClusterCheck(iConfig, consumesCollector()),
26  theSilentOnClusterCheck(iConfig.getUntrackedParameter<bool>("silentClusterCheck")) {
27  produces<bool>();
28 }
T getUntrackedParameter(std::string const &, T const &) const

◆ ~ClusterCheckerEDProducer()

ClusterCheckerEDProducer::~ClusterCheckerEDProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

void ClusterCheckerEDProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 30 of file ClusterCheckerEDProducer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ClusterChecker::fillDescriptions().

30  {
33  desc.addUntracked<bool>("silentClusterCheck", false);
34 
35  descriptions.add("trackerClusterCheckDefault", desc);
36 }
static void fillDescriptions(edm::ParameterSetDescription &description)
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void ClusterCheckerEDProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 38 of file ClusterCheckerEDProducer.cc.

References iEvent, eostools::move(), runTheMatrix::ret, theClusterCheck, theSilentOnClusterCheck, and ClusterChecker::tooManyClusters().

38  {
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 }
size_t tooManyClusters(const edm::Event &e) const
ret
prodAgent to be discontinued
Log< level::Error, false > LogError
int iEvent
Definition: GenABIO.cc:224
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

◆ theClusterCheck

ClusterChecker ClusterCheckerEDProducer::theClusterCheck
private

Definition at line 20 of file ClusterCheckerEDProducer.cc.

Referenced by produce().

◆ theSilentOnClusterCheck

bool ClusterCheckerEDProducer::theSilentOnClusterCheck
private

Definition at line 21 of file ClusterCheckerEDProducer.cc.

Referenced by produce().