37 constexpr int kAcquireTestValueUniquePtr1 = 101;
38 constexpr int kAcquireTestValueUniquePtr2 = 102;
39 constexpr int kAcquireTestValueOptional1 = 201;
40 constexpr int kAcquireTestValueOptional2 = 202;
82 std::unique_ptr<test_acquire::WaitingServer>
server_;
90 : numberOfIOVsToAccumulate_(
pset.getUntrackedParameter<unsigned
int>(
"numberOfIOVsToAccumulate")),
91 secondsToWaitForWork_(
pset.getUntrackedParameter<unsigned
int>(
"secondsToWaitForWork")) {
116 if (
key == EventSetupRecordKey::makeKey<ESTestRecordI>()) {
117 caches_.resize(nConcurrentIOVs);
118 server_ = std::make_unique<test_acquire::WaitingServer>(
142 std::vector<int>& retrieved = iovCache.
retrieved();
155 throw cms::Exception(
"TestFailure") <<
"AcquireIntESProducer::acquire" 156 <<
"read values do not agree with record";
158 return kAcquireTestValue;
164 if (valueReturnedByAcquire != kAcquireTestValue) {
165 throw cms::Exception(
"TestFailure") <<
"AcquireIntESProducer::produce" 166 <<
" unexpected value passed in as argument";
174 throw cms::Exception(
"TestFailure") <<
"AcquireIntESProducer::produce" 175 <<
"read values do not agree with record";
183 return std::make_unique<ESTestDataI>(sum);
187 return std::make_unique<ESTestDataB>(11);
193 auto returnValue = std::make_unique<TestValue>(kAcquireTestValueUniquePtr1);
199 std::unique_ptr<TestValue> testValue) {
202 throw cms::Exception(
"TestFailure") <<
"AcquireIntESProducer::produceUniquePtr" 203 <<
" unexpected value passed in as argument";
205 return std::make_unique<ESTestDataI>(kAcquireTestValueUniquePtr2);
211 std::vector<TestValue> testVector;
212 testVector.push_back(kAcquireTestValueOptional1);
213 auto returnValue = std::make_optional<std::vector<TestValue>>(
std::move(testVector));
222 throw cms::Exception(
"TestFailure") <<
"AcquireIntESProducer::produceOptional" 223 <<
" unexpected value passed in as argument";
225 return std::make_unique<ESTestDataI>(kAcquireTestValueOptional2);
230 desc.addUntracked<
unsigned int>(
"numberOfIOVsToAccumulate", 8);
231 desc.addUntracked<
unsigned int>(
"secondsToWaitForWork", 1);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
const IOVSyncValue & last() const
LuminosityBlockNumber_t luminosityBlockNumber() const
const IOVSyncValue & first() const
std::unique_ptr< ESTestDataI > produceOptional(ESTestRecordI const &, std::optional< std::vector< TestValue >>)
const unsigned int numberOfIOVsToAccumulate_
std::optional< std::vector< TestValue > > acquireOptional(ESTestRecordI const &, edm::WaitingTaskWithArenaHolder)
int acquire(ESTestRecordI const &, edm::WaitingTaskWithArenaHolder)
auto setWhatAcquiredProduced(T *iThis, const es::Label &iLabel={})
std::unique_ptr< test_acquire::WaitingServer > server_
void addDefault(ParameterSetDescription const &psetDescription)
std::vector< TestValue * > optionalTestPointers_
edm::ESGetToken< IOVTestInfo, ESTestRecordI > token_
~AcquireIntESProducer() override
unsigned int iovStartLumi_
std::vector< test_acquire::Cache > caches_
key
prepare the HTCondor submission files and eventually submit them
const unsigned int secondsToWaitForWork_
std::unique_ptr< TestValue > acquireUniquePtr(ESTestRecordI const &, edm::WaitingTaskWithArenaHolder)
std::vector< TestValue * > uniqueTestPointers_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::unique_ptr< ESTestDataI > produce(ESTestRecordI const &, int)
unsigned long long cacheIdentifier_
static void fillDescriptions(edm::ConfigurationDescriptions &)
AcquireIntESProducer(edm::ParameterSet const &)
unsigned int iovStartRun_
std::vector< int > const & processed() const
std::unique_ptr< ESTestDataB > produceESTestDataB(ESTestRecordB const &)
AcquireIntESProducer & operator=(const AcquireIntESProducer &)=delete
void initConcurrentIOVs(EventSetupRecordKey const &, unsigned int nConcurrentIOVs) override
std::unique_ptr< ESTestDataI > produceUniquePtr(ESTestRecordI const &, std::unique_ptr< TestValue >)
std::vector< int > const & retrieved() const