Skip to content
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: Remove class members and return function temporaries instead. #21981

Merged
merged 5 commits into from Jan 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -34,7 +34,7 @@ SiStripBackPlaneCorrectionDepESProducer::SiStripBackPlaneCorrectionDepESProducer

std::shared_ptr<SiStripBackPlaneCorrection> SiStripBackPlaneCorrectionDepESProducer::produce(const SiStripBackPlaneCorrectionDepRcd& iRecord)
{

std::shared_ptr<SiStripBackPlaneCorrection> siStripBPC;
edm::LogInfo("SiStripBackPlaneCorrectionDepESProducer") << "Producer called" << std::endl;

std::string latencyRecordName = getLatency.getParameter<std::string>("record");
Expand All @@ -61,11 +61,11 @@ std::shared_ptr<SiStripBackPlaneCorrection> SiStripBackPlaneCorrectionDepESProdu
if ( backPlaneCorrectionRecordName == "SiStripBackPlaneCorrectionRcd"){
edm::ESHandle<SiStripBackPlaneCorrection> siStripBackPlaneCorrection;
iRecord.getRecord<SiStripBackPlaneCorrectionRcd>().get(backPlaneCorrectionLabel, siStripBackPlaneCorrection);
siStripBPC_.reset(new SiStripBackPlaneCorrection(*(siStripBackPlaneCorrection.product())));
siStripBPC = std::make_shared<SiStripBackPlaneCorrection>(*(siStripBackPlaneCorrection.product()));
} else edm::LogError("SiStripBackPlaneCorrectionDepESProducer") << "[SiStripBackPlaneCorrectionDepESProducer::produce] No Lorentz Angle Record found " << std::endl;


return siStripBPC_;
return siStripBPC;


}
Expand Down
Expand Up @@ -36,7 +36,6 @@ class SiStripBackPlaneCorrectionDepESProducer : public edm::ESProducer {
edm::ParameterSet getPeak;
edm::ParameterSet getDeconv;

std::shared_ptr<SiStripBackPlaneCorrection> siStripBPC_;

};

Expand Down
Expand Up @@ -30,14 +30,13 @@ SiStripDelayESProducer::SiStripDelayESProducer(const edm::ParameterSet& iConfig)

edm::LogInfo("SiStripDelayESProducer") << "ctor" << std::endl;

delay.reset(new SiStripDelay());
}


std::shared_ptr<SiStripDelay> SiStripDelayESProducer::produce(const SiStripDelayRcd& iRecord)
{
edm::LogInfo("SiStripDelayESProducer") << "produce called" << std::endl;

auto delay = std::make_shared<SiStripDelay>();
delay->clear();

edm::ESHandle<SiStripBaseDelay> baseDelay;
Expand Down
Expand Up @@ -33,7 +33,6 @@ class SiStripDelayESProducer : public edm::ESProducer {
typedef std::vector< edm::ParameterSet > Parameters;
Parameters toGet;

std::shared_ptr<SiStripDelay> delay;
};

#endif
Expand Up @@ -36,7 +36,7 @@ SiStripLorentzAngleDepESProducer::SiStripLorentzAngleDepESProducer(const edm::Pa

std::shared_ptr<SiStripLorentzAngle> SiStripLorentzAngleDepESProducer::produce(const SiStripLorentzAngleDepRcd& iRecord)
{

std::shared_ptr<SiStripLorentzAngle> siStripLA;
edm::LogInfo("SiStripLorentzAngleDepESProducer") << "Producer called" << std::endl;

std::string latencyRecordName = getLatency.getParameter<std::string>("record");
Expand All @@ -63,11 +63,11 @@ std::shared_ptr<SiStripLorentzAngle> SiStripLorentzAngleDepESProducer::produce(c
if ( lorentzAngleRecordName == "SiStripLorentzAngleRcd"){
edm::ESHandle<SiStripLorentzAngle> siStripLorentzAngle;
iRecord.getRecord<SiStripLorentzAngleRcd>().get(lorentzAngleLabel, siStripLorentzAngle);
siStripLA_.reset(new SiStripLorentzAngle(*(siStripLorentzAngle.product())));
siStripLA.reset(new SiStripLorentzAngle(*(siStripLorentzAngle.product())));
} else edm::LogError("SiStripLorentzAngleDepESProducer") << "[SiStripLorentzAngleDepESProducer::produce] No Lorentz Angle Record found " << std::endl;


return siStripLA_;
return siStripLA;


}
Expand Down
Expand Up @@ -36,7 +36,6 @@ class SiStripLorentzAngleDepESProducer : public edm::ESProducer {
edm::ParameterSet getPeak;
edm::ParameterSet getDeconv;

std::shared_ptr<SiStripLorentzAngle> siStripLA_;

};

Expand Down
Expand Up @@ -31,13 +31,12 @@ SiStripQualityESProducer::SiStripQualityESProducer(const edm::ParameterSet& iCon

edm::LogInfo("SiStripQualityESProducer") << "ctor" << std::endl;

quality.reset(new SiStripQuality());
}


std::shared_ptr<SiStripQuality> SiStripQualityESProducer::produce(const SiStripQualityRcd& iRecord)
{

auto quality = std::make_shared<SiStripQuality>();
edm::LogInfo("SiStripQualityESProducer") << "produce called" << std::endl;

quality->clear();
Expand Down
Expand Up @@ -33,7 +33,6 @@ class SiStripQualityESProducer : public edm::ESProducer {
typedef std::vector< edm::ParameterSet > Parameters;
Parameters toGet;

std::shared_ptr<SiStripQuality> quality;
};

#endif