New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CalibTracker/SiStripESProducers: ESProducers update to return unique_ptr. #22062
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class SiStripBackPlaneCorrectioNFakeESSource : public edm::ESProducer, public ed | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripBackPlaneCorrection> ReturnType; | ||
typedef std::unique_ptr<SiStripBackPlaneCorrection> ReturnType; | ||
ReturnType produce(const SiStripBackPlaneCorrectionRcd&); | ||
|
||
private: | ||
|
@@ -67,7 +67,7 @@ SiStripBackPlaneCorrectioNFakeESSource::produce(const SiStripBackPlaneCorrection | |
edm::ESHandle<TrackerTopology> tTopo; | ||
iRecord.getRecord<TrackerTopologyRcd>().get(tTopo); | ||
|
||
std::shared_ptr<SiStripBackPlaneCorrection> backPlaneCorrection{new SiStripBackPlaneCorrection}; | ||
std::unique_ptr<SiStripBackPlaneCorrection> backPlaneCorrection = std::make_unique<SiStripBackPlaneCorrection>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ class SiStripBadModuleConfigurableFakeESSource : public edm::ESProducer, public | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripBadStrip> ReturnType; | ||
typedef std::unique_ptr<SiStripBadStrip> ReturnType; | ||
ReturnType produce(const SiStripBadModuleRcd&); | ||
|
||
private: | ||
|
@@ -73,7 +73,7 @@ SiStripBadModuleConfigurableFakeESSource::produce(const SiStripBadModuleRcd& iRe | |
edm::ESHandle<TrackerTopology> tTopo; | ||
iRecord.getRecord<TrackerTopologyRcd>().get(tTopo); | ||
|
||
std::shared_ptr<SiStripQuality> quality{new SiStripQuality}; | ||
std::unique_ptr<SiStripQuality> quality = std::make_unique<SiStripQuality>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class SiStripBaseDelayFakeESSource : public edm::ESProducer, public edm::EventSe | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripBaseDelay> ReturnType; | ||
typedef std::unique_ptr<SiStripBaseDelay> ReturnType; | ||
ReturnType produce(const SiStripBaseDelayRcd&); | ||
|
||
private: | ||
|
@@ -64,7 +64,7 @@ SiStripBaseDelayFakeESSource::produce(const SiStripBaseDelayRcd& iRecord) | |
{ | ||
using namespace edm::es; | ||
|
||
std::shared_ptr<SiStripBaseDelay> baseDelay{new SiStripBaseDelay}; | ||
std::unique_ptr<SiStripBaseDelay> baseDelay = std::make_unique<SiStripBaseDelay>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class SiStripConfObjectFakeESSource : public edm::ESProducer, public edm::EventS | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripConfObject> ReturnType; | ||
typedef std::unique_ptr<SiStripConfObject> ReturnType; | ||
ReturnType produce(const SiStripConfObjectRcd&); | ||
|
||
private: | ||
|
@@ -61,7 +61,7 @@ SiStripConfObjectFakeESSource::produce(const SiStripConfObjectRcd& iRecord) | |
{ | ||
using namespace edm::es; | ||
|
||
std::shared_ptr<SiStripConfObject> confObject{new SiStripConfObject}; | ||
std::unique_ptr<SiStripConfObject> confObject = std::make_unique<SiStripConfObject>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
for ( const auto& param : m_parameters ) { | ||
const std::string paramType{param.getParameter<std::string>("ParameterType")}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class SiStripLatencyFakeESSource : public edm::ESProducer, public edm::EventSetu | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripLatency> ReturnType; | ||
typedef std::unique_ptr<SiStripLatency> ReturnType; | ||
ReturnType produce(const SiStripLatencyRcd&); | ||
|
||
private: | ||
|
@@ -64,7 +64,7 @@ SiStripLatencyFakeESSource::produce(const SiStripLatencyRcd& iRecord) | |
{ | ||
using namespace edm::es; | ||
|
||
std::shared_ptr<SiStripLatency> latency{new SiStripLatency}; | ||
std::unique_ptr<SiStripLatency> latency = std::make_unique<SiStripLatency>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
const auto& detInfos = reader.getAllData(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ class SiStripLorentzAngleFakeESSource : public edm::ESProducer, public edm::Even | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripLorentzAngle> ReturnType; | ||
typedef std::unique_ptr<SiStripLorentzAngle> ReturnType; | ||
ReturnType produce(const SiStripLorentzAngleRcd&); | ||
|
||
private: | ||
|
@@ -169,7 +169,7 @@ SiStripLorentzAngleFakeESSource::produce(const SiStripLorentzAngleRcd& iRecord) | |
edm::ESHandle<TrackerTopology> tTopo; | ||
iRecord.getRecord<TrackerTopologyRcd>().get(tTopo); | ||
|
||
std::shared_ptr<SiStripLorentzAngle> lorentzAngle{new SiStripLorentzAngle}; | ||
std::unique_ptr<SiStripLorentzAngle> lorentzAngle = std::make_unique<SiStripLorentzAngle>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ class SiStripNoisesFakeESSource : public edm::ESProducer, public edm::EventSetup | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripNoises> ReturnType; | ||
typedef std::unique_ptr<SiStripNoises> ReturnType; | ||
ReturnType produce(const SiStripNoisesRcd&); | ||
|
||
private: | ||
|
@@ -98,7 +98,7 @@ SiStripNoisesFakeESSource::produce(const SiStripNoisesRcd& iRecord) | |
edm::ESHandle<TrackerTopology> tTopo; | ||
iRecord.getRecord<TrackerTopologyRcd>().get(tTopo); | ||
|
||
std::shared_ptr<SiStripNoises> noises{new SiStripNoises}; | ||
std::unique_ptr<SiStripNoises> noises = std::make_unique<SiStripNoises>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ class SiStripPedestalsFakeESSource : public edm::ESProducer, public edm::EventSe | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripPedestals> ReturnType; | ||
typedef std::unique_ptr<SiStripPedestals> ReturnType; | ||
ReturnType produce(const SiStripPedestalsRcd&); | ||
|
||
private: | ||
|
@@ -64,7 +64,7 @@ SiStripPedestalsFakeESSource::produce(const SiStripPedestalsRcd& iRecord) | |
{ | ||
using namespace edm::es; | ||
|
||
std::shared_ptr<SiStripPedestals> pedestals{new SiStripPedestals}; | ||
std::unique_ptr<SiStripPedestals> pedestals = std::make_unique<SiStripPedestals>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,7 @@ SiStripThresholdFakeESSource::produce(const SiStripThresholdRcd& iRecord) | |
{ | ||
using namespace edm::es; | ||
|
||
std::shared_ptr<SiStripThreshold> threshold{new SiStripThreshold}; | ||
std::shared_ptr<SiStripThreshold> threshold = std::make_shared<SiStripThreshold>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The title of this PR is to move to unique_ptr. Can you quickly explain, why this is not extended to all conditions? |
||
|
||
SiStripDetInfoFileReader reader{m_file.fullPath()}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ class SiStripBadModuleFedErrESSource : public edm::ESProducer, public edm::Event | |
|
||
void setIntervalFor( const edm::eventsetup::EventSetupRecordKey&, const edm::IOVSyncValue& iov, edm::ValidityInterval& iValidity ) override; | ||
|
||
typedef std::shared_ptr<SiStripBadStrip> ReturnType; | ||
typedef std::unique_ptr<SiStripBadStrip> ReturnType; | ||
ReturnType produce( const SiStripBadModuleFedErrRcd& ); | ||
|
||
private: | ||
|
@@ -125,7 +125,7 @@ SiStripBadModuleFedErrESSource::produce(const SiStripBadModuleFedErrRcd& iRecord | |
edm::ESHandle<SiStripFedCabling> cabling; | ||
iRecord.getRecord<SiStripFedCablingRcd>().get(cabling); | ||
|
||
std::shared_ptr<SiStripQuality> quality{new SiStripQuality}; | ||
std::unique_ptr<SiStripQuality> quality = std::make_unique<SiStripQuality>(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please use |
||
|
||
DQMStore* dqmStore = edm::Service<DQMStore>().operator->(); | ||
if ( m_readFlag ) { // open requested file | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change to