34 LOG(warning) <<
"FV0 RecPoint reader at the moment does not process MC";
41 ic.
options().
get<std::string>(
"fv0-recpoints-infile"));
42 connectTree(mInputFileName);
47 auto ent = mTree->GetReadEntry() + 1;
48 assert(ent < mTree->GetEntries());
51 LOG(
debug) <<
"FV0 RecPointReader pushes " << mRecPoints->size() <<
" recpoints with " << mChannelData->size() <<
" channels at entry " << ent;
55 if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
61void RecPointReader::connectTree(
const std::string&
filename)
64 mFile.reset(TFile::Open(
filename.c_str()));
65 assert(mFile && !mFile->IsZombie());
66 mTree.reset((TTree*)mFile->Get(mRecPointTreeName.c_str()));
69 mTree->SetBranchAddress(mRecPointBranchName.c_str(), &mRecPoints);
70 mTree->SetBranchAddress(mChannelDataBranchName.c_str(), &mChannelData);
72 LOG(warning) <<
"MC-truth is not supported for FV0 recpoints currently";
76 LOG(info) <<
"Loaded FV0 RecPoints tree from " <<
filename <<
" with " << mTree->GetEntries() <<
" entries";
81 std::vector<OutputSpec> outputSpec;
85 LOG(warning) <<
"MC-truth is not supported for FV0 recpoints currently";
89 "fv0-recpoints-reader",
94 {
"fv0-recpoints-infile", VariantType::String,
"o2reco_fv0.root", {
"Name of the input file"}},
95 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
Definition of the Names Generator class.
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.
void init(InitContext &ic) final
RecPointReader(bool useMC=false)
void run(ProcessingContext &pc) final
constexpr o2::header::DataOrigin gDataOriginFV0
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
framework::DataProcessorSpec getRecPointReaderSpec(bool useMC)
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"