31 assert(
id == o2::detectors::DetID::TF3);
55 auto ent =
mTree->GetReadEntry() + 1;
56 assert(ent < mTree->GetEntries());
64 <<
mDigits.size() <<
" digits at entry " << ent;
81 if (
mTree->GetReadEntry() + 1 >=
mTree->GetEntries()) {
99 throw std::runtime_error(
"GBT calibration data requested but not found in the tree");
105 throw std::runtime_error(
"MC data requested but not found in the tree");
109 LOG(info) <<
"Loaded tree from " <<
filename <<
" with " <<
mTree->GetEntries() <<
" entries";
114 std::vector<OutputSpec> outputSpec;
115 outputSpec.emplace_back(
"TF3",
"DIGITS", 0, Lifetime::Timeframe);
116 outputSpec.emplace_back(
"TF3",
"DIGITSROF", 0, Lifetime::Timeframe);
121 outputSpec.emplace_back(
"TF3",
"DIGITSMCTR", 0, Lifetime::Timeframe);
122 outputSpec.emplace_back(
"TF3",
"DIGITSMC2ROF", 0, Lifetime::Timeframe);
126 "iotof-digit-reader",
129 AlgorithmSpec{adaptFromTask<TF3DigitReader>(o2::detectors::DetID::TF3, useMC, useCalib)},
131 {
"tf3-digit-infile", VariantType::String, defname, {
"Name of the input digit file"}}}};
A const (ready only) version of MCTruthContainer.
A special IO container - splitting a given vector to enable ROOT IO.
Static class with identifiers, bitmasks and names for ALICE detectors.
T get(const char *key) const
void snapshot(const Output &spec, T const &object)
decltype(auto) make(const Output &spec, Args... args)
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.
std::unique_ptr< TFile > mFile
std::string mDigROFBranchName
std::vector< o2::itsmft::ROFRecord > mDigROFRec
std::string mDigitBranchName
std::vector< o2::itsmft::MC2ROFRecord > * mDigMC2ROFsPtr
std::string mCalibBranchName
std::vector< o2::iotof::Digit > * mDigitsPtr
std::vector< o2::itsmft::ROFRecord > * mDigROFRecPtr
std::vector< o2::iotof::Digit > mDigits
void init(o2::framework::InitContext &ic) final
std::string mDigtMC2ROFBranchName
void connectTree(const std::string &filename)
o2::header::DataOrigin mOrigin
void run(o2::framework::ProcessingContext &pc) final
std::string mDigtMCTruthBranchName
std::vector< o2::itsmft::MC2ROFRecord > mDigMC2ROFs
std::unique_ptr< TTree > mTree
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
o2::framework::DataProcessorSpec getIOTOFDigitReaderSpec(bool useMC=true, bool useCalib=false, std::string defname="iotofdigits.root")
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"