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

Remove unused vars in multiple pkgs #21221

Merged
merged 7 commits into from Nov 24, 2017
Expand Up @@ -503,7 +503,6 @@ unsigned int l1t::Stage2Layer2EGammaAlgorithmFirmwareImp1::trimmingLutIndex(unsi
unsigned int l1t::Stage2Layer2EGammaAlgorithmFirmwareImp1::returnShape(const l1t::CaloCluster& clus)
/*****************************************************************/
{
const l1t::CaloCluster& clusCopy = clus;

unsigned int shape = 0;
if( (clus.checkClusterFlag(CaloCluster::INCLUDE_N)) ) shape |= (0x1);
Expand Down
4 changes: 0 additions & 4 deletions PhysicsTools/Utilities/src/LumiReWeighting.cc
Expand Up @@ -166,8 +166,6 @@ double LumiReWeighting::weight( const edm::EventBase &e ) {

for(; PHist_iter<PHist.end() ;++PHist_iter) {
edm::ProcessConfiguration PConf = *(PHist_iter);
const edm::ReleaseVersion& Release = PConf.releaseVersion() ;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mdhildreth - please, have a look. Thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, these loops appear to make no sense..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change PConf is now an unused variable.

I checked, and non of the functions called in this loop have side-effects, so there is no useful work being done.

On the other hand, the call to e.processHistory() can throw if there is a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm updating the PR then

const std::string& Process = PConf.processName();

}
// SetFirstFalse();
Expand Down Expand Up @@ -218,8 +216,6 @@ double LumiReWeighting::weightOOT( const edm::EventBase &e ) {

for(; PHist_iter<PHist.end() ;++PHist_iter) {
edm::ProcessConfiguration PConf = *(PHist_iter);
const edm::ReleaseVersion& Release = PConf.releaseVersion() ;
const std::string& Process = PConf.processName();

}
OldLumiSection_ = LumiSection;
Expand Down
1 change: 0 additions & 1 deletion Validation/Geometry/src/MaterialBudgetAction.cc
Expand Up @@ -157,7 +157,6 @@ void MaterialBudgetAction::update(const BeginOfRun* )
int siz = partTable->size();
for (int ii= 0; ii < siz; ii++) {
G4ParticleDefinition * particle = partTable->GetParticle(ii);
const std::string& particleName = particle->GetParticleName();

//--- All processes of this particle
G4ProcessManager * pmanager = particle->GetProcessManager();
Expand Down