Skip to content

Commit

Permalink
Adapt to usage of ConstMCLabelContainer in TPC (#510)
Browse files Browse the repository at this point in the history
Force merging as requested.
  • Loading branch information
davidrohr authored and Barthelemy committed Oct 9, 2020
1 parent 1d2f06d commit 19ab351
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Modules/TPC/src/Clusters.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@

#include <bitset>

using namespace o2::framework;
using namespace o2::header;
using namespace o2::tpc;

// root includes
#include <TCanvas.h>
#include <TH1.h>
Expand All @@ -47,6 +43,11 @@ using namespace o2::tpc;
#include "QualityControl/QcInfoLogger.h"
#include "TPC/Clusters.h"

using namespace o2::framework;
using namespace o2::header;
using namespace o2::tpc;
using namespace o2::dataformats;

namespace o2::quality_control_modules::tpc
{

Expand Down Expand Up @@ -127,7 +128,6 @@ void Clusters::monitorData(o2::framework::ProcessingContext& ctx)

constexpr static size_t NSectors = o2::tpc::Sector::MAXSECTOR;

std::vector<decltype(std::declval<InputRecord>().get<MCLabelContainer*>(DataRef{ nullptr, nullptr, nullptr }))> mcInputs;
std::vector<gsl::span<const char>> inputs;
struct InputRef {
DataRef data;
Expand Down Expand Up @@ -181,10 +181,11 @@ void Clusters::monitorData(o2::framework::ProcessingContext& ctx)

ClusterNativeAccess clusterIndex;
std::unique_ptr<ClusterNative[]> clusterBuffer;
MCLabelContainer clustersMCBuffer;
ClusterNativeHelper::ConstMCLabelContainerViewWithBuffer clustersMCBufferDummy;
std::vector<ConstMCLabelContainerView> mcInputsDummy;
memset(&clusterIndex, 0, sizeof(clusterIndex));
ClusterNativeHelper::Reader::fillIndex(clusterIndex, clusterBuffer, clustersMCBuffer,
inputs, mcInputs, [&validInputs](auto& index) { return validInputs.test(index); });
ClusterNativeHelper::Reader::fillIndex(clusterIndex, clusterBuffer, clustersMCBufferDummy,
inputs, mcInputsDummy, [&validInputs](auto& index) { return validInputs.test(index); });

for (int isector = 0; isector < o2::tpc::constants::MAXSECTOR; ++isector) {
for (int irow = 0; irow < o2::tpc::constants::MAXGLOBALPADROW; ++irow) {
Expand Down

0 comments on commit 19ab351

Please sign in to comment.