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{
21
22#ifndef GPUCA_ALIGPUCODE
24
25std::string PrimaryVertexExt::asString() const
26{
27 auto str = o2::utils::Str::concat_string(PrimaryVertex::asString(), fmt::format("VtxID={} FT0A/C={}/{} FT0T={}", VtxID, FT0A, FT0C, FT0Time));
28 for (int i = 0; i < GTrackID::Source::NSources; i++) {
29 if (getNSrc(i) > 0) {
30 str += fmt::format(" {}={}", GTrackID::getSourceName(i), getNSrc(i));
31 }
32 }
33 return str;
34}
35
36std::ostream& operator<<(std::ostream& os, const o2::dataformats::PrimaryVertexExt& v)
37{
38 // stream itself
39 os << v.asString();
40 return os;
41}
42
44{
45 std::cout << *this << std::endl;
46}
47
48#endif
49
50} // namespace dataformats
51} // 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