CMS 3D CMS Logo

VectorInputSource.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
7 
8 namespace edm {
9 
10  struct VectorInputSourceDescription;
11 
13  : productRegistry_(desc.productRegistry_),
14  processHistoryRegistry_(new ProcessHistoryRegistry),
15  consecutiveRejectionsLimit_(pset.getUntrackedParameter<unsigned int>("consecutiveRejectionsLimit", 100)) {}
16 
18 
19  void VectorInputSource::dropUnwantedBranches(std::vector<std::string> const& wantedBranches) {
20  this->dropUnwantedBranches_(wantedBranches);
21  }
22 
24 
26 
27  void VectorInputSource::doEndJob() { this->endJob(); }
28 
29  void VectorInputSource::throwIfOverLimit(unsigned int consecutiveRejections) const {
30  if (consecutiveRejections >= consecutiveRejectionsLimit_) {
31  throw cms::Exception("LogicError")
32  << "VectorInputSource::loopOverEvents() read " << consecutiveRejections
33  << " consecutive pileup events that were rejected by the eventOperator. "
34  << "This is likely a sign of misconfiguration (of e.g. the adjusted-to pileup probability profile). "
35  << "If you know what you're doing, this exception can be turned off by setting consecutiveRejectionsLimit=0.";
36  }
37  }
38 
39 } // namespace edm
edm::VectorInputSource::doEndJob
void doEndJob()
Called at end of job.
Definition: VectorInputSource.cc:27
edm::VectorInputSource::dropUnwantedBranches
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
Definition: VectorInputSource.cc:19
edm::VectorInputSource::dropUnwantedBranches_
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)=0
edm::VectorInputSource::consecutiveRejectionsLimit_
unsigned int consecutiveRejectionsLimit_
Definition: VectorInputSource.h:81
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::VectorInputSourceDescription
Definition: VectorInputSourceDescription.h:18
edm::VectorInputSource::clearEventPrincipal
void clearEventPrincipal(EventPrincipal &cache)
Definition: VectorInputSource.cc:23
edm::EventPrincipal
Definition: EventPrincipal.h:46
EventPrincipal.h
edm::VectorInputSource::throwIfOverLimit
void throwIfOverLimit(unsigned int consecutiveRejections) const
Definition: VectorInputSource.cc:29
utilities.cache
def cache(function)
Definition: utilities.py:3
edm::ParameterSet
Definition: ParameterSet.h:36
createfilelist.int
int
Definition: createfilelist.py:10
edm::VectorInputSource::~VectorInputSource
virtual ~VectorInputSource()
Definition: VectorInputSource.cc:17
edm::VectorInputSource::VectorInputSource
VectorInputSource(ParameterSet const &pset, VectorInputSourceDescription const &desc)
Definition: VectorInputSource.cc:12
Exception
Definition: hltDiff.cc:246
VectorInputSourceDescription.h
edm::VectorInputSource::endJob
virtual void endJob()=0
edm::VectorInputSource::beginJob
virtual void beginJob()=0
Exception.h
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
VectorInputSource.h
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::VectorInputSource::doBeginJob
void doBeginJob()
Called at beginning of job.
Definition: VectorInputSource.cc:25