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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Definition at line 9 of file ClusterCheckerEDProducer.cc.

Constructor & Destructor Documentation

◆ ClusterCheckerEDProducer()

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

Definition at line 23 of file ClusterCheckerEDProducer.cc.

24  : theClusterCheck(iConfig, consumesCollector()),
25  theSilentOnClusterCheck(iConfig.getUntrackedParameter<bool>("silentClusterCheck")) {
26  produces<bool>();
27 }

◆ ~ClusterCheckerEDProducer()

ClusterCheckerEDProducer::~ClusterCheckerEDProducer ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 29 of file ClusterCheckerEDProducer.cc.

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

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::addUntracked(), and ClusterChecker::fillDescriptions().

◆ produce()

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

Definition at line 37 of file ClusterCheckerEDProducer.cc.

37  {
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 }

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

Member Data Documentation

◆ theClusterCheck

ClusterChecker ClusterCheckerEDProducer::theClusterCheck
private

Definition at line 19 of file ClusterCheckerEDProducer.cc.

Referenced by produce().

◆ theSilentOnClusterCheck

bool ClusterCheckerEDProducer::theSilentOnClusterCheck
private

Definition at line 20 of file ClusterCheckerEDProducer.cc.

Referenced by produce().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
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: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
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::LogError
Definition: MessageLogger.h:183
iEvent
int iEvent
Definition: GenABIO.cc:224
eostools.move
def move(src, dest)
Definition: eostools.py:511
ClusterChecker::tooManyClusters
size_t tooManyClusters(const edm::Event &e) const
Definition: ClusterChecker.cc:44