Skip to content

Commit 87fb567

Browse files
fixed linter
1 parent 44bfbda commit 87fb567

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

PWGMM/Lumi/Tasks/LumiFDDFT0.cxx

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040

4141
#include <array>
4242
#include <cmath>
43-
#include <iostream>
44-
#include <map>
4543
#include <vector>
4644

4745
using namespace o2;
@@ -188,7 +186,7 @@ struct LumiFDDFT0 {
188186
o2::soa::Join<o2::aod::Tracks, o2::aod::TracksCov,
189187
o2::aod::TracksExtra> const& unfiltered_tracks)
190188
{
191-
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
189+
const auto& bc = collision.bc_as<aod::BCsWithTimestamps>();
192190
Long64_t relTS = bc.timestamp() - fttimestamp;
193191
Long64_t globalBC = bc.globalBC();
194192
std::vector<int64_t> vec_globID_contr = {};
@@ -276,38 +274,38 @@ struct LumiFDDFT0 {
276274

277275
// now get information for FDD
278276
if (collision.has_foundFDD()) {
279-
auto fdd = collision.foundFDD();
277+
const auto& fdd = collision.foundFDD();
280278
mTriggerFDD = fdd.triggerMask();
281279
timeaFDD = fdd.timeA();
282280
timecFDD = fdd.timeC();
283-
for (auto amplitude : fdd.chargeA()) {
281+
for (const auto& amplitude : fdd.chargeA()) {
284282
chargeaFDD += amplitude;
285283
}
286-
for (auto amplitude : fdd.chargeC()) {
284+
for (const auto& amplitude : fdd.chargeC()) {
287285
chargecFDD += amplitude;
288286
}
289287
} // fdd
290288

291289
if (collision.has_foundFT0()) {
292-
auto ft0 = collision.foundFT0();
290+
const auto& ft0 = collision.foundFT0();
293291
mTriggerFT0 = ft0.triggerMask();
294292
timeaFT0 = ft0.timeA();
295293
timecFT0 = ft0.timeC();
296-
for (auto amplitude : ft0.amplitudeA()) {
294+
for (const auto& amplitude : ft0.amplitudeA()) {
297295
chargeaFT0 += amplitude;
298296
}
299297

300-
for (auto amplitude : ft0.amplitudeC()) {
298+
for (const auto& amplitude : ft0.amplitudeC()) {
301299
chargecFT0 += amplitude;
302300
}
303301
} // ft0
304302

305303
// FV0
306304
if (collision.has_foundFV0()) {
307-
auto fv0 = collision.foundFV0();
305+
const auto& fv0 = collision.foundFV0();
308306
mTriggerFV0 = fv0.triggerMask();
309307
timeaFV0 = fv0.time();
310-
for (auto amplitude : fv0.amplitude()) {
308+
for (const auto& amplitude : fv0.amplitude()) {
311309
chargeaFV0 += amplitude;
312310
}
313311
} // fv0
@@ -365,15 +363,15 @@ struct LumiFDDFT0 {
365363
}
366364

367365
// Scan over the FDD table and store charge and time along with globalBC
368-
for (auto& fdd : fdds) {
369-
auto bc = fdd.bc_as<BCsWithTimestamps>();
366+
for (const auto& fdd : fdds) {
367+
const auto& bc = fdd.bc_as<BCsWithTimestamps>();
370368
if (!bc.timestamp())
371369
continue;
372370
if (mRunNumber != bc.runNumber()) {
373371
o2::parameters::GRPMagField* grpo = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(ccdbpath_grp, bc.timestamp());
374372
if (grpo != nullptr) {
375373
o2::base::Propagator::initFieldFromGRP(grpo);
376-
std::cout << "run " << bc.runNumber() << std::endl;
374+
LOG(info) << "run " << bc.runNumber();
377375
} else {
378376
LOGF(fatal,
379377
"GRP object is not available in CCDB for run=%d at timestamp=%llu",
@@ -414,8 +412,8 @@ struct LumiFDDFT0 {
414412
} // end of fdd table
415413

416414
// Scan over the FT0 table and store charge and time along with globalBC
417-
for (auto& ft0 : ft0s) {
418-
auto bc = ft0.bc_as<BCsWithTimestamps>();
415+
for (const auto& ft0 : ft0s) {
416+
const auto& bc = ft0.bc_as<BCsWithTimestamps>();
419417
if (!bc.timestamp())
420418
continue;
421419
Long64_t relTS = bc.timestamp() - fttimestamp;
@@ -424,17 +422,17 @@ struct LumiFDDFT0 {
424422
histoslite.fill(HIST("BCFT0"), localBC);
425423
double chargeaFT0 = 0.;
426424
double chargecFT0 = 0.;
427-
for (auto amplitude : ft0.amplitudeA()) {
425+
for (const auto& amplitude : ft0.amplitudeA()) {
428426
chargeaFT0 += amplitude;
429427
}
430-
for (auto amplitude : ft0.amplitudeC()) {
428+
for (const auto& amplitude : ft0.amplitudeC()) {
431429
chargecFT0 += amplitude;
432430
}
433431
rowEventInfoft0(relTS, globalBC, bc.inputMask(), ft0.triggerMask(), ft0.timeA(), ft0.timeC(), chargeaFT0, chargecFT0);
434432
} // end of ft0 table
435433

436434
// Scan over the FV0 table and store charge and time along with globalBC
437-
for (auto& fv0 : fv0s) {
435+
for (const auto& fv0 : fv0s) {
438436
auto bc = fv0.bc_as<BCsWithTimestamps>();
439437
if (!bc.timestamp())
440438
continue;
@@ -444,7 +442,7 @@ struct LumiFDDFT0 {
444442
histoslite.fill(HIST("BCFV0"), localBC);
445443

446444
double chargeaFV0 = 0.;
447-
for (auto amplitude : fv0.amplitude()) {
445+
for (const auto& amplitude : fv0.amplitude()) {
448446
chargeaFV0 += amplitude;
449447
}
450448
rowEventInfofv0(relTS, globalBC, bc.inputMask(), fv0.triggerMask(), fv0.time(), chargeaFV0);

0 commit comments

Comments
 (0)