Skip to content

Commit

Permalink
Merge pull request cms-sw#28115 from Dr15Jones/fillDescEmptyESSource
Browse files Browse the repository at this point in the history
Added fillDescriptions to EmptyESSource
  • Loading branch information
cmsbuild authored Oct 6, 2019
2 parents 365dcb1 + b69b846 commit 70bdca8
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions FWCore/Modules/src/EmptyESSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ namespace edm {
class EmptyESSource : public EventSetupRecordIntervalFinder {
public:
EmptyESSource(ParameterSet const&);
//virtual ~EmptyESSource();
EmptyESSource(EmptyESSource const&) = delete; // stop default
EmptyESSource const& operator=(EmptyESSource const&) = delete; // stop default

// ---------- const member functions ---------------------

Expand All @@ -22,11 +23,9 @@ namespace edm {
IOVSyncValue const& iTime,
ValidityInterval& oInterval) override;

private:
EmptyESSource(EmptyESSource const&) = delete; // stop default

EmptyESSource const& operator=(EmptyESSource const&) = delete; // stop default
static void fillDescriptions(ConfigurationDescriptions& descriptions);

private:
void delaySettingRecords() override;
// ---------- member data --------------------------------
std::string recordName_;
Expand All @@ -37,7 +36,7 @@ namespace edm {
EmptyESSource::EmptyESSource(ParameterSet const& pset)
: recordName_(pset.getParameter<std::string>("recordName")),
iovIsTime_(!pset.getParameter<bool>("iovIsRunNotTime")) {
std::vector<unsigned int> temp(pset.getParameter<std::vector<unsigned int> >("firstValid"));
std::vector<unsigned int> temp(pset.getParameter<std::vector<unsigned int>>("firstValid"));
for (std::vector<unsigned int>::iterator itValue = temp.begin(), itValueEnd = temp.end(); itValue != itValueEnd;
++itValue) {
if (iovIsTime_) {
Expand Down Expand Up @@ -99,6 +98,21 @@ namespace edm {
oInterval = ValidityInterval(*(itFound.first), endOfInterval);
}

void EmptyESSource::fillDescriptions(ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<std::string>("recordName")
->setComment(
"The name of the EventSetup Record for which intervals are to be generated.\n The record type must be used "
"by some module in the job else an exception will occur.");
desc.add<bool>("iovIsRunNotTime", true)->setComment("Sets how to interpret integer values used in 'firstValid'");
desc.add<std::vector<unsigned int>>("firstValid")
->setComment(
"Sets the beginning point of an IOV. The end point is assumed to be the next entry in the list. If there "
"are no further entries than 'end of time' is used.");

descriptions.addDefault(desc);
}

} // namespace edm
using edm::EmptyESSource;
DEFINE_FWK_EVENTSETUP_SOURCE(EmptyESSource);

0 comments on commit 70bdca8

Please sign in to comment.