93 :
edm::eventsetup::ESSourceProductResolverConcurrentBase(), testESConcurrentSource_(testESConcurrentSource) {}
102 <<
"TestESConcurrentSourceTestResolver::getImpl '" << iKey.
name().
value()
118 <<
"TestESConcurrentSourceTestResolver::initializeForNewIOV";
125 count_setIntervalFor_(0),
126 count_initializeForNewIOV_(0),
127 iterations_(
pset.getParameter<unsigned
int>(
"iterations")),
129 expectedNumberOfConcurrentIOVs_(
pset.getParameter<unsigned
int>(
"expectedNumberOfConcurrentIOVs")),
130 checkIOVInitialization_(
pset.getParameter<
bool>(
"checkIOVInitialization")) {
131 std::vector<unsigned int>
temp(
pset.getParameter<std::vector<unsigned int>>(
"firstValidLumis"));
136 findingRecord<ESTestRecordI>();
137 usingRecord<ESTestRecordI>();
146 std::vector<unsigned int> emptyVector;
147 desc.add<
unsigned int>(
"iterations", 10 * 1000 * 1000);
148 desc.add<
bool>(
"checkIOVInitialization",
false);
149 desc.add<
unsigned int>(
"expectedNumberOfConcurrentIOVs", 0);
150 desc.add<std::vector<unsigned int>>(
"firstValidLumis", emptyVector);
162 throw cms::Exception(
"TestFailure") <<
"TestESConcurrentSource::setIntervalFor," 163 <<
" unexpected number of IOV initializations";
176 std::pair<std::set<edm::IOVSyncValue>::iterator, std::set<edm::IOVSyncValue>::iterator> itFound =
179 if (itFound.first == itFound.second) {
180 if (itFound.first ==
setOfIOV_.begin()) {
201 throw cms::Exception(
"TestFailure") <<
"TestESConcurrentSource::registerResolvers," 202 <<
" unexpected number of concurrent IOVs";
209 keyedResolversVector.emplace_back(dataKey, std::make_shared<TestESConcurrentSourceTestResolver>(
this));
214 keyedResolversVector.emplace_back(dataKey, std::make_shared<TestESConcurrentSourceTestResolver>(
this));
217 return keyedResolversVector;
222 <<
"Start TestESConcurrentSource::initConcurrentIOVs " <<
nConcurrentIOVs <<
" " <<
key.name();
223 if (EventSetupRecordKey::makeKey<ESTestRecordI>() !=
key) {
224 throw cms::Exception(
"TestFailure") <<
"TestESConcurrentSource::initConcurrentIOVs," 225 <<
" unexpected EventSetupRecordKey";
228 throw cms::Exception(
"TestFailure") <<
"TestESConcurrentSource::initConcurrentIOVs," 229 <<
" unexpected number of concurrent IOVs";
235 edm::LogAbsolute(
"TestESConcurrentSource::busyWait") <<
"Start TestESConcurrentSource::busyWait " <<
msg;
239 sum += stepSize *
cos(
i * stepSize);
242 <<
"Stop TestESConcurrentSource::busyWait " <<
msg <<
" " << sum;
const IOVSyncValue & last() const
void busyWait(char const *msg) const
LuminosityBlockNumber_t luminosityBlockNumber() const
std::atomic< unsigned int > count_
const IOVSyncValue & first() const
void prefetch(edm::eventsetup::DataKey const &, edm::EventSetupRecordDetails) override
unsigned int iovIndex() const
static const IOVSyncValue & endOfTime()
TestESConcurrentSource(edm::ParameterSet const &)
unsigned long long cacheIdentifier() const
std::pair< Time_t, Time_t > ValidityInterval
bool isConcurrentFinder() const override
void const * getAfterPrefetchImpl() const override
ValidityInterval validityInterval() const
std::atomic< unsigned int > count_initializeForNewIOV_
void addDefault(ParameterSetDescription const &psetDescription)
unsigned int nConcurrentIOVs_
unsigned int iovStartLumi_
Cos< T >::type cos(const T &t)
std::atomic< unsigned int > count_setIntervalFor_
key
prepare the HTCondor submission files and eventually submit them
TestESConcurrentSourceTestResolver(TestESConcurrentSource *TestESConcurrentSource)
void setIntervalFor(EventSetupRecordKey const &, edm::IOVSyncValue const &, edm::ValidityInterval &) override
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
const unsigned int iterations_
unsigned long long cacheIdentifier_
KeyedResolversVector registerResolvers(EventSetupRecordKey const &, unsigned int iovIndex) override
bool checkIOVInitialization_
unsigned int expectedNumberOfConcurrentIOVs_
std::set< edm::IOVSyncValue > setOfIOV_
static EventNumber_t maxEventNumber()
std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> KeyedResolversVector
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void initializeForNewIOV() override
~TestESConcurrentSource() override
static const ValidityInterval & invalidInterval()
TestESConcurrentSource * testESConcurrentSource_
Log< level::System, true > LogAbsolute
void initConcurrentIOVs(EventSetupRecordKey const &, unsigned int nConcurrentIOVs) override
std::atomic< unsigned int > maxCount_
const NameTag & name() const
const char * value() const