Project
Loading...
Searching...
No Matches
PrimaryVertexExt.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13#include <fmt/printf.h>
14#include <iostream>
16
17namespace o2
18{
19namespace dataformats
20{
22
23std::string PrimaryVertexExt::asString() const
24{
25 auto str = o2::utils::Str::concat_string(PrimaryVertex::asString(), fmt::format("VtxID={} FT0A/C={}/{} FT0T={}", VtxID, FT0A, FT0C, FT0Time));
26 for (int i = 0; i < GTrackID::Source::NSources; i++) {
27 if (getNSrc(i) > 0) {
28 str += fmt::format(" {}={}", GTrackID::getSourceName(i), getNSrc(i));
29 }
30 }
31 return str;
32}
33
34std::ostream& operator<<(std::ostream& os, const o2::dataformats::PrimaryVertexExt& v)
35{
36 // stream itself
37 os << v.asString();
38 return os;
39}
40
42{
43 std::cout << *this << std::endl;
44}
45
46} // namespace dataformats
47} // namespace o2
int32_t i
const GLdouble * v
Definition glcorearb.h:832
std::ostream & operator<<(std::ostream &os, const o2::dataformats::MeanVertexObject &o)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static std::string concat_string(Ts const &... ts)
const std::string str