Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Common/CCDB/EventSelectionParams.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -16,7 +16,7 @@

// o2-linter: disable=name/workflow-file

#include "EventSelectionParams.h"
#include "Common/CCDB/EventSelectionParams.h"

#include <cstddef>
#include <cstring>
Expand Down Expand Up @@ -102,18 +102,18 @@
selectionMuonWithPileupCuts[kNoBGZNA] = 1;
selectionMuonWithoutPileupCuts[kNoBGZNA] = 1;
}
if (system == 2) { // additional ZDC checks in Ap

Check failure on line 105 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
selectionBarrel[kNoBGZNC] = 1;
selectionMuonWithPileupCuts[kNoBGZNC] = 1;
selectionMuonWithoutPileupCuts[kNoBGZNC] = 1;
}
if (system == 3) { // AA

Check failure on line 110 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
selectionBarrel[kIsBBZAC] = 1;
selectionMuonWithPileupCuts[kIsBBZAC] = 1;
selectionMuonWithoutPileupCuts[kIsBBZAC] = 1;
}
} else if (run == 2) {

Check failure on line 115 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (system == 0 || system == 1 || system == 2) { // pp, pA or Ap

Check failure on line 116 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
// default barrel selection
selectionBarrel[kIsBBV0A] = 1;
selectionBarrel[kIsBBV0C] = 1;
Expand Down Expand Up @@ -154,13 +154,13 @@
selectionMuonWithoutPileupCuts[kNoBGZNA] = 1;
}

if (system == 2) { // additional ZDC checks in Ap

Check failure on line 157 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
selectionBarrel[kNoBGZNC] = 1;
selectionMuonWithPileupCuts[kNoBGZNC] = 1;
selectionMuonWithoutPileupCuts[kNoBGZNC] = 1;
}

if (system == 3) { // AA

Check failure on line 163 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
selectionBarrel[kIsBBV0A] = 1;
selectionBarrel[kIsBBV0C] = 1;
selectionBarrel[kIsBBZAC] = 1;
Expand Down Expand Up @@ -210,7 +210,7 @@
return selectionBarrel;
} else if (iSelection == 1) {
return selectionMuonWithPileupCuts;
} else if (iSelection == 2) {

Check failure on line 213 in Common/CCDB/EventSelectionParams.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return selectionMuonWithoutPileupCuts;
}
return NULL;
Expand Down
3 changes: 2 additions & 1 deletion Common/CCDB/EventSelectionParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
#ifndef COMMON_CCDB_EVENTSELECTIONPARAMS_H_
#define COMMON_CCDB_EVENTSELECTIONPARAMS_H_

#include <Rtypes.h>
#include <TMath.h>

#include <Rtypes.h>

namespace o2::aod::evsel
{
// Event selection criteria
Expand Down
15 changes: 8 additions & 7 deletions Common/CCDB/macros/ctpRateF.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "Common/CCDB/ctpRateFetcher.h"

#include <CCDB/BasicCCDBManager.h>
#include <CommonConstants/LHCConstants.h>
#include <DataFormatsCTP/Configuration.h>
#include <DataFormatsCTP/Scalers.h>
#include <DataFormatsParameters/GRPLHCIFData.h>

#include <map>
#include <vector>

#include "CommonConstants/LHCConstants.h"
#include "DataFormatsCTP/Configuration.h"
#include "DataFormatsCTP/Scalers.h"
#include "DataFormatsParameters/GRPLHCIFData.h"
#include "CCDB/BasicCCDBManager.h"
#include "Common/CCDB/ctpRateFetcher.h"

struct ctpRateFetcher {
ctpRateFetcher() = default;
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName);
Expand Down Expand Up @@ -89,7 +90,7 @@
getCTPscalers(ccdb, timeStamp, runNumber);
getLHCIFdata(ccdb, timeStamp, runNumber);
std::vector<o2::ctp::CTPScalerRecordO2> recs = mScalers->getScalerRecordO2();
if (recs[0].scalersInps.size() == 48) {

Check failure on line 93 in Common/CCDB/macros/ctpRateF.C

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return pileUpCorrection(mScalers->getRateGivenT(timeStamp * 1.e-3, input, 7).second);
} else {
LOG(error) << "Inputs not available";
Expand Down Expand Up @@ -120,7 +121,7 @@
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName)
{
if (sourceName.find("ZNC") != std::string::npos) {
if (runNumber < 544448) {

Check failure on line 124 in Common/CCDB/macros/ctpRateF.C

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return fetchCTPratesInputs(ccdb, timeStamp, runNumber, 25) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
} else {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "C1ZNC-B-NOPF-CRU", 6) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
Expand Down
12 changes: 8 additions & 4 deletions Common/CCDB/macros/upload_event_selection_params.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "CCDB/CcdbApi.h"
#include "CCDB/BasicCCDBManager.h"
#include "TString.h"
#include "Common/CCDB/EventSelectionParams.h"

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>

#include <TString.h>

#include <map>
#include <string>
#include "EventSelectionParams.h"

using std::map;
using std::string;

Expand Down
15 changes: 11 additions & 4 deletions Common/CCDB/macros/upload_event_selection_params_run3.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "CCDB/CcdbApi.h"
#include "TString.h"
#include "Common/CCDB/EventSelectionParams.h"

#include <CCDB/CcdbApi.h>
#include <Framework/Logger.h>

#include <TString.h>

#include <RtypesCore.h>

#include <cstdlib>
#include <map>
#include <string>
#include "EventSelectionParams.h"
using std::map;
using std::string;

Expand Down Expand Up @@ -140,4 +147,4 @@ void fillMapOfCustomOrbitShifts(std::map<int, int>& mapOrbitShift)
mapOrbitShift[523797] = 41;
mapOrbitShift[523821] = 36;
mapOrbitShift[523897] = 38;
}
}
17 changes: 11 additions & 6 deletions Common/CCDB/macros/upload_trigger_aliases.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "CCDB/CcdbApi.h"
#include "CCDB/BasicCCDBManager.h"
#include "TObjArray.h"
#include "TriggerAliases.h"
#include "TTree.h"
#include "TString.h"
#include "Common/CCDB/TriggerAliases.h"

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <Framework/Logger.h>

#include <TObjArray.h>
#include <TString.h>

#include <RtypesCore.h>

#include <fstream>
#include <map>
#include <string>
Expand Down
19 changes: 12 additions & 7 deletions Common/CCDB/macros/upload_trigger_aliases_run3.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#include "DataFormatsCTP/Configuration.h"
#include "CCDB/CcdbApi.h"
#include "CCDB/BasicCCDBManager.h"
#include "TObjArray.h"
#include "TriggerAliases.h"
#include "TTree.h"
#include "TString.h"
#include "Common/CCDB/TriggerAliases.h"

#include <CCDB/BasicCCDBManager.h>
#include <CCDB/CcdbApi.h>
#include <DataFormatsCTP/Configuration.h>
#include <Framework/Logger.h>

#include <TObjArray.h>
#include <TString.h>

#include <RtypesCore.h>

#include <fstream>
#include <map>
#include <string>
Expand Down
6 changes: 3 additions & 3 deletions Common/Core/EventMixing.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifndef ANALYSIS_CORE_EVENTMIXING_H_
#define ANALYSIS_CORE_EVENTMIXING_H_
#ifndef COMMON_CORE_EVENTMIXING_H_
#define COMMON_CORE_EVENTMIXING_H_

namespace eventmixing
{
Expand Down Expand Up @@ -47,4 +47,4 @@ static int getMixingBin(const T1& vtxBins, const T1& multBins, const T2& vtx, co
}
}; // namespace eventmixing

#endif /* ANALYSIS_CORE_EVENTMIXING_H_ */
#endif // COMMON_CORE_EVENTMIXING_H_
4 changes: 3 additions & 1 deletion Common/Core/FFitWeights.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

#include "FFitWeights.h"

#include "Framework/Logger.h"
#include <Framework/Logger.h>

#include <TCollection.h>
#include <TH1.h>
#include <TH2.h>
#include <TNamed.h>
#include <TObjArray.h>
#include <TProfile.h>
#include <TSpline.h>
#include <TString.h>

Expand Down
1 change: 1 addition & 0 deletions Common/Core/MetadataHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <Framework/InitContext.h>
#include <Framework/Logger.h>

#include <TString.h>
#include <TSystem.h>

#include <array>
Expand Down
13 changes: 13 additions & 0 deletions Common/Core/PID/PIDTOFParamService.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,24 @@

#include "PIDTOFParamService.h"

#include "Common/Core/CollisionTypeHelper.h"
#include "Common/Core/MetadataHelper.h"

#include <CCDB/BasicCCDBManager.h>
#include <DataFormatsParameters/GRPLHCIFData.h>
#include <DataFormatsTOF/ParameterContainers.h>
#include <Framework/CommonServices.h>
#include <Framework/Logger.h>
#include <Framework/Plugins.h>
#include <Framework/ServiceHandle.h>
#include <Framework/ServiceSpec.h>
#include <Framework/TypeIdHelpers.h>
#include <PID/PIDTOF.h>

#include <TGraph.h>

#include <chrono>
#include <cstdint>
#include <map>
#include <string>

Expand Down
20 changes: 11 additions & 9 deletions Common/Core/PID/PIDTOFParamService.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@
#include "Common/Core/PID/PIDTOF.h"
#include "Common/Core/TableHelper.h"

#include "CCDB/BasicCCDBManager.h"
#include "CommonConstants/PhysicsConstants.h"
#include "DataFormatsTOF/ParameterContainers.h"
#include "Framework/DataTypes.h"
#include "Framework/PID.h"
#include "Framework/Plugins.h"
#include "ReconstructionDataFormats/PID.h"

#include <CCDB/BasicCCDBManager.h>
#include <CommonConstants/PhysicsConstants.h>
#include <Framework/InitContext.h>
#include <Framework/Logger.h>
#include <Framework/PID.h>
#include <Framework/Plugins.h>
#include <ReconstructionDataFormats/PID.h>

#include <cmath>
#include <cstdint>
#include <string>

namespace o2::pid::tof
Expand Down Expand Up @@ -188,7 +190,7 @@ struct TOFResponseImpl {
template <typename VType>
void getCfg(o2::framework::InitContext& initContext, const std::string name, VType& v, const std::string task)
{
if (!getTaskOptionValue(initContext, task, name, v, false)) {
if (!o2::common::core::getTaskOptionValue(initContext, task, name, v, false)) {
LOG(fatal) << "Could not get " << name << " from " << task << " task";
}
}
Expand Down
2 changes: 1 addition & 1 deletion Common/Core/PID/TPCPIDResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#ifndef COMMON_CORE_PID_TPCPIDRESPONSE_H_
#define COMMON_CORE_PID_TPCPIDRESPONSE_H_

#include <MathUtils/BetheBlochAleph.h>
#include <Framework/Logger.h>
#include <MathUtils/BetheBlochAleph.h>
#include <ReconstructionDataFormats/PID.h>

#include <Rtypes.h>
Expand Down
5 changes: 0 additions & 5 deletions Common/Core/TableHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,4 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri

} // namespace o2::common::core

using o2::common::core::enableFlagIfTableRequired;
using o2::common::core::getTaskOptionValue;
using o2::common::core::isTableRequiredInWorkflow;
using o2::common::core::printTablesInWorkflow;

#endif // COMMON_CORE_TABLEHELPER_H_
1 change: 0 additions & 1 deletion Common/Core/Zorro.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <bitset>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <string>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions Common/Core/Zorro.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
/// \author M Puccio
///

#ifndef EVENTFILTERING_ZORRO_H_
#define EVENTFILTERING_ZORRO_H_
#ifndef COMMON_CORE_ZORRO_H_
#define COMMON_CORE_ZORRO_H_

#include "ZorroHelper.h"
#include "ZorroSummary.h"
Expand Down Expand Up @@ -103,4 +103,4 @@ class Zorro
o2::ccdb::BasicCCDBManager* mCCDB = nullptr;
};

#endif // EVENTFILTERING_ZORRO_H_
#endif // COMMON_CORE_ZORRO_H_
6 changes: 3 additions & 3 deletions Common/Core/ZorroHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
// or submit itself to any jurisdiction.
//

#ifndef EVENTFILTERING_ZORROHELPER_H_
#define EVENTFILTERING_ZORROHELPER_H_
#ifndef COMMON_CORE_ZORROHELPER_H_
#define COMMON_CORE_ZORROHELPER_H_

#include <Rtypes.h>
#include <RtypesCore.h>
Expand All @@ -21,4 +21,4 @@ struct ZorroHelper {
ClassDefNV(ZorroHelper, 1);
};

#endif // EVENTFILTERING_ZORROHELPER_H_
#endif // COMMON_CORE_ZORROHELPER_H_
7 changes: 4 additions & 3 deletions Common/Core/ZorroSummary.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
// or submit itself to any jurisdiction.
//

#ifndef EVENTFILTERING_ZORROSUMMARY_H_
#define EVENTFILTERING_ZORROSUMMARY_H_
#ifndef COMMON_CORE_ZORROSUMMARY_H_
#define COMMON_CORE_ZORROSUMMARY_H_

#include <TNamed.h>

#include <Rtypes.h>
#include <RtypesCore.h>

#include <cstddef>
#include <string>
#include <unordered_map>
#include <vector>
Expand Down Expand Up @@ -80,4 +81,4 @@ class ZorroSummary : public TNamed
ClassDef(ZorroSummary, 1);
};

#endif // EVENTFILTERING_ZORROSUMMARY_H_
#endif // COMMON_CORE_ZORROSUMMARY_H_
24 changes: 12 additions & 12 deletions Common/Core/fwdtrackUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
#ifndef COMMON_CORE_FWDTRACKUTILITIES_H_
#define COMMON_CORE_FWDTRACKUTILITIES_H_

#include "DetectorsBase/GeometryManager.h"
#include "Field/MagneticField.h"
#include "Framework/AnalysisDataModel.h"
#include "GlobalTracking/MatchGlobalFwd.h"
#include "MCHTracking/TrackExtrap.h"
#include "ReconstructionDataFormats/GlobalFwdTrack.h"
#include "ReconstructionDataFormats/TrackFwd.h"

#include "Math/MatrixRepresentationsStatic.h"
#include "Math/SMatrix.h"
#include "TGeoGlobalMagField.h"

#include <Framework/AnalysisDataModel.h>
#include <Framework/DataTypes.h>
#include <GlobalTracking/MatchGlobalFwd.h>
#include <MCHTracking/TrackExtrap.h>
#include <ReconstructionDataFormats/GlobalFwdTrack.h>
#include <ReconstructionDataFormats/TrackFwd.h>

#include <Math/MatrixRepresentationsStatic.h>
#include <Math/SMatrix.h>

#include <array>
#include <cstdint>
#include <type_traits>
#include <vector>

Expand Down
4 changes: 2 additions & 2 deletions Common/Core/macros/testCollisionTypeHelper.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include "Common/Core/CollisionTypeHelper.h"

#include "CCDB/BasicCCDBManager.h"
#include "DataFormatsParameters/GRPLHCIFData.h"
#include <CCDB/BasicCCDBManager.h>
#include <DataFormatsParameters/GRPLHCIFData.h>

void testCollisionTypeHelper(int runNumber = 544124)
{
Expand Down
4 changes: 0 additions & 4 deletions Common/DataModel/EventSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
#ifndef COMMON_DATAMODEL_EVENTSELECTION_H_
#define COMMON_DATAMODEL_EVENTSELECTION_H_

#include "Common/CCDB/EventSelectionParams.h" // FIXME: remove
#include "Common/CCDB/RCTSelectionFlags.h" // FIXME: remove
#include "Common/CCDB/TriggerAliases.h" // FIXME: remove

#include <Framework/AnalysisDataModel.h>

namespace o2::aod
Expand Down
2 changes: 1 addition & 1 deletion Common/DataModel/PIDResponseITS.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct ITSResponse {
float p0_res = 0, p1_res = 0, p2_res = 0;
float p0_res_Z2 = 0, p1_res_Z2 = 0, p2_res_Z2 = 0;
o2::framework::LabeledArray<float> itsParams;
getTaskOptionValue(initContext, "its-pid", "itsParams", itsParams, true);
o2::common::core::getTaskOptionValue(initContext, "its-pid", "itsParams", itsParams, true);
auto data = itsParams.getData();
const int col = isMC ? 1 : 0; // 0 for Data, 1 for MC
if (data.rows != 2 || data.cols != 12) {
Expand Down
Loading
Loading