CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( 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 ( )
overridedefault

Member Function Documentation

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

Definition at line 30 of file ClusterCheckerEDProducer.cc.

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

30  {
33  desc.addUntracked<bool>("silentClusterCheck", false);
34 
35  descriptions.add("trackerClusterCheckDefault", desc);
36 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
static void fillDescriptions(edm::ParameterSetDescription &description)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void ClusterCheckerEDProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 38 of file ClusterCheckerEDProducer.cc.

References eostools::move(), edm::Event::put(), 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 }
tuple ret
prodAgent to be discontinued
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
Log< level::Error, false > LogError
def move
Definition: eostools.py:511
size_t tooManyClusters(const edm::Event &e) const

Member Data Documentation

ClusterChecker ClusterCheckerEDProducer::theClusterCheck
private

Definition at line 20 of file ClusterCheckerEDProducer.cc.

Referenced by produce().

bool ClusterCheckerEDProducer::theSilentOnClusterCheck
private

Definition at line 21 of file ClusterCheckerEDProducer.cc.

Referenced by produce().