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 }

◆ ~ClusterCheckerEDProducer()

ClusterCheckerEDProducer::~ClusterCheckerEDProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 30 of file ClusterCheckerEDProducer.cc.

30  {
33  desc.addUntracked<bool>("silentClusterCheck", false);
34 
35  descriptions.add("trackerClusterCheckDefault", desc);
36 }

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

◆ produce()

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

Definition at line 38 of file ClusterCheckerEDProducer.cc.

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 }

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

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().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:543
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
ClusterChecker::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &description)
Definition: ClusterChecker.cc:32
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
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
ClusterChecker::tooManyClusters
size_t tooManyClusters(const edm::Event &e) const
Definition: ClusterChecker.cc:44