75 ic.
options().
get<std::string>(
"primary-vertex-infile"));
82 auto ent =
mTree->GetReadEntry() + 1;
83 assert(ent < mTree->GetEntries());
85 LOG(info) <<
"Pushing " <<
mVerticesPtr->size() <<
" vertices at entry " << ent;
97 for (
size_t cnt = 0; cnt < nrec; cnt++) {
106 LOG(info) <<
"#" << cnt <<
" this is not a vertex";
110 int ncontrib = 0, nambig = 0;
112 for (
int i = idMin;
i < idMax;
i++) {
127 for (
int i = idMin;
i < idMax;
i++) {
130 if (!((++cntT) % 15)) {
136 if (!trIDs.empty()) {
143 if (
mTree->GetReadEntry() + 1 >=
mTree->GetEntries()) {
151 mTree.reset(
nullptr);
174 std::vector<OutputSpec> outputs;
175 outputs.emplace_back(
"GLO",
"PVTX", 0, Lifetime::Timeframe);
176 outputs.emplace_back(
"GLO",
"PVTX_TRMTC", 0, Lifetime::Timeframe);
177 outputs.emplace_back(
"GLO",
"PVTX_TRMTCREFS", 0, Lifetime::Timeframe);
180 outputs.emplace_back(
"GLO",
"PVTX_MCTR", 0, Lifetime::Timeframe);
184 "primary-vertex-reader",
189 {
"primary-vertex-infile", VariantType::String,
"o2_primary_vertex.root", {
"Name of the input primary vertex file"}},
190 {
"vertex-track-matches-infile", VariantType::String,
"o2_pvertex_track_matches.root", {
"Name of the input file with primary vertex - tracks matches"}},
191 {
"input-dir", VariantType::String,
"none", {
"Input directory"}},
192 {
"vertex-verbosity", VariantType::Int, 0, {
"Print vertex/tracks info: 1) number of contributor and attached, 2) dump contributors 3) full dump"}}}};
Definition of the Names Generator class.
Extention of GlobalTrackID by flags relevant for verter-track association.
Referenc on track indices contributing to the vertex, with possibility chose tracks from specific sou...
std::string asString() const
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< GIndex > * mPV2MatchIdxPtr
std::unique_ptr< TFile > mFile
std::vector< PVertex > * mVerticesPtr
std::vector< Label > * mLabelsPtr
std::unique_ptr< TTree > mTree
std::vector< PVertex > mVertices
std::string mVertexTrackIDsBranchName
std::vector< GIndex > mPV2MatchIdx
~PrimaryVertexReader() override=default
void run(o2::framework::ProcessingContext &pc) final
std::vector< Label > mLabels
std::string mVertex2TrackIDRefsBranchName
PrimaryVertexReader(bool useMC)
std::string mVertexBranchName
void init(o2::framework::InitContext &ic) final
std::string mVertexTreeName
std::string mVertexLabelsBranchName
std::vector< V2TRef > * mPV2MatchIdxRefPtr
std::vector< V2TRef > mPV2MatchIdxRef
std::string mFileNameMatches
Defining PrimaryVertex explicitly as messageable.
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
o2::framework::DataProcessorSpec getPrimaryVertexReaderSpec(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"