Skip to content

Commit fb0c728

Browse files
matthias-kleineralcaliva
authored andcommitted
fix typos and resolve conflicts
1 parent 3cf0936 commit fb0c728

File tree

11 files changed

+87
-44
lines changed

11 files changed

+87
-44
lines changed

Detectors/TPC/base/include/TPCBase/CDBTypes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ enum class CDBType {
3434
CalLaserTracks, ///< Laser track calibration data
3535
CalVDriftTgl, ///< ITS-TPC difTgl vdrift calibration
3636
CalTimeGain, ///< Gain variation over time
37+
CalTimeGainMC, ///< Gain variation over time for MC
3738
CalGas, ///< DCS gas measurements
3839
CalTemperature, ///< DCS temperature measurements
3940
CalHV, ///< DCS HV measurements
@@ -98,6 +99,7 @@ const std::unordered_map<CDBType, const std::string> CDBTypeMap{
9899
{CDBType::CalPadGainResidual, "TPC/Calib/PadGainResidual"},
99100
{CDBType::CalLaserTracks, "TPC/Calib/LaserTracks"},
100101
{CDBType::CalTimeGain, "TPC/Calib/TimeGain"},
102+
{CDBType::CalTimeGainMC, "TPC/Calib/TimeGainMC"},
101103
{CDBType::CalGas, "TPC/Calib/Gas"},
102104
{CDBType::CalTemperature, "TPC/Calib/Temperature"},
103105
{CDBType::CalHV, "TPC/Calib/HV"},

Detectors/TPC/base/include/TPCBase/ParameterGEM.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ struct ParameterGEM : public o2::conf::ConfigurableParamHelper<ParameterGEM> {
6262
O2ParamDef(ParameterGEM, "TPCGEMParam");
6363
};
6464
} // namespace tpc
65+
66+
namespace framework
67+
{
68+
template <typename T>
69+
struct is_messageable;
70+
template <>
71+
struct is_messageable<o2::tpc::ParameterGEM> : std::true_type {
72+
};
73+
} // namespace framework
74+
6575
} // namespace o2
6676

6777
#endif // ALICEO2_TPC_ParameterGEM_H_

Detectors/TPC/base/include/TPCBase/ParameterGas.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ struct ParameterGas : public o2::conf::ConfigurableParamHelper<ParameterGas> {
4545
};
4646

4747
} // namespace tpc
48+
49+
namespace framework
50+
{
51+
template <typename T>
52+
struct is_messageable;
53+
template <>
54+
struct is_messageable<o2::tpc::ParameterGas> : std::true_type {
55+
};
56+
} // namespace framework
57+
4858
} // namespace o2
4959

5060
#endif // ALICEO2_TPC_ParameterGas_H_

Detectors/TPC/workflow/include/TPCWorkflow/RecoWorkflow.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData,
8686
bool askDISTSTF = true,
8787
bool selIR = false,
8888
bool filteredInp = false,
89-
int deadMapSources = -1);
89+
int deadMapSources = -1,
90+
bool useMCTimeGain = false);
9091

9192
void cleanupCallback();
9293

Detectors/TPC/workflow/src/RecoWorkflow.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const std::unordered_map<std::string, OutputType> OutputMap{
100100

101101
framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vector<int> const& tpcSectors, unsigned long tpcSectorMask, std::vector<int> const& laneConfiguration,
102102
const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts, bool propagateMC, unsigned nLanes, std::string const& cfgInput, std::string const& cfgOutput, bool disableRootInput,
103-
int caClusterer, int zsOnTheFly, bool askDISTSTF, bool selIR, bool filteredInp, int deadMapSources)
103+
int caClusterer, int zsOnTheFly, bool askDISTSTF, bool selIR, bool filteredInp, int deadMapSources, bool useMCTimeGain)
104104
{
105105
InputType inputType;
106106
try {
@@ -473,6 +473,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
473473
cfg.askDISTSTF = askDISTSTF;
474474
cfg.tpcTriggerHandling = isEnabled(OutputType::TPCTriggers) || cfg.caClusterer;
475475
cfg.tpcDeadMapSources = deadMapSources;
476+
cfg.tpcUseMCTimeGain = useMCTimeGain;
476477

477478
Inputs ggInputs;
478479
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true, o2::base::GRPGeomRequest::Aligned, ggInputs, true);

Detectors/TPC/workflow/src/tpc-reco-workflow.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
7171
{"filtered-input", VariantType::Bool, false, {"Filtered tracks, clusters input, prefix dataDescriptors with F"}},
7272
{"select-ir-frames", VariantType::Bool, false, {"Subscribe and filter according to external IR Frames"}},
7373
{"tpc-deadMap-sources", VariantType::Int, -1, {"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
74+
{"tpc-mc-time-gain", VariantType::Bool, false, {"use time gain calibration for MC (true) or for data (false)"}},
7475
};
7576
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
7677
o2::raw::HBFUtilsInitializer::addConfigOption(options);
@@ -184,7 +185,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
184185
!cfgc.options().get<bool>("ignore-dist-stf"), //
185186
cfgc.options().get<bool>("select-ir-frames"),
186187
cfgc.options().get<bool>("filtered-input"),
187-
cfgc.options().get<int>("tpc-deadMap-sources"));
188+
cfgc.options().get<int>("tpc-deadMap-sources"),
189+
cfgc.options().get<bool>("tpc-mc-time-gain"));
188190

189191
// configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
190192
o2::raw::HBFUtilsInitializer hbfIni(cfgc, wf);

GPU/GPUTracking/display/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ if(ALIGPU_BUILD_TYPE STREQUAL "O2")
3030
set_package_properties(Qt5 PROPERTIES TYPE OPTIONAL)
3131
endif()
3232

33-
if(Vulkan_FOUND)
34-
if(NOT ${Vulkan_VERSION} VERSION_GREATER_EQUAL "1.3.0" OR Vulkan_GLSLC_EXECUTABLE STREQUAL "Vulkan_GLSLC_EXECUTABLE-NOTFOUND")
35-
set(Vulkan_FOUND 0)
36-
endif()
37-
endif()
33+
set(Vulkan_FOUND 0)
3834
if(Vulkan_FOUND)
3935
include(../Standalone/cmake/vulkan_display.cmake)
4036
set(GPUCA_EVENT_DISPLAY_VULKAN ON)

GPU/Workflow/include/GPUWorkflow/GPUWorkflowSpec.h

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TStopwatch;
3434
namespace fair::mq
3535
{
3636
struct RegionInfo;
37-
enum class State : int;
37+
enum class State : int32_t;
3838
} // namespace fair::mq
3939
namespace o2
4040
{
@@ -58,9 +58,8 @@ class GeometryFlat;
5858

5959
namespace its
6060
{
61-
class Tracker;
62-
class Vertexer;
6361
class TimeFrame;
62+
class ITSTrackingInterface;
6463
} // namespace its
6564

6665
namespace itsmft
@@ -102,12 +101,13 @@ class GPURecoWorkflowSpec : public o2::framework::Task
102101
using CompletionPolicyData = std::vector<framework::InputSpec>;
103102

104103
struct Config {
105-
int itsTriggerType = 0;
106-
int lumiScaleMode = 0;
104+
int32_t itsTriggerType = 0;
105+
int32_t lumiScaleMode = 0;
107106
bool enableMShape = false;
108107
bool enableCTPLumi = false;
109-
int enableDoublePipeline = 0;
110-
int tpcDeadMapSources = -1;
108+
int32_t enableDoublePipeline = 0;
109+
int32_t tpcDeadMapSources = -1;
110+
bool tpcUseMCTimeGain = false; // use time gain calibration for MC (true) or from data (false)
111111
bool decompressTPC = false;
112112
bool decompressTPCFromROOT = false;
113113
bool caClusterer = false;
@@ -125,21 +125,20 @@ class GPURecoWorkflowSpec : public o2::framework::Task
125125
bool runTPCTracking = false;
126126
bool runTRDTracking = false;
127127
bool readTRDtracklets = false;
128-
int lumiScaleType = 0; // 0=off, 1=CTP, 2=TPC scalers
128+
int32_t lumiScaleType = 0; // 0=off, 1=CTP, 2=TPC scalers
129129
bool outputErrorQA = false;
130130
bool runITSTracking = false;
131-
int itsTrackingMode = 0; // 0=sync, 1=async, 2=cosmics
132131
bool itsOverrBeamEst = false;
133132
bool tpcTriggerHandling = false;
134133
};
135134

136-
GPURecoWorkflowSpec(CompletionPolicyData* policyData, Config const& specconfig, std::vector<int> const& tpcsectors, unsigned long tpcSectorMask, std::shared_ptr<o2::base::GRPGeomRequest>& ggr, std::function<bool(o2::framework::DataProcessingHeader::StartTime)>** gPolicyOrder = nullptr);
135+
GPURecoWorkflowSpec(CompletionPolicyData* policyData, Config const& specconfig, std::vector<int32_t> const& tpcsectors, uint64_t tpcSectorMask, std::shared_ptr<o2::base::GRPGeomRequest>& ggr, std::function<bool(o2::framework::DataProcessingHeader::StartTime)>** gPolicyOrder = nullptr);
137136
~GPURecoWorkflowSpec() override;
138137
void init(o2::framework::InitContext& ic) final;
139138
void run(o2::framework::ProcessingContext& pc) final;
140139
void endOfStream(o2::framework::EndOfStreamContext& ec) final;
141-
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
142140
void stop() final;
141+
void finaliseCCDB(o2::framework::ConcreteDataMatcher& matcher, void* obj) final;
143142
o2::framework::Inputs inputs();
144143
o2::framework::Outputs outputs();
145144
o2::framework::Options options();
@@ -176,14 +175,15 @@ class GPURecoWorkflowSpec : public o2::framework::Task
176175
template <class D, class E, class F, class G, class H, class I, class J, class K>
177176
void processInputs(o2::framework::ProcessingContext&, D&, E&, F&, G&, bool&, H&, I&, J&, K&);
178177

179-
int runMain(o2::framework::ProcessingContext* pc, GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, int threadIndex = 0, GPUInterfaceInputUpdate* inputUpdateCallback = nullptr);
180-
int runITSTracking(o2::framework::ProcessingContext& pc);
178+
int32_t runMain(o2::framework::ProcessingContext* pc, GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, int32_t threadIndex = 0, GPUInterfaceInputUpdate* inputUpdateCallback = nullptr);
179+
int32_t runITSTracking(o2::framework::ProcessingContext& pc);
181180

182-
int handlePipeline(o2::framework::ProcessingContext& pc, GPUTrackingInOutPointers& ptrs, gpurecoworkflow_internals::GPURecoWorkflowSpec_TPCZSBuffers& tpcZSmeta, o2::gpu::GPUTrackingInOutZS& tpcZS, std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflow_QueueObject>& context);
181+
int32_t handlePipeline(o2::framework::ProcessingContext& pc, GPUTrackingInOutPointers& ptrs, gpurecoworkflow_internals::GPURecoWorkflowSpec_TPCZSBuffers& tpcZSmeta, o2::gpu::GPUTrackingInOutZS& tpcZS, std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflow_QueueObject>& context);
183182
void RunReceiveThread();
184-
void RunWorkerThread(int id);
183+
void RunWorkerThread(int32_t id);
185184
void ExitPipeline();
186185
void handlePipelineEndOfStream(o2::framework::EndOfStreamContext& ec);
186+
void handlePipelineStop();
187187
void initPipeline(o2::framework::InitContext& ic);
188188
void enqueuePipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context, bool inputFinal);
189189
void finalizeInputPipelinedJob(GPUTrackingInOutPointers* ptrs, GPUInterfaceOutputs* outputRegions, gpurecoworkflow_internals::GPURecoWorkflow_QueueObject* context);
@@ -205,24 +205,23 @@ class GPURecoWorkflowSpec : public o2::framework::Task
205205
std::unique_ptr<GPUO2InterfaceConfiguration> mConfig;
206206
std::unique_ptr<GPUSettingsO2> mConfParam;
207207
std::unique_ptr<TStopwatch> mTimer;
208-
std::vector<std::array<unsigned int, 4>> mErrorQA;
209-
int mQATaskMask = 0;
208+
std::vector<std::array<uint32_t, 4>> mErrorQA;
209+
int32_t mQATaskMask = 0;
210210
std::unique_ptr<GPUO2InterfaceQA> mQA;
211-
std::vector<int> mClusterOutputIds;
212-
std::vector<int> mTPCSectors;
213-
std::unique_ptr<o2::its::Tracker> mITSTracker;
214-
std::unique_ptr<o2::its::Vertexer> mITSVertexer;
211+
std::vector<int32_t> mClusterOutputIds;
212+
std::vector<int32_t> mTPCSectors;
213+
std::unique_ptr<o2::its::ITSTrackingInterface> mITSTrackingInterface;
215214
std::unique_ptr<gpurecoworkflow_internals::GPURecoWorkflowSpec_PipelineInternals> mPipeline;
216215
o2::its::TimeFrame* mITSTimeFrame = nullptr;
217216
std::vector<fair::mq::RegionInfo> mRegionInfos;
218217
const o2::itsmft::TopologyDictionary* mITSDict = nullptr;
219218
const o2::dataformats::MeanVertexObject* mMeanVertex;
220-
unsigned long mTPCSectorMask = 0;
221-
long mCreationForCalib = -1; ///< creation time for calib manipulation
222-
int mVerbosity = 0;
223-
unsigned int mNTFs = 0;
224-
unsigned int mNDebugDumps = 0;
225-
unsigned int mNextThreadIndex = 0;
219+
uint64_t mTPCSectorMask = 0;
220+
int64_t mCreationForCalib = -1; ///< creation time for calib manipulation
221+
int32_t mVerbosity = 0;
222+
uint32_t mNTFs = 0;
223+
uint32_t mNDebugDumps = 0;
224+
uint32_t mNextThreadIndex = 0;
226225
bool mUpdateGainMapCCDB = true;
227226
std::unique_ptr<o2::gpu::GPUSettingsTF> mTFSettings;
228227
Config mSpecConfig;
@@ -234,8 +233,6 @@ class GPURecoWorkflowSpec : public o2::framework::Task
234233
bool mITSGeometryCreated = false;
235234
bool mTRDGeometryCreated = false;
236235
bool mPropagatorInstanceCreated = false;
237-
bool mITSRunVertexer = false;
238-
bool mITSCosmicsProcessing = false;
239236
};
240237

241238
} // end namespace gpu

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,11 @@ Inputs GPURecoWorkflowSpec::inputs()
10841084
}
10851085
inputs.emplace_back("tpcgain", gDataOriginTPC, "PADGAINFULL", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalPadGainFull)));
10861086
inputs.emplace_back("tpcgainresidual", gDataOriginTPC, "PADGAINRESIDUAL", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalPadGainResidual), {}, 1)); // time-dependent
1087-
inputs.emplace_back("tpctimegain", gDataOriginTPC, "TIMEGAIN", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalTimeGain), {}, 1)); // time-dependent
1087+
if (mSpecConfig.tpcUseMCTimeGain) {
1088+
inputs.emplace_back("tpctimegain", gDataOriginTPC, "TIMEGAIN", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalTimeGainMC), {}, 1)); // time-dependent
1089+
} else {
1090+
inputs.emplace_back("tpctimegain", gDataOriginTPC, "TIMEGAIN", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalTimeGain), {}, 1)); // time-dependent
1091+
}
10881092
inputs.emplace_back("tpctopologygain", gDataOriginTPC, "TOPOLOGYGAIN", 0, Lifetime::Condition, ccdbParamSpec(o2::tpc::CDBTypeMap.at(o2::tpc::CDBType::CalTopologyGain)));
10891093
inputs.emplace_back("tpcthreshold", gDataOriginTPC, "PADTHRESHOLD", 0, Lifetime::Condition, ccdbParamSpec("TPC/Config/FEEPad"));
10901094
o2::tpc::VDriftHelper::requestCCDBInputs(inputs);

GPU/Workflow/src/gpu-reco-workflow.cxx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using namespace o2::dataformats;
3838
using namespace o2::gpu;
3939
using CompletionPolicyData = std::vector<InputSpec>;
4040
static CompletionPolicyData gPolicyData;
41-
static constexpr unsigned long gTpcSectorMask = 0xFFFFFFFFF;
41+
static constexpr uint64_t gTpcSectorMask = 0xFFFFFFFFF;
4242
static std::function<bool(o2::framework::DataProcessingHeader::StartTime)>* gPolicyOrderCheck;
4343
static std::shared_ptr<GPURecoWorkflowSpec> gTask;
4444

@@ -51,8 +51,8 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
5151
{
5252

5353
std::vector<ConfigParamSpec> options{
54-
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, zsonthefly, clustersnative, compressed-clusters-root, compressed-clusters-ctf, trd-tracklets"}},
55-
{"output-type", VariantType::String, "tracks", {"clustersnative, tracks, compressed-clusters-ctf, qa, no-shared-cluster-map, send-clusters-per-sector, trd-tracks, error-qa, tpc-triggers"}},
54+
{"input-type", VariantType::String, "digits", {"digitizer, digits, zsraw, zsonthefly, clustersnative, compressed-clusters-root, compressed-clusters-ctf, trd-tracklets, its-clusters"}},
55+
{"output-type", VariantType::String, "tracks", {"clustersnative, tracks, compressed-clusters-ctf, qa, no-shared-cluster-map, send-clusters-per-sector, trd-tracks, error-qa, tpc-triggers, its-tracks"}},
5656
{"corrmap-lumi-mode", VariantType::Int, 0, {"scaling mode: (default) 0 = static + scale * full; 1 = full + scale * derivative"}},
5757
{"disable-root-input", VariantType::Bool, true, {"disable root-files input reader"}},
5858
{"disable-mc", VariantType::Bool, false, {"disable sending of MC information"}},
@@ -61,6 +61,7 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
6161
{"configFile", VariantType::String, "", {"configuration file for configurable parameters"}},
6262
{"enableDoublePipeline", VariantType::Bool, false, {"enable GPU double pipeline mode"}},
6363
{"tpc-deadMap-sources", VariantType::Int, -1, {"Sources to consider for TPC dead channel map creation; -1=all, 0=deactivated"}},
64+
{"tpc-mc-time-gain", VariantType::Bool, false, {"use time gain calibration for MC (true) or for data (false)"}},
6465
};
6566
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
6667
o2::raw::HBFUtilsInitializer::addConfigOption(options);
@@ -107,6 +108,7 @@ enum struct ioType { Digits,
107108
SendClustersPerSector,
108109
ITSClusters,
109110
ITSTracks,
111+
MeanVertex,
110112
TPCTriggers };
111113

112114
static const std::unordered_map<std::string, ioType> InputMap{
@@ -117,7 +119,9 @@ static const std::unordered_map<std::string, ioType> InputMap{
117119
{"compressed-clusters-root", ioType::CompClustROOT},
118120
{"compressed-clusters-ctf", ioType::CompClustCTF},
119121
{"trd-tracklets", ioType::TRDTracklets},
120-
{"its-clusters", ioType::ITSClusters}};
122+
{"its-clusters", ioType::ITSClusters},
123+
{"its-mean-vertex", ioType::MeanVertex},
124+
};
121125

122126
static const std::unordered_map<std::string, ioType> OutputMap{
123127
{"clusters", ioType::Clusters},
@@ -134,7 +138,7 @@ static const std::unordered_map<std::string, ioType> OutputMap{
134138
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
135139
{
136140
WorkflowSpec specs;
137-
std::vector<int> tpcSectors(o2::tpc::Sector::MAXSECTOR);
141+
std::vector<int32_t> tpcSectors(o2::tpc::Sector::MAXSECTOR);
138142
std::iota(tpcSectors.begin(), tpcSectors.end(), 0);
139143

140144
auto inputType = cfgc.options().get<std::string>("input-type");
@@ -181,7 +185,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
181185
cfg.runTRDTracking = isEnabled(outputTypes, ioType::TRDTracks);
182186
cfg.tpcTriggerHandling = isEnabled(outputTypes, ioType::TPCTriggers) || cfg.caClusterer;
183187
cfg.enableDoublePipeline = cfgc.options().get<bool>("enableDoublePipeline");
184-
cfg.tpcDeadMapSources = cfgc.options().get<int>("tpc-deadMap-sources");
188+
cfg.tpcDeadMapSources = cfgc.options().get<int32_t>("tpc-deadMap-sources");
189+
cfg.tpcUseMCTimeGain = cfgc.options().get<bool>("tpc-mc-time-gain");
190+
cfg.runITSTracking = isEnabled(outputTypes, ioType::ITSTracks);
191+
cfg.itsOverrBeamEst = isEnabled(inputTypes, ioType::MeanVertex);
185192

186193
Inputs ggInputs;
187194
auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true, o2::base::GRPGeomRequest::Aligned, ggInputs, true);

0 commit comments

Comments
 (0)