ATLAS Offline Software
ICommonTOB.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "ICommonTOB.h"
6 
7 #include <sstream>
8 
9 namespace GlobalSim::IOBitwise {
10 
11  std::string ICommonTOB::to_string() const {
12  std::stringstream ss;
13 
14  auto et = et_bits();
15  auto eta = eta_bits();
16  auto phi = phi_bits();
17 
18  ss << "Et: " << et << " (" << et.to_ulong() << ") "
19  << "Eta: " << eta << " (" << eta.to_ulong() << ") "
20  << "Phi: " << phi << " (" << phi.to_ulong() << ") ";
21 
22  return ss.str();
23 
24  }
25 }
26 
27 std::ostream& operator << (std::ostream& os,
29  os << tob.to_string();
30  return os;
31 }
32 
GlobalSim::IOBitwise::ICommonTOB::to_string
virtual std::string to_string() const =0
print out contents to string
Definition: ICommonTOB.cxx:11
et
Extra patterns decribing particle interation process.
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
ICommonTOB.h
GlobalSim::IOBitwise::ICommonTOB
Class to hold common (eta/eta/phi) TOB bits.
Definition: ICommonTOB.h:27
GlobalSim::operator<<
std::ostream & operator<<(std::ostream &os, const TestCounts &tc)
Definition: eEmSortSelectCountContainerComparator.cxx:47
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
GlobalSim::IOBitwise
Definition: eEmMultAlgTool.h:19
GlobalSim::IOBitwise::ICommonTOB::eta_bits
virtual std::bitset< s_eta_width > eta_bits() const =0
Returns the eta bits of this TOB.
GlobalSim::IOBitwise::ICommonTOB::et_bits
virtual std::bitset< s_et_width > et_bits() const =0
Returns the eT bits of this TOB.
GlobalSim::IOBitwise::ICommonTOB::phi_bits
virtual std::bitset< s_phi_width > phi_bits() const =0
Returns the phi bits of this TOB.