36 ic.
options().
get<std::string>(
"ft0-digit-infile"));
37 mFile.reset(TFile::Open(
filename.c_str()));
38 if (!mFile->IsOpen()) {
39 LOG(error) <<
"Cannot open the " <<
filename.c_str() <<
" file !";
40 throw std::runtime_error(
"cannot open input digits file");
42 mTree.reset((TTree*)mFile->Get(
"o2sim"));
44 LOG(error) <<
"Did not find o2sim tree in " <<
filename.c_str();
45 throw std::runtime_error(
"Did not fine o2sim file in FT0 digits tree");
52 std::vector<o2::ft0::DetTrigInput> trgInput, *ptrTrgInput = &trgInput;
54 mTree->SetBranchAddress(
"FT0DIGITSBC", &pdigits);
55 mTree->SetBranchAddress(
"FT0DIGITSCH", &pchannels);
57 mTree->SetBranchAddress(
"TRIGGERINPUT", &ptrTrgInput);
61 mTree->SetBranchAddress(
"FT0DIGITSMCTR", &plabels);
63 auto ent = mTree->GetReadEntry() + 1;
64 assert(ent < mTree->GetEntries());
66 LOG(
debug) <<
"FT0DigitReader pushed " <<
channels.size() <<
" channels in " <<
digits.size() <<
" digits";
75 if (mTree->GetReadEntry() + 1 >= mTree->GetEntries()) {
83 std::vector<OutputSpec> outputs;
84 outputs.emplace_back(
"FT0",
"DIGITSBC", 0, Lifetime::Timeframe);
85 outputs.emplace_back(
"FT0",
"DIGITSCH", 0, Lifetime::Timeframe);
87 outputs.emplace_back(
"FT0",
"DIGITSMCTR", 0, Lifetime::Timeframe);
90 outputs.emplace_back(
"FT0",
"TRIGGERINPUT", 0, Lifetime::Timeframe);
96 AlgorithmSpec{adaptFromTask<DigitReader>(useMC, useTrgInput)},
98 {
"ft0-digit-infile", VariantType::String,
"ft0digits.root", {
"Name of the input file"}},
99 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
Definition of a container to keep Monte Carlo truth external to simulation objects.
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 run(framework::ProcessingContext &pc) final
void init(framework::InitContext &ic) final
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
framework::DataProcessorSpec getDigitReaderSpec(bool useMC=false, bool useTrgInput=true)
struct o2::upgrades_utils::@462 ft0
structure to keep V0C information
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"
std::vector< ChannelData > channels
std::vector< Digit > digits