diff --git a/Detectors/TPC/workflow/include/TPCWorkflow/ClusterSharingMapSpec.h b/Detectors/TPC/workflow/include/TPCWorkflow/ClusterSharingMapSpec.h index 1bade0eec9c4d..d1fb51c50c4e5 100644 --- a/Detectors/TPC/workflow/include/TPCWorkflow/ClusterSharingMapSpec.h +++ b/Detectors/TPC/workflow/include/TPCWorkflow/ClusterSharingMapSpec.h @@ -18,6 +18,7 @@ #include "Framework/DataProcessorSpec.h" #include "Framework/Task.h" +#include "Framework/CCDBParamSpec.h" namespace o2 { @@ -39,6 +40,7 @@ o2::framework::DataProcessorSpec getClusterSharingMapSpec() inputs.emplace_back("trackTPC", "TPC", "TRACKS", 0, o2::framework::Lifetime::Timeframe); inputs.emplace_back("trackTPCClRefs", "TPC", "CLUSREFS", 0, o2::framework::Lifetime::Timeframe); inputs.emplace_back("clusTPC", o2::framework::ConcreteDataTypeMatcher{"TPC", "CLUSTERNATIVE"}, o2::framework::Lifetime::Timeframe); + inputs.emplace_back("grpecs", "GLO", "GRPECS", 0, o2::framework::Lifetime::Condition, o2::framework::ccdbParamSpec("GLO/Config/GRPECS", true)); outputs.emplace_back("TPC", "CLSHAREDMAP", 0, o2::framework::Lifetime::Timeframe); return o2::framework::DataProcessorSpec{ diff --git a/Detectors/TPC/workflow/src/ClusterSharingMapSpec.cxx b/Detectors/TPC/workflow/src/ClusterSharingMapSpec.cxx index 7b8259aa70377..d0e5aa121b543 100644 --- a/Detectors/TPC/workflow/src/ClusterSharingMapSpec.cxx +++ b/Detectors/TPC/workflow/src/ClusterSharingMapSpec.cxx @@ -20,6 +20,7 @@ #include "DataFormatsTPC/TrackTPC.h" #include "GPUO2InterfaceRefit.h" #include "TPCWorkflow/ClusterSharingMapSpec.h" +#include "DataFormatsParameters/GRPECSObject.h" using namespace o2::framework; using namespace o2::tpc; @@ -27,10 +28,15 @@ using namespace o2::tpc; void ClusterSharingMapSpec::run(ProcessingContext& pc) { TStopwatch timer; - + static int nHBPerTF = 0; const auto tracksTPC = pc.inputs().get>("trackTPC"); const auto tracksTPCClRefs = pc.inputs().get>("trackTPCClRefs"); const auto& clustersTPC = getWorkflowTPCInput(pc); + if (pc.services().get().globalRunNumberChanged) { // new run is starting + auto grp = pc.inputs().get("grpecs"); + nHBPerTF = grp->getNHBFPerTF(); + LOGP(info, "Will use {} HB per TF from GRPECS", nHBPerTF); + } auto& bufVec = pc.outputs().make>(Output{o2::header::gDataOriginTPC, "CLSHAREDMAP", 0}, clustersTPC->clusterIndex.nClustersTotal); o2::gpu::GPUO2InterfaceRefit::fillSharedClustersMap(&clustersTPC->clusterIndex, tracksTPC, tracksTPCClRefs.data(), bufVec.data());