Skip to content

Commit

Permalink
Merge pull request #105 from kreczko/fix-warnings
Browse files Browse the repository at this point in the history
Fixing some compilation warnings
  • Loading branch information
senkin committed Jul 15, 2014
2 parents 3873345 + 0e6188b commit 12bd625
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
15 changes: 10 additions & 5 deletions interface/EventCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,23 @@ struct Counter {
unsigned int dim1, dim2, dim3;
integerCounter unweightedEntries;
floatCounter weightedEntries;
unsigned int eventType;
// unsigned int eventType;

public:
Counter() {
}
Counter() :
dim1(1),
dim2(1),
dim3(1),
unweightedEntries(boost::extents[dim1][dim2][dim3]),
weightedEntries(boost::extents[dim1][dim2][dim3]) {
}

Counter(unsigned int dimension1, unsigned int dimension2, unsigned int dimension3) :
dim1(dimension1),
dim2(dimension2),
dim3(dimension3),
unweightedEntries(boost::extents[dimension1][dimension2][dimension3]),
weightedEntries(boost::extents[dimension1][dimension2][dimension3]) {
unweightedEntries(boost::extents[dim1][dim2][dim3]),
weightedEntries(boost::extents[dim1][dim2][dim3]) {
}

~Counter() {
Expand Down
2 changes: 1 addition & 1 deletion interface/Readers/METCorrReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class METCorrReader {
VariableReader<double> corryReader;

double corrx, corry;
METCorrections::value usedCorrections;
// METCorrections::value usedCorrections;
};

}
Expand Down
2 changes: 1 addition & 1 deletion interface/RecoObjects/Muon.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Muon: public Lepton {
double normalisedChi2_;
int numberOfValidMuonHits_, numberOfValidPixelHits_, numberOfValidHits_, pixelLayersWithMeasurement_, trackerLayersWithMeasurement_;
int numberOfMatches_, numberOfMatchedStations_;
int muon_scale_factor_systematic_;
// int muon_scale_factor_systematic_;
};

typedef boost::shared_ptr<Muon> MuonPointer;
Expand Down
4 changes: 2 additions & 2 deletions src/Analysers/HLTriggerTurnOnAnalyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void HLTriggerTurnOnAnalyser::analyse(const EventPtr event) {
}
}

if (!goodElectrons.size() > 0)
if (goodElectrons.size() < 1)
return; //need at least one good electron to continue

ElectronPointer mostIsolatedElectron = goodElectrons.front();
Expand Down Expand Up @@ -86,7 +86,7 @@ void HLTriggerTurnOnAnalyser::analyse(const EventPtr event) {

}

if (!cleanedJets.size() > 0)
if (cleanedJets.size() < 1)
return; //need at least one jet to continue

//set jet binning for HLT analysis
Expand Down
3 changes: 2 additions & 1 deletion src/Event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <iostream>
#include <numeric>
#include <set>
#include <vector>

using namespace std;

Expand Down Expand Up @@ -269,7 +270,7 @@ const METPointer Event::GenMET() const {
const METPointer Event::MET(METAlgorithm::value type) const {
unsigned int index(type);
if (index >= mets_.size())
throw "Trying to access non-available MET at " + index;
throw "Trying to access non-available MET at " + std::to_string(index);

return mets_.at(index);
}
Expand Down
6 changes: 2 additions & 4 deletions src/Readers/METCorrReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ METCorrReader::METCorrReader() :
corrxReader(), //
corryReader(), //
corrx(), //
corry(), //
usedCorrections(METCorrections::pfMetSysShiftCorrections) {
corry() {

}

METCorrReader::METCorrReader(TChainPointer input, METCorrections::value correction) :
corrxReader(input, METCorrections::prefixes.at(correction) + ".x"), //
corryReader(input, METCorrections::prefixes.at(correction) + ".y"), //
corrx(), //
corry(), //
usedCorrections(METCorrections::pfMetSysShiftCorrections) {
corry() {

}

Expand Down
5 changes: 5 additions & 0 deletions src/RecoObjects/Jet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ const ParticlePointer Jet::smear_jet(const ParticlePointer jet, const ParticlePo
break;
default:
scaleFactor = 1.052;
break;
}
}
if (fabs(jet->eta()) >= 0.5 && fabs(jet->eta()) < 1.1) {
Expand All @@ -157,6 +158,7 @@ const ParticlePointer Jet::smear_jet(const ParticlePointer jet, const ParticlePo
break;
default:
scaleFactor = 1.057;
break;
}
}
if (fabs(jet->eta()) >= 1.1 && fabs(jet->eta()) < 1.7) {
Expand All @@ -169,6 +171,7 @@ const ParticlePointer Jet::smear_jet(const ParticlePointer jet, const ParticlePo
break;
default:
scaleFactor = 1.096;
break;
}
}
if (fabs(jet->eta()) >= 1.7 && fabs(jet->eta()) < 2.3) {
Expand All @@ -181,6 +184,7 @@ const ParticlePointer Jet::smear_jet(const ParticlePointer jet, const ParticlePo
break;
default:
scaleFactor = 1.134;
break;
}
}
if (fabs(jet->eta()) >= 2.3 && fabs(jet->eta()) < 5.0) {
Expand All @@ -193,6 +197,7 @@ const ParticlePointer Jet::smear_jet(const ParticlePointer jet, const ParticlePo
break;
default:
scaleFactor = 1.288;
break;
}
}
//use raw scaleFactors from above to calculate the final factors to apply
Expand Down
4 changes: 2 additions & 2 deletions src/TtbarHypothesis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ TtbarHypothesis::~TtbarHypothesis() {
}

bool TtbarHypothesis::isValid() const {
bool hasObjects = leptonFromW != 0 && neutrinoFromW != 0 && jet1FromW != 0 && jet2FromW != 0 && hadronicBJet != 0
&& leptonicBjet;
bool hasObjects = !leptonFromW && !neutrinoFromW && !jet1FromW && !jet2FromW && !hadronicBJet
&& !leptonicBjet;
return hasObjects;

}
Expand Down

0 comments on commit 12bd625

Please sign in to comment.