30 ic.
options().
get<std::string>(
"its-tracks-infile"));
36 auto ent =
mTree->GetReadEntry() + 1;
37 assert(ent < mTree->GetEntries());
39 LOG(info) <<
"Pushing " <<
mTracks.size() <<
" track at entry " << ent;
50 if (
mTree->GetReadEntry() + 1 >=
mTree->GetEntries()) {
77 LOG(warning) <<
"MC-truth is missing, message will be empty";
80 LOG(info) <<
"Loaded tree from " <<
filename <<
" with " <<
mTree->GetEntries() <<
" entries";
85 std::vector<OutputSpec> outputSpec;
86 outputSpec.emplace_back(
"ITS",
"ITSTrackROF", 0, Lifetime::Timeframe);
87 outputSpec.emplace_back(
"ITS",
"TRACKS", 0, Lifetime::Timeframe);
88 outputSpec.emplace_back(
"ITS",
"TRACKCLSID", 0, Lifetime::Timeframe);
89 outputSpec.emplace_back(
"ITS",
"VERTICES", 0, Lifetime::Timeframe);
90 outputSpec.emplace_back(
"ITS",
"VERTICESROF", 0, Lifetime::Timeframe);
92 outputSpec.emplace_back(
"ITS",
"TRACKSMCTR", 0, Lifetime::Timeframe);
93 outputSpec.emplace_back(
"ITS",
"VERTICESMCTR", 0, Lifetime::Timeframe);
97 .
name =
"its-track-reader",
99 .outputs = outputSpec,
100 .algorithm =
AlgorithmSpec{adaptFromTask<TrackReader>(useMC)},
102 {
"its-tracks-infile", VariantType::String,
"o2trac_its.root", {
"Name of the input track file"}},
103 {
"input-dir", VariantType::String,
"none", {
"Input directory"}}}};
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.
std::vector< o2::MCCompLabel > mMCVertTruth
std::vector< int > mClusInd
void init(o2::framework::InitContext &ic) final
std::vector< o2::itsmft::ROFRecord > mROFRec
std::vector< o2::itsmft::ROFRecord > * mROFRecInp
std::string mTrackTreeName
o2::header::DataOrigin mOrigin
std::vector< o2::MCCompLabel > * mMCTruthInp
std::string mTrackMCTruthBranchName
std::string mInputFileName
std::vector< o2::itsmft::ROFRecord > mVerticesROFRec
std::string mTrackBranchName
std::string mClusIdxBranchName
std::unique_ptr< TTree > mTree
std::unique_ptr< TFile > mFile
std::vector< o2::its::TrackITS > mTracks
std::string mROFBranchName
std::vector< Vertex > mVertices
std::vector< Vertex > * mVerticesInp
void run(o2::framework::ProcessingContext &pc) final
void connectTree(const std::string &filename)
std::vector< o2::MCCompLabel > mMCTruth
std::string mVertexBranchName
std::vector< o2::its::TrackITS > * mTracksInp
std::vector< int > * mClusIndInp
Defining ITS Vertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
framework::DataProcessorSpec getITSTrackReaderSpec(bool useMC=true)
static std::string rectifyDirectory(const std::string_view p)
static std::string concat_string(Ts const &... ts)
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"