Skip to content

Commit 05e724c

Browse files
2 parents 3243ce0 + f3acbbf commit 05e724c

File tree

19 files changed

+905
-555
lines changed

19 files changed

+905
-555
lines changed

Common/Core/TableHelper.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,15 @@ bool getTaskOptionValue(o2::framework::InitContext& initContext, const std::stri
8686
if (option.name == optName) {
8787
value = option.defaultValue.get<ValueType>();
8888
if (verbose) {
89-
if constexpr (!std::is_same_v<ValueType, o2::framework::LabeledArray<float>>) {
89+
if constexpr (std::is_same_v<ValueType, o2::framework::LabeledArray<float>>) {
90+
LOG(info) << " Found option '" << optName << "' a o2::framework::LabeledArray<float>";
91+
LOG(info) << " Values: ";
92+
for (uint32_t r = 0; r < value.rows(); r++) {
93+
for (uint32_t c = 0; r < value.cols(); c++) {
94+
LOG(info) << " r " << r << " c " << c << value.get(r, c);
95+
}
96+
}
97+
} else {
9098
LOG(info) << " Found option '" << optName << "' with value '" << value << "'";
9199
}
92100
found = true;

Common/TableProducer/PID/pidITS.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using namespace o2::framework;
4040
using namespace o2::framework::expressions;
4141
using namespace o2::track;
4242

43-
MetadataHelper metadataInfo;
43+
o2::common::core::MetadataHelper metadataInfo;
4444

4545
static constexpr int nCases = 2;
4646
static constexpr int nParameters = 12;

Common/TableProducer/PID/pidTOFMerge.cxx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,38 @@
1515
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
1616
///
1717

18-
#include <utility>
19-
#include <vector>
20-
#include <string>
2118
#include <map>
19+
#include <string>
2220
#include <unordered_map>
21+
#include <utility>
22+
#include <vector>
2323

2424
// O2 includes
25-
#include "Framework/runDataProcessing.h"
25+
#include "CCDB/BasicCCDBManager.h"
2626
#include "Framework/AnalysisTask.h"
2727
#include "Framework/HistogramRegistry.h"
28+
#include "Framework/runDataProcessing.h"
2829
#include "ReconstructionDataFormats/Track.h"
29-
#include "CCDB/BasicCCDBManager.h"
3030
#include "TOFBase/EventTimeMaker.h"
3131

3232
// O2Physics includes
33-
#include "TableHelper.h"
34-
#include "MetadataHelper.h"
3533
#include "CollisionTypeHelper.h"
34+
#include "MetadataHelper.h"
35+
#include "TableHelper.h"
3636
#include "pidTOFBase.h"
37-
#include "Common/DataModel/TrackSelectionTables.h"
37+
3838
#include "Common/DataModel/EventSelection.h"
3939
#include "Common/DataModel/FT0Corrected.h"
4040
#include "Common/DataModel/Multiplicity.h"
41+
#include "Common/DataModel/TrackSelectionTables.h"
4142

4243
using namespace o2;
4344
using namespace o2::framework;
4445
using namespace o2::pid;
4546
using namespace o2::framework::expressions;
4647
using namespace o2::track;
4748

48-
MetadataHelper metadataInfo;
49+
o2::common::core::MetadataHelper metadataInfo;
4950

5051
// Input data types
5152
using Run3Trks = o2::soa::Join<aod::TracksIU, aod::TracksExtra>;
@@ -924,7 +925,7 @@ struct tofPidMerge {
924925
doprocessRun2.value = false;
925926
} else {
926927
if (mTOFCalibConfig.autoSetProcessFunctions()) {
927-
LOG(info) << "Autodetecting process functions for mass and beta";
928+
LOG(info) << "Autodetecting process functions";
928929
if (metadataInfo.isFullyDefined()) {
929930
if (metadataInfo.isRun3()) {
930931
doprocessRun3.value = true;
@@ -972,17 +973,24 @@ struct tofPidMerge {
972973
doprocessRun2BetaM.value = false;
973974
doprocessRun3BetaM.value = false;
974975
} else {
976+
LOG(info) << "Table for TOF beta is " << (enableTableBeta ? "enabled" : "disabled");
977+
LOG(info) << "Table for TOF mass is " << (enableTableMass ? "enabled" : "disabled");
975978
if (mTOFCalibConfig.autoSetProcessFunctions()) {
976979
LOG(info) << "Autodetecting process functions for mass and beta";
977-
if (metadataInfo.isFullyDefined()) {
980+
if (metadataInfo.isInitialized()) {
978981
if (metadataInfo.isRun3()) {
979982
doprocessRun3BetaM.value = true;
980983
doprocessRun2BetaM.value = false;
981984
} else {
982985
doprocessRun2BetaM.value = true;
983986
doprocessRun3BetaM.value = false;
984987
}
988+
} else {
989+
metadataInfo.print();
990+
LOG(warning) << "Metadata is not defined, cannot autodetect process functions for mass and beta";
985991
}
992+
} else {
993+
LOG(info) << "Process functions for mass and beta are set manually";
986994
}
987995
if (doprocessRun2BetaM && doprocessRun3BetaM) {
988996
LOG(fatal) << "Both processRun2BetaM and processRun3BetaM are enabled. Pick one of the two";

Common/TableProducer/PID/pidTPC.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ using namespace o2::framework::expressions;
5555
using namespace o2::track;
5656
using namespace o2::ml;
5757

58-
MetadataHelper metadataInfo; // Metadata helper
58+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
5959

6060
void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
6161
{

Common/TableProducer/centralityTable.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
using namespace o2;
3939
using namespace o2::framework;
4040

41-
MetadataHelper metadataInfo; // Metadata helper
41+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
4242

4343
static constexpr int kCentRun2V0Ms = 0;
4444
static constexpr int kCentRun2V0As = 1;

Common/TableProducer/eventSelection.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ using namespace o2;
4747
using namespace o2::framework;
4848
using namespace o2::aod::evsel;
4949

50-
MetadataHelper metadataInfo; // Metadata helper
50+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
5151

5252
using BCsWithRun2InfosTimestampsAndMatches = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Timestamps, aod::Run2MatchedToBCSparse>;
5353
using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Timestamps, aod::Run3MatchedToBCSparse>;

Common/TableProducer/eventSelectionService.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
using namespace o2;
4545
using namespace o2::framework;
4646

47-
MetadataHelper metadataInfo; // Metadata helper
47+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
4848

4949
using BCsWithRun2InfosAndMatches = soa::Join<aod::BCs, aod::Run2BCInfos, aod::Run2MatchedToBCSparse>;
5050
using BCsWithRun3Matchings = soa::Join<aod::BCs, aod::Run3MatchedToBCSparse>;

Common/TableProducer/multCentTable.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ using namespace o2;
4646
using namespace o2::framework;
4747
// using namespace o2::framework::expressions;
4848

49-
MetadataHelper metadataInfo; // Metadata helper
49+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
5050

5151
struct MultCentTable {
5252
o2::common::multiplicity::standardConfigurables opts;

Common/TableProducer/multiplicityTable.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using namespace o2;
4040
using namespace o2::framework;
4141
using namespace o2::framework::expressions;
4242

43-
MetadataHelper metadataInfo; // Metadata helper
43+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
4444

4545
static constexpr int kFV0Mults = 0;
4646
static constexpr int kFT0Mults = 1;

Common/TableProducer/timestamp.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ using namespace o2::framework;
2929
using namespace o2::header;
3030
using namespace o2;
3131

32-
MetadataHelper metadataInfo; // Metadata helper
32+
o2::common::core::MetadataHelper metadataInfo; // Metadata helper
3333

3434
struct TimestampTask {
3535
Produces<aod::Timestamps> timestampTable; /// Table with SOR timestamps produced by the task

0 commit comments

Comments
 (0)