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
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
void clearEventPrincipal(EventPrincipal &cache)
VectorInputSource(ParameterSet const &pset, VectorInputSourceDescription const &desc)
void doEndJob()
Called at end of job.
unsigned int consecutiveRejectionsLimit_
void doBeginJob()
Called at beginning of job.
HLT enums.
def cache(function)
Definition: utilities.py:3
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)=0
virtual void beginJob()=0
void throwIfOverLimit(unsigned int consecutiveRejections) const
virtual void endJob()=0