37 ic.
options().
get<std::string>(
"cpv-clusters-infile"));
43 auto ent =
mTree->GetReadEntry() + 1;
44 assert(ent < mTree->GetEntries());
46 LOG(info) <<
"Pushing " <<
mClusters.size() <<
" Clusters in " <<
mTRs.size() <<
" TriggerRecords at entry " << ent;
53 if (
mTree->GetReadEntry() + 1 >=
mTree->GetEntries()) {
74 LOG(warning) <<
"MC-truth is missing, message will be empty";
77 LOG(info) <<
"Loaded tree from " <<
filename <<
" with " <<
mTree->GetEntries() <<
" entries";
82 std::vector<OutputSpec> outputSpec;
83 outputSpec.emplace_back(
"CPV",
"CLUSTERS", 0, Lifetime::Timeframe);
84 outputSpec.emplace_back(
"CPV",
"CLUSTERTRIGRECS", 0, Lifetime::Timeframe);
86 outputSpec.emplace_back(
"CPV",
"CLUSTERTRUEMC", 0, Lifetime::Timeframe);
95 {
"cpv-clusters-infile", VariantType::String,
"cpvclusters.root", {
"Name of the input Cluster file"}},
96 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
Definition of the Names Generator class.
void init(o2::framework::InitContext &ic) final
std::vector< o2::cpv::Cluster > * mClustersInp
std::string mInputFileName
std::string mTRBranchName
o2::header::DataOrigin mOrigin
std::string mClusterBranchName
void connectTree(const std::string &filename)
std::vector< o2::cpv::TriggerRecord > * mTRsInp
std::vector< o2::cpv::TriggerRecord > mTRs
std::unique_ptr< TFile > mFile
std::vector< o2::cpv::Cluster > mClusters
void run(o2::framework::ProcessingContext &pc) final
ClusterReader(bool useMC=true)
o2::dataformats::MCTruthContainer< o2::MCCompLabel > mMCTruth
std::string mClusterTreeName
std::unique_ptr< TTree > mTree
o2::dataformats::MCTruthContainer< o2::MCCompLabel > * mMCTruthInp
std::string mClusterMCTruthBranchName
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
ConfigParamRegistry const & options()
DataAllocator & outputs()
The data allocator is used to allocate memory for the output data.
ServiceRegistryRef services()
The services registry associated with this processing context.
virtual void endOfStream(EndOfStreamContext &context)
This is invoked whenever we have an EndOfStream event.
framework::DataProcessorSpec getCPVClusterReaderSpec(bool useMC=true)
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"