21#include <fairlogger/Logger.h>
22#include "FairRootManager.h"
40 mClustersArray->clear();
41 delete mClustersArray;
53 FairRootManager* mgr = FairRootManager::Instance();
55 LOG(error) <<
"Could not instantiate FairRootManager. Exiting ...";
59 const gsl::span<const o2::tof::Digit>* arr = mgr->InitObjectAs<
const gsl::span<const o2::tof::Digit>*>(
"TOFDigit");
61 LOG(error) <<
"TOF digits not registered in the FairRootManager. Exiting ...";
70 LOG(error) <<
"TOF MC Truth not registered in the FairRootManager. Exiting ...";
76 mgr->RegisterAny(
"TOFCluster", mClustersArray, kTRUE);
80 mgr->RegisterAny(
"TOFClusterMCTruth", mClsLabels, kTRUE);
92 mClustersArray->clear();
97 LOG(
debug) <<
"Running clusterization on new event";
99 mClusterer.
process(mReader, *mClustersArray, mDigitMCTruth);
General auxilliary methods.
Definition of a container to keep Monte Carlo truth external to simulation objects.
Definition of the TOF cluster finder task.
ClassImp(o2::tof::ClustererTask)
void Exec(Option_t *option) override
ClustererTask(Bool_t useMCTruth=kTRUE)
InitStatus Init() override
Init function Inititializes the clusterer and connects input and output container.
~ClustererTask() override
void process(DataReader &r, std::vector< Cluster > &clusters, MCLabelContainer const *digitMCTruth)
void setMCTruthContainer(o2::dataformats::MCTruthContainer< o2::MCCompLabel > *truth)
void setDigitArray(const gsl::span< const o2::tof::Digit > *a)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"