Skip to content

Commit e41229a

Browse files
committed
Make megalinter happy
1 parent 613ef86 commit e41229a

5 files changed

Lines changed: 15 additions & 16 deletions

File tree

‎ALICE3/Core/DetLayer.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,25 @@ struct DetLayer {
108108
TString mName;
109109

110110
// position variables
111-
float mR; // radius in centimeters
112-
float mZ; // mZ dimension in centimeters
111+
float mR{}; // radius in centimeters
112+
float mZ{}; // mZ dimension in centimeters
113113

114114
// material variables
115-
float mX0; // radiation length
116-
float mXrho; // density
115+
float mX0{}; // radiation length
116+
float mXrho{}; // density
117117

118118
// resolution variables for active layers
119-
float mResRPhi; // RPhi resolution in centimeters
120-
float mResZ; // Z resolution in centimeters
119+
float mResRPhi{}; // RPhi resolution in centimeters
120+
float mResZ{}; // Z resolution in centimeters
121121

122122
// efficiency
123-
float mEff; // detection efficiency
123+
float mEff{1.f}; // detection efficiency
124124

125125
// dead regions in phi (in radians)
126126
TGraph* mDeadPhiRegions = nullptr;
127127

128128
// layer type
129-
int mType; // 0: undefined/inert, 1: silicon, 2: gas/tpc
129+
int mType{0}; // 0: undefined/inert, 1: silicon, 2: gas/tpc
130130
};
131131

132132
} // namespace o2::fastsim

‎ALICE3/Core/FastTracker.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class FastTracker
5858
/// \param phiEnd End angle of the dead region (in radians)
5959
void addDeadPhiRegionInLayer(const std::string& layerName, float phiStart, float phiEnd);
6060
[[nodiscard]] DetLayer getLayer(const int layer) const { return layers[layer]; }
61-
[[nodiscard]] std::vector<DetLayer> getLayers() const { return layers; }
61+
[[nodiscard]] const std::vector<DetLayer>& getLayers() const { return layers; }
6262
[[nodiscard]] int getLayerIndex(const std::string& name) const;
6363
[[nodiscard]] size_t getNLayers() const { return layers.size(); }
6464
[[nodiscard]] bool isLayerInert(const int layer) const { return layers[layer].isInert(); }

‎ALICE3/Core/GeometryContainer.cxx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
#include "Common/Core/TableHelper.h"
2121

22-
#include <CCDB/BasicCCDBManager.h>
2322
#include <Framework/InitContext.h>
2423
#include <Framework/Logger.h>
2524

‎ALICE3/Core/GeometryContainer.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ struct GeometryEntry {
3636
// Default constructor
3737
GeometryEntry() = default;
3838
explicit GeometryEntry(const std::string& filename, o2::ccdb::BasicCCDBManager* ccdb = nullptr)
39+
: mFileName(ConfigurationParser::accessFile(filename, "./.ALICE3/Configuration/", ccdb))
3940
{
40-
mFileName = ConfigurationParser::accessFile(filename, "./.ALICE3/Configuration/", ccdb);
4141
mConfigurations = ConfigurationParser::parseTEnvConfiguration(mFileName, mLayerNames);
4242
LOG(info) << "Loaded geometry configuration from file: " << mFileName << " with " << mLayerNames.size() << " layers.";
4343
if (mLayerNames.empty()) {
4444
LOG(warning) << "No layers found in geometry configuration file: " << filename;
4545
}
4646
}
4747

48-
std::map<std::string, std::map<std::string, std::string>> getConfigurations() const { return mConfigurations; }
48+
const std::map<std::string, std::map<std::string, std::string>>& getConfigurations() const { return mConfigurations; }
4949
std::map<std::string, std::string> getConfiguration(const std::string& layerName) const;
50-
std::vector<std::string> getLayerNames() const { return mLayerNames; }
50+
const std::vector<std::string>& getLayerNames() const { return mLayerNames; }
5151
bool hasValue(const std::string& layerName, const std::string& key) const;
5252
std::string getValue(const std::string& layerName, const std::string& key, bool require = true) const;
5353
void setValue(const std::string& layerName, const std::string& key, const std::string& value) { mConfigurations[layerName][key] = value; }

‎ALICE3/TableProducer/alice3TrackingTranslator.cxx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ struct Alice3TrackingTranslator {
419419
// Convert tracks from ACTS to ALICE format
420420
const size_t nParticlesSim = fileParticlesSim.m_vx->size();
421421
const size_t nTracks = fileTracksummary.m_ePX_fit->size();
422-
std::vector<size_t> idMCparticles;
422+
// std::vector<size_t> idMCparticles; // fixme: unused
423423

424424
// local index k within this event -> global AO2D index
425425
int firstIdxThisEvent = tableStoredMcParticles.lastIndex() + 1;
@@ -438,7 +438,7 @@ struct Alice3TrackingTranslator {
438438
fileParticlesSim.m_particle->at(iPart),
439439
fileParticlesSim.m_generation->at(iPart),
440440
fileParticlesSim.m_sub_particle->at(iPart));
441-
barcodeToGlobalIdx[key] = firstIdxThisEvent + (int)iPart;
441+
barcodeToGlobalIdx[key] = firstIdxThisEvent + static_cast<int>(iPart);
442442

443443
if (iPart == 0) {
444444
tableMcCollisions(0, // mccollision::BCId,
@@ -486,7 +486,7 @@ struct Alice3TrackingTranslator {
486486
}
487487
}
488488
for (size_t iPart = 0; iPart < nParticlesSim; ++iPart) {
489-
int globalIdx = firstIdxThisEvent + (int)iPart;
489+
int globalIdx = firstIdxThisEvent + static_cast<int>(iPart);
490490
int motherIdx = -1;
491491
if (GlobalIdxToMotherIdx.find(globalIdx) != GlobalIdxToMotherIdx.end()) {
492492
motherIdx = GlobalIdxToMotherIdx[globalIdx];

0 commit comments

Comments
 (0)