Skip to content
Merged
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
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
22 changes: 15 additions & 7 deletions Common/CCDB/macros/ctpRateF.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,24 @@
// 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 <Framework/Logger.h>

#include <cmath>
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <map>
#include <ostream>
#include <string>
#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 +97,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 100 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 +128,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 131 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 All @@ -130,7 +138,7 @@
} else if (sourceName == "T0SC") {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
} else if (sourceName == "T0VTX") {
if (runNumber < 534202) {

Check failure on line 141 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 fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0", 3); // 2022
} else {
double_t ret = fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF");
Expand Down
15 changes: 11 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,19 @@
// 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 <RtypesCore.h>

#include <cstdio>
#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 @@ -57,7 +64,7 @@
}

// fill param objects for runs with custom orbit shifts
for (auto m : mapOrbitShift) {

Check failure on line 67 in Common/CCDB/macros/upload_event_selection_params_run3.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int run = m.first;
int orbitShift = m.second;
LOGP(info, "Uploading custom object for run = {}: orbitShift = {}", run, orbitShift);
Expand Down Expand Up @@ -140,4 +147,4 @@
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 Expand Up @@ -54,7 +59,7 @@
createDefaultAliases(mAliases);

TObjArray* classNames[kNaliases];
for (auto& al : mAliases) {

Check failure on line 62 in Common/CCDB/macros/upload_trigger_aliases.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
classNames[al.first] = (al.second).Tokenize(",");
}

Expand All @@ -73,13 +78,13 @@
runs.push_back(r);
}

for (auto& run : runs) {

Check failure on line 81 in Common/CCDB/macros/upload_trigger_aliases.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOGP(info, "run = {}", run);
// read list of trigger classes
map<string, int>* pClassNameToIndexMap = ccdb.retrieveFromTFileAny<map<string, int>>("CTP/ClassNameToIndexMap", metadata, run);
// fill map of alias-to-class-indices
TriggerAliases* aliases = new TriggerAliases();
for (auto& al : mAliases) {

Check failure on line 87 in Common/CCDB/macros/upload_trigger_aliases.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int aliasId = al.first;
LOGP(debug, " aliadId = {}", aliasId);
for (const auto& className : *(classNames[aliasId])) {
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 Expand Up @@ -50,7 +55,7 @@
// createPbPbAliases(mAliases);

TObjArray* classNames[kNaliases];
for (auto& al : mAliases) {

Check failure on line 58 in Common/CCDB/macros/upload_trigger_aliases_run3.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
classNames[al.first] = (al.second).Tokenize(",");
}

Expand All @@ -77,7 +82,7 @@
ccdb.storeAsTFileAny(aliases, "EventSelection/TriggerAliases", metadata, sor, eor);
}

for (auto& run : runs) {

Check failure on line 85 in Common/CCDB/macros/upload_trigger_aliases_run3.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
LOGP(info, "run = {}", run);

// if (run != 535983)
Expand Down Expand Up @@ -115,7 +120,7 @@
ctpcfg->printConfigString();
// create trigger aliases
TriggerAliases* aliases = new TriggerAliases();
for (auto& al : mAliases) {

Check failure on line 123 in Common/CCDB/macros/upload_trigger_aliases_run3.C

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
int aliasId = al.first;
LOGP(debug, "alias = {}", al.second.Data());
for (const auto& className : *(classNames[aliasId])) {
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
Loading
Loading