Skip to content

Commit 5b9c7a7

Browse files
committed
Run code format
1 parent 46b84aa commit 5b9c7a7

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

CalibMuon/DTCalibration/test/DBTools/DTVDriftAnalyzer.cc

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,19 @@ using namespace edm;
2222
using namespace std;
2323

2424
DTVDriftAnalyzer::DTVDriftAnalyzer(const ParameterSet& pset)
25-
: readLegacyVDriftDB(pset.getParameter<bool>("readLegacyVDriftDB")) {
25+
: readLegacyVDriftDB(pset.getParameter<bool>("readLegacyVDriftDB")) {
2626
// The root file which will contain the histos
2727
string rootFileName = pset.getUntrackedParameter<string>("rootFileName");
2828
theFile = new TFile(rootFileName.c_str(), "RECREATE");
2929
theFile->cd();
3030
mTimeMapToken_ = esConsumes<edm::Transition::BeginRun>();
3131
vDriftMapToken_ = esConsumes<edm::Transition::BeginRun>();
32-
3332
}
3433

3534
DTVDriftAnalyzer::~DTVDriftAnalyzer() { theFile->Close(); }
3635

3736
void DTVDriftAnalyzer::beginRun(const edm::Run& run, const edm::EventSetup& eventSetup) {
38-
39-
edm::LogInfo("DTVDriftAnalyzer") <<"doing beginRun"<<endl;
37+
edm::LogInfo("DTVDriftAnalyzer") << "doing beginRun" << endl;
4038
if (readLegacyVDriftDB) {
4139
ESHandle<DTMtime> mTime = eventSetup.getHandle(mTimeMapToken_);
4240
mTimeMap = &*mTime;
@@ -60,44 +58,41 @@ void DTVDriftAnalyzer::endJob() {
6058
// Loop over DB entries
6159

6260
map<uint32_t, pair<float, float>> values;
63-
6461

6562
if (readLegacyVDriftDB) {
66-
edm::LogInfo("DTVDriftAnalyzer") << "Reading Legacy VDrift DB" <<endl;
67-
63+
edm::LogInfo("DTVDriftAnalyzer") << "Reading Legacy VDrift DB" << endl;
64+
6865
for (DTMtime::const_iterator mtime = mTimeMap->begin(); mtime != mTimeMap->end(); ++mtime) {
69-
7066
//edm::LogInfo("DTVDrift")<< typeid(mtime).name() <<endl;
71-
67+
7268
DTWireId wireId(
73-
(*mtime).first.wheelId, (*mtime).first.stationId, (*mtime).first.sectorId, (*mtime).first.slId, 0, 0);
69+
(*mtime).first.wheelId, (*mtime).first.stationId, (*mtime).first.sectorId, (*mtime).first.slId, 0, 0);
7470
float vdrift;
7571
float reso;
7672
DetId detId(wireId.rawId());
7773
// vdrift is cm/ns , resolution is cm
7874
mTimeMap->get(detId, vdrift, reso, DTVelocityUnits::cm_per_ns);
7975
values[wireId.rawId()] = make_pair(vdrift, reso);
80-
8176
}
82-
77+
8378
} else {
8479
for (DTRecoConditions::const_iterator vd = vDriftMap_->begin(); vd != vDriftMap_->end(); ++vd) {
8580
DTWireId wireId(vd->first);
8681
float vdrift = vDriftMap_->get(wireId);
8782
values[vd->first] = make_pair(vdrift, 0.f);
88-
}
83+
}
8984
}
9085

9186
for (map<uint32_t, pair<float, float>>::const_iterator it = values.begin(); it != values.end(); ++it) {
9287
float vdrift = it->second.first;
9388
float reso = it->second.second;
9489
DTWireId wireId(it->first);
95-
if (wireId.wheel()==0 && wireId.superlayer()==1)
90+
if (wireId.wheel() == 0 && wireId.superlayer() == 1)
9691
// Print only for wheel=0 and SL=1
9792
// vdrift is cm/ns , resolution is cm
9893
edm::LogVerbatim("DTVDriftAnalyzer") << "Wire: " << wireId << endl
99-
<< " vdrift (cm/ns): " << vdrift << endl
100-
<< " reso (cm): " << reso << endl;
94+
<< " vdrift (cm/ns): " << vdrift << endl
95+
<< " reso (cm): " << reso << endl;
10196

10297
//Define an histo for each wheel and each superlayer type
10398
TH1D* hVDriftHisto = theVDriftHistoMap[make_pair(wireId.wheel(), wireId.superlayer())];

CalibMuon/DTCalibration/test/DBTools/DTVDriftAnalyzer.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ class TFile;
2525
class TH1D;
2626

2727
class DTVDriftAnalyzer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
28-
public:
29-
DTVDriftAnalyzer(const edm::ParameterSet& pset);
30-
31-
virtual ~DTVDriftAnalyzer();
32-
void beginJob() override {}
33-
void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
34-
void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
35-
void endRun(const edm::Run& run, const edm::EventSetup& setup) override {}
36-
void endJob() override;
28+
public:
29+
DTVDriftAnalyzer(const edm::ParameterSet& pset);
30+
31+
virtual ~DTVDriftAnalyzer();
32+
void beginJob() override {}
33+
void beginRun(const edm::Run& run, const edm::EventSetup& setup) override;
34+
void analyze(const edm::Event& event, const edm::EventSetup& setup) override {}
35+
void endRun(const edm::Run& run, const edm::EventSetup& setup) override {}
36+
void endJob() override;
3737

3838
protected:
3939
private:

0 commit comments

Comments
 (0)