Skip to content

Commit bbfae74

Browse files
committed
2 parents a169ddd + 8056b79 commit bbfae74

File tree

699 files changed

+35783
-15460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

699 files changed

+35783
-15460
lines changed

.clang-tidy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ CheckOptions:
44
- { key: readability-identifier-naming.ClassMemberPrefix, value: m }
55
- { key: readability-identifier-naming.ConceptCase, value: CamelCase }
66
- { key: readability-identifier-naming.ConstexprVariableCase, value: CamelCase }
7-
- { key: readability-identifier-naming.ConstexprVariableIgnoredRegexp, value: "^k[A-Z][a-zA-Z0-9]*$" } # Allow "k" prefix.
87
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
98
- { key: readability-identifier-naming.EnumConstantCase, value: CamelCase }
10-
- { key: readability-identifier-naming.EnumConstantIgnoredRegexp, value: "^k?[A-Z][a-zA-Z0-9_]*$" } # Allow "k" prefix and underscores.
9+
- { key: readability-identifier-naming.EnumConstantIgnoredRegexp, value: "^k?[A-Z][a-zA-Z0-9_]*$" } # Allow "k" prefix and non-trailing underscores in PDG names.
1110
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
1211
- { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE }
1312
- { key: readability-identifier-naming.MacroDefinitionIgnoredRegexp, value: "^[A-Z][A-Z0-9_]*_$" } # Allow the trailing underscore in header guards.

.github/workflows/mega-linter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
id: ml
3939
# You can override MegaLinter flavor used to have faster performances
4040
# More info at https://megalinter.io/flavors/
41-
uses: oxsecurity/megalinter@v9.0.1
41+
uses: oxsecurity/megalinter@v9.1.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/
@@ -49,7 +49,7 @@ jobs:
4949

5050
# Upload MegaLinter artifacts
5151
- name: Archive production artifacts
52-
uses: actions/upload-artifact@v4
52+
uses: actions/upload-artifact@v5
5353
if: success() || failure()
5454
with:
5555
name: MegaLinter reports

ALICE3/Core/FastTracker.cxx

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <TObject.h>
2323

2424
#include <fstream>
25+
#include <map>
2526
#include <string>
2627
#include <vector>
2728

@@ -66,20 +67,6 @@ void FastTracker::addDeadPhiRegionInLayer(const std::string& layerName, float ph
6667
layers[layerIdx].addDeadPhiRegion(phiStart, phiEnd);
6768
}
6869

69-
DetLayer FastTracker::GetLayer(int layer, bool ignoreBarrelLayers) const
70-
{
71-
int layerIdx = layer;
72-
if (ignoreBarrelLayers) {
73-
for (int il = 0, trackingLayerIdx = 0; trackingLayerIdx <= layer; il++) {
74-
if (layers[il].isInert())
75-
continue;
76-
trackingLayerIdx++;
77-
layerIdx = il;
78-
}
79-
}
80-
return layers[layerIdx];
81-
}
82-
8370
int FastTracker::GetLayerIndex(const std::string& name) const
8471
{
8572
int i = 0;
@@ -339,7 +326,7 @@ void FastTracker::AddGenericDetector(std::string filename, o2::ccdb::BasicCCDBMa
339326
LOG(fatal) << "Cannot open dead phi regions file " << deadPhiRegions;
340327
return;
341328
}
342-
TGraph* g = (TGraph*)infile.Get(infile.GetListOfKeys()->At(0)->GetName());
329+
TGraph* g = reinterpret_cast<TGraph*>(infile.Get(infile.GetListOfKeys()->At(0)->GetName()));
343330
infile.Close();
344331
addedLayer->setDeadPhiRegions(g);
345332
}

ALICE3/Core/FastTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class FastTracker
4848
/// \param phiStart Start angle of the dead region (in radians)
4949
/// \param phiEnd End angle of the dead region (in radians)
5050
void addDeadPhiRegionInLayer(const std::string& layerName, float phiStart, float phiEnd);
51-
DetLayer GetLayer(const int layer, bool ignoreBarrelLayers = true) const;
51+
DetLayer GetLayer(const int layer) const { return layers[layer]; }
5252
std::vector<DetLayer> GetLayers() const { return layers; }
5353
int GetLayerIndex(const std::string& name) const;
5454
size_t GetNLayers() const { return layers.size(); }

ALICE3/Tasks/ECALqa.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
///
1818

1919
// O2 includes
20-
#include "Framework/AnalysisTask.h"
2120
#include "ALICE3/DataModel/ECAL.h"
22-
#include "Common/DataModel/PIDResponse.h"
23-
#include "ReconstructionDataFormats/PID.h"
21+
22+
#include "Framework/AnalysisTask.h"
2423
#include "Framework/HistogramRegistry.h"
2524
#include "Framework/runDataProcessing.h"
25+
#include "ReconstructionDataFormats/PID.h"
2626

2727
using namespace o2;
2828
using namespace o2::track;

ALICE3/Tasks/alice3-cdeuteron.cxx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
/// \author Alexander Kalweit <alexander.kalweit@cern.ch>, CERN
1414

1515
// O2 includes
16+
#include "Common/Core/RecoDecay.h"
17+
#include "Common/Core/trackUtilities.h"
18+
#include "Common/DataModel/PIDResponseTOF.h"
19+
20+
#include "DCAFitter/DCAFitterN.h"
1621
#include "Framework/AnalysisTask.h"
17-
#include "Framework/runDataProcessing.h"
18-
#include "TLorentzVector.h"
1922
#include "Framework/HistogramRegistry.h"
23+
#include "Framework/runDataProcessing.h"
2024
#include "ReconstructionDataFormats/PID.h"
21-
#include "Common/Core/RecoDecay.h"
22-
#include "DCAFitter/DCAFitterN.h"
23-
#include "Common/DataModel/PIDResponse.h"
24-
#include "Common/Core/trackUtilities.h"
25+
26+
#include "TLorentzVector.h"
2527

2628
using namespace o2;
2729
using namespace o2::framework;
@@ -468,7 +470,7 @@ struct Alice3CDeuteron {
468470

469471
// fitterCasc.getTrack(1).getPxPyPzGlo(pvecbach);
470472
} // End loop on pions
471-
} // End loop on kaons
473+
} // End loop on kaons
472474
histos.fill(HIST("event/candperdeuteron"), ncand);
473475
} // End loop on deuterons
474476
}

ALICE3/Tasks/pidRICHqa.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
///
1717

1818
// O2 includes
19-
#include "Framework/AnalysisTask.h"
2019
#include "ALICE3/DataModel/RICH.h"
21-
#include "Common/DataModel/PIDResponse.h"
20+
#include "Common/DataModel/PIDResponseTOF.h"
21+
22+
#include "Framework/AnalysisTask.h"
2223
#include "ReconstructionDataFormats/PID.h"
2324

2425
using namespace o2;

CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
/PWGLF/Utils @alibuild @sustripathy @skundu692 @mpuccio @gbencedi @abmodak @fmazzasc @maciacco @dmallick2 @smaff92 @ercolessi @romainschotter
5757

5858
# PWG-MM (fused with LF, LF conveners included. Directories to be merged in the future)
59-
/PWGMM @alibuild @sustripathy @skundu692 @aalkin @jgcn
60-
/PWGMM/Mult @alibuild @sustripathy @skundu692 @aalkin @aortizve @ddobrigk @gbencedi @jgcn
61-
/PWGMM/Lumi @alibuild @sustripathy @skundu692 @aalkin @jgcn @gbencedi @abmodak
62-
/PWGMM/UE @alibuild @sustripathy @skundu692 @aalkin @aortizve @jgcn
59+
/PWGMM @alibuild @mpuccio @skundu692 @aalkin @jgcn
60+
/PWGMM/Mult @alibuild @mpuccio @skundu692 @aalkin @aortizve @ddobrigk @gbencedi @jgcn
61+
/PWGMM/Lumi @alibuild @mpuccio @skundu692 @aalkin @jgcn @gbencedi @abmodak
62+
/PWGMM/UE @alibuild @mpuccio @skundu692 @aalkin @aortizve @jgcn
6363

6464
/PWGUD @alibuild @amatyja @rolavick
6565
/PWGJE @alibuild @lhavener @maoyx @nzardosh @fjonasALICE @mfasDa @mhemmer-cern

Common/Core/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ o2physics_add_library(AnalysisCore
1414
OrbitRange.cxx
1515
PID/ParamBase.cxx
1616
PID/PIDTOF.cxx
17+
PID/PIDTOFParamService.cxx
1718
CollisionAssociation.cxx
1819
TrackSelectionDefaults.cxx
1920
EventPlaneHelper.cxx
2021
TableHelper.cxx
2122
MetadataHelper.cxx
2223
CollisionTypeHelper.cxx
2324
FFitWeights.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2::DataFormatsParameters ROOT::EG O2::CCDB ROOT::Physics O2::FT0Base O2::FV0Base)
25+
PUBLIC_LINK_LIBRARIES O2::Framework O2::DataFormatsParameters ROOT::EG O2::CCDB ROOT::Physics O2::FT0Base O2::FV0Base O2::DataFormatsParamTOF)
2526

2627
o2physics_target_root_dictionary(AnalysisCore
2728
HEADERS TrackSelection.h
@@ -34,6 +35,7 @@ o2physics_target_root_dictionary(AnalysisCore
3435
PID/DetectorResponse.h
3536
PID/PIDTOF.h
3637
PID/TPCPIDResponse.h
38+
PID/PIDTOFParamService.h
3739
CollisionTypeHelper.h
3840
FFitWeights.h
3941
LINKDEF AnalysisCoreLinkDef.h)

Common/Core/MetadataHelper.cxx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <Framework/InitContext.h>
2222
#include <Framework/Logger.h>
2323

24+
#include <TSystem.h>
25+
2426
#include <array>
2527
#include <string>
2628

@@ -140,3 +142,31 @@ std::string MetadataHelper::makeMetadataLabel() const
140142
}
141143
return label;
142144
}
145+
146+
std::string MetadataHelper::getO2Version() const
147+
{
148+
if (!mIsInitialized) {
149+
LOG(warning) << "Metadata not initialized";
150+
return "undefined";
151+
}
152+
return get("O2Version");
153+
}
154+
155+
bool MetadataHelper::isCommitInSoftwareTag(const std::string& commitHash, const std::string& ccdbUrl) const
156+
{
157+
const std::string softwareTag = getO2Version();
158+
std::string command = "curl -i -L ";
159+
command += ccdbUrl;
160+
command += "O2Version/CommitHash/";
161+
command += commitHash;
162+
command += "/-1/";
163+
command += "O2Version=" + softwareTag;
164+
command += " 2>&1 | grep --text O2Version:";
165+
// LOG(info) << "Command to check if commit " << commitHash << " is in software tag " << softwareTag << ": " << command;
166+
TString res = gSystem->GetFromPipe(command.c_str());
167+
if (res.Contains(Form("O2Version: %s", softwareTag.c_str()))) {
168+
LOG(debug) << "Commit " << commitHash << " is contained in software tag " << softwareTag;
169+
return true;
170+
}
171+
return false;
172+
}

0 commit comments

Comments
 (0)