51 for (
const auto &
interval : iConfig.
getParameter<std::vector<edm::ParameterSet>>(
"configuration")) {
52 ppsAssociationCuts_.push_back(make_shared<PPSAssociationCuts>(
interval));
56 setWhatProduced(
this);
57 findingRecord<PPSAssociationCutsRcd>();
65 for (
unsigned int idx = 0;
idx < ppsAssociationCuts_.size(); ++
idx) {
68 currentAssociationCutValid_ =
true;
69 currentAssociationCutIdx_ =
idx;
76 currentAssociationCutValid_ =
false;
77 currentAssociationCutIdx_ = 0;
80 <<
">> PPSAssociationCutsESSource::setIntervalFor(" <<
key.name() <<
")\n" 91 auto output = std::make_shared<PPSAssociationCuts>();
93 if (currentAssociationCutValid_) {
94 const auto &associationCut = ppsAssociationCuts_[currentAssociationCutIdx_];
109 std::vector<edm::ParameterSet> vDefaults;
110 desc.addVPSet(
"configuration", validator, vDefaults);
112 descriptions.
add(
"ppsAssociationCutsESSource",
desc);
119 for (
auto §or : {
"45",
"56"}) {
122 ->setComment(
"track-association cuts for sector " +
std::string(sector));
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &)
bool contains(EventRange const &lh, EventID const &rh)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
std::pair< Time_t, Time_t > ValidityInterval
std::shared_ptr< PPSAssociationCuts > produce(const PPSAssociationCutsRcd &)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< std::shared_ptr< PPSAssociationCuts > > ppsAssociationCuts_
Log< level::Info, false > LogInfo
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
bool currentAssociationCutValid_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const EventID & eventID() const
static edm::ParameterSetDescription getDefaultParameters()
static edm::ParameterSetDescription getIOVDefaultParameters()
std::vector< edm::EventRange > validityRanges_
EventNumber_t event() const
unsigned int currentAssociationCutIdx_
PPSAssociationCutsESSource(const edm::ParameterSet &)