29 namespace eventsetup {
36 : dataProxyContainer_(dataProxyContainer), recordIndex_(recordIndex), dataProxiesIndex_(
kInvalidIndex) {}
50 for (
auto const& it : proxies) {
56 for (
auto const& it : proxies) {
61 auto lengthDataLabel = std::strlen(it.first.name().value());
62 assert(std::strncmp(it.first.name().value(),
64 lengthDataLabel) == 0);
71 for (
auto const& it : proxies) {
79 auto iterEnd = iter + perRecordInfo.
nDataKeys_;
80 for (; iter != iterEnd; ++iter) {
81 if (*iter == dataKey) {
99 std::vector<DataKey>::iterator dataKeysIter,
101 : dataKeysIter_(dataKeysIter), dataProxiesIter_(dataProxiesIter) {}
120 assert(keyedProxiesCollection_.empty());
121 perRecordInfos_.emplace_back(iKey);
126 return (lb != perRecordInfos_.end() && iKey == lb->recordKey_);
130 std::set<EventSetupRecordKey> returnValue;
131 for (
auto const& it : perRecordInfos_) {
132 returnValue.insert(returnValue.end(), it.recordKey_);
138 std::set<EventSetupRecordKey>& recordsNotAllowingConcurrentIOVs)
const {
139 for (
auto const& it : perRecordInfos_) {
142 recordsNotAllowingConcurrentIOVs.insert(recordsNotAllowingConcurrentIOVs.end(),
key);
148 std::sort(perRecordInfos_.begin(), perRecordInfos_.end());
149 perRecordInfos_.erase(
std::unique(perRecordInfos_.begin(), perRecordInfos_.end()), perRecordInfos_.end());
153 unsigned int nConcurrentIOVs) {
154 if (keyedProxiesCollection_.empty()) {
155 sortEventSetupRecordKeys();
159 assert(lb != perRecordInfos_.end() &&
key == lb->recordKey_);
160 if (lb->nIOVs_ == 0) {
161 lb->nIOVs_ = nConcurrentIOVs;
162 auto recordIndex =
std::distance(perRecordInfos_.begin(), lb);
163 lb->indexToKeyedProxies_ = keyedProxiesCollection_.size();
164 for (
unsigned int i = 0;
i < nConcurrentIOVs; ++
i) {
165 keyedProxiesCollection_.emplace_back(
this, recordIndex);
173 assert(lb != perRecordInfos_.end() && iRecordKey == lb->recordKey_);
174 assert(iovIndex < lb->nIOVs_);
175 return keyedProxiesCollection_[lb->indexToKeyedProxies_ + iovIndex];
186 if (iToAppend.
exists(kParamName)) {
192 unsigned int iovIndex) {
197 std::vector<std::pair<DataKey, std::shared_ptr<DataProxy>>> keyedProxiesVector =
203 keyedProxy.dataProxy_->setProviderDescription(&
description());
204 if (mustChangeLabels) {
210 DataKey newKey(keyedProxy.dataKey_.type(),
temp.c_str());
211 swap(keyedProxy.dataKey_, newKey);
226 for (
auto&
v : iDesc) {