|
16 | 16 | #include "DataFormats/Provenance/interface/ThinnedAssociationsHelper.h" |
17 | 17 | #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h" |
18 | 18 | #include "DataFormats/SiStripCommon/interface/SiStripFedKey.h" |
| 19 | +#include "FWCore/Framework/interface/ProductResolversFactory.h" |
19 | 20 | #include "FWCore/ServiceRegistry/interface/ActivityRegistry.h" |
20 | 21 | #include "FWCore/Utilities/interface/Exception.h" |
21 | 22 | #include "FWCore/Utilities/interface/GetPassID.h" |
@@ -64,6 +65,7 @@ namespace sistrip { |
64 | 65 | productRegistry_->setFrozen(); |
65 | 66 |
|
66 | 67 | eventPrincipal_ = std::make_unique<edm::EventPrincipal>(source_->productRegistry(), |
| 68 | + edm::productResolversFactory::makePrimary, |
67 | 69 | std::make_shared<edm::BranchIDListHelper>(), |
68 | 70 | std::make_shared<edm::ThinnedAssociationsHelper>(), |
69 | 71 | *processConfiguration_, |
@@ -183,22 +185,22 @@ namespace sistrip { |
183 | 185 | CountersPtr inputL1ACounters = getCounters(event, l1aCountersTag_); |
184 | 186 | CountersPtr inputAPVAddresses = getCounters(event, apvAddressesTag_, false); |
185 | 187 | const edm::DetSetVector<SiStripRawDigi>* inputScopeDigis = |
186 | | - getProduct<edm::DetSetVector<SiStripRawDigi> >(event, scopeDigisTag_); |
| 188 | + getProduct<edm::DetSetVector<SiStripRawDigi>>(event, scopeDigisTag_); |
187 | 189 | const edm::DetSetVector<SiStripRawDigi>* inputPayloadDigis = |
188 | | - getProduct<edm::DetSetVector<SiStripRawDigi> >(event, payloadDigisTag_); |
| 190 | + getProduct<edm::DetSetVector<SiStripRawDigi>>(event, payloadDigisTag_); |
189 | 191 | const edm::DetSetVector<SiStripRawDigi>* inputReorderedDigis = |
190 | | - getProduct<edm::DetSetVector<SiStripRawDigi> >(event, reorderedDigisTag_); |
| 192 | + getProduct<edm::DetSetVector<SiStripRawDigi>>(event, reorderedDigisTag_); |
191 | 193 | const edm::DetSetVector<SiStripRawDigi>* inputVirginRawDigis = |
192 | | - getProduct<edm::DetSetVector<SiStripRawDigi> >(event, virginRawDigisTag_); |
| 194 | + getProduct<edm::DetSetVector<SiStripRawDigi>>(event, virginRawDigisTag_); |
193 | 195 | //construct the output vectors if the digis were found and they do not exist |
194 | 196 | if (inputScopeDigis && !mo.outputScopeDigisVector_.get()) |
195 | | - mo.outputScopeDigisVector_.reset(new std::vector<edm::DetSet<SiStripRawDigi> >); |
| 197 | + mo.outputScopeDigisVector_ = std::make_shared<std::vector<edm::DetSet<SiStripRawDigi>>>(); |
196 | 198 | if (inputPayloadDigis && !mo.outputPayloadDigisVector_.get()) |
197 | | - mo.outputPayloadDigisVector_.reset(new std::vector<edm::DetSet<SiStripRawDigi> >); |
| 199 | + mo.outputPayloadDigisVector_ = std::make_shared<std::vector<edm::DetSet<SiStripRawDigi>>>(); |
198 | 200 | if (inputReorderedDigis && !mo.outputReorderedDigisVector_.get()) |
199 | | - mo.outputReorderedDigisVector_.reset(new std::vector<edm::DetSet<SiStripRawDigi> >); |
| 201 | + mo.outputReorderedDigisVector_ = std::make_shared<std::vector<edm::DetSet<SiStripRawDigi>>>(); |
200 | 202 | if (inputVirginRawDigis && !mo.outputVirginRawDigisVector_.get()) |
201 | | - mo.outputVirginRawDigisVector_.reset(new std::vector<edm::DetSet<SiStripRawDigi> >); |
| 203 | + mo.outputVirginRawDigisVector_ = std::make_shared<std::vector<edm::DetSet<SiStripRawDigi>>>(); |
202 | 204 | //find matching FEDs |
203 | 205 | std::set<uint16_t> matchingFeds; |
204 | 206 | findMatchingFeds(eventId, apvAddress, inputTotalEventCounters, inputL1ACounters, inputAPVAddresses, matchingFeds); |
@@ -309,10 +311,10 @@ namespace sistrip { |
309 | 311 | std::vector<uint32_t>& outputTotalEventCounters, |
310 | 312 | std::vector<uint32_t>& outputL1ACounters, |
311 | 313 | std::vector<uint32_t>& outputAPVAddresses, |
312 | | - std::vector<edm::DetSet<SiStripRawDigi> >* outputScopeDigisVector, |
313 | | - std::vector<edm::DetSet<SiStripRawDigi> >* outputPayloadDigisVector, |
314 | | - std::vector<edm::DetSet<SiStripRawDigi> >* outputReorderedDigisVector, |
315 | | - std::vector<edm::DetSet<SiStripRawDigi> >* outputVirginRawDigisVector, |
| 314 | + std::vector<edm::DetSet<SiStripRawDigi>>* outputScopeDigisVector, |
| 315 | + std::vector<edm::DetSet<SiStripRawDigi>>* outputPayloadDigisVector, |
| 316 | + std::vector<edm::DetSet<SiStripRawDigi>>* outputReorderedDigisVector, |
| 317 | + std::vector<edm::DetSet<SiStripRawDigi>>* outputVirginRawDigisVector, |
316 | 318 | const SiStripFedCabling& cabling) { |
317 | 319 | //reserve space in vectors |
318 | 320 | if (inputScopeDigis) { |
@@ -391,12 +393,12 @@ namespace sistrip { |
391 | 393 | SpyEventMatcher::CountersPtr SpyEventMatcher::getCounters(const edm::EventPrincipal& event, |
392 | 394 | const edm::InputTag& tag, |
393 | 395 | const bool mapKeyIsByFedID) { |
394 | | - const std::vector<uint32_t>* vectorFromEvent = getProduct<std::vector<uint32_t> >(event, tag); |
| 396 | + const std::vector<uint32_t>* vectorFromEvent = getProduct<std::vector<uint32_t>>(event, tag); |
395 | 397 | if (vectorFromEvent) { |
396 | 398 | //vector is from event so, will be deleted when the event is destroyed (and not before) |
397 | 399 | return std::make_shared<CountersWrapper>(vectorFromEvent); |
398 | 400 | } else { |
399 | | - const std::map<uint32_t, uint32_t>* mapFromEvent = getProduct<std::map<uint32_t, uint32_t> >(event, tag); |
| 401 | + const std::map<uint32_t, uint32_t>* mapFromEvent = getProduct<std::map<uint32_t, uint32_t>>(event, tag); |
400 | 402 | if (mapFromEvent) { |
401 | 403 | std::vector<uint32_t>* newVector = new std::vector<uint32_t>(FED_ID_MAX + 1, 0); |
402 | 404 | if (mapKeyIsByFedID) { |
@@ -428,10 +430,10 @@ namespace sistrip { |
428 | 430 | std::vector<uint32_t>& theTotalEventCounters, |
429 | 431 | std::vector<uint32_t>& theL1ACounters, |
430 | 432 | std::vector<uint32_t>& theAPVAddresses, |
431 | | - std::vector<edm::DetSet<SiStripRawDigi> >* theScopeDigisVector, |
432 | | - std::vector<edm::DetSet<SiStripRawDigi> >* thePayloadDigisVector, |
433 | | - std::vector<edm::DetSet<SiStripRawDigi> >* theReorderedDigisVector, |
434 | | - std::vector<edm::DetSet<SiStripRawDigi> >* theVirginRawDigisVector) |
| 433 | + std::vector<edm::DetSet<SiStripRawDigi>>* theScopeDigisVector, |
| 434 | + std::vector<edm::DetSet<SiStripRawDigi>>* thePayloadDigisVector, |
| 435 | + std::vector<edm::DetSet<SiStripRawDigi>>* theReorderedDigisVector, |
| 436 | + std::vector<edm::DetSet<SiStripRawDigi>>* theVirginRawDigisVector) |
435 | 437 | : rawData(new FEDRawDataCollection), |
436 | 438 | totalEventCounters(new std::vector<uint32_t>), |
437 | 439 | l1aCounters(new std::vector<uint32_t>), |
|
0 commit comments