ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Muon::ChamberT0s Class Reference

Stores links between chambers and the reconstructed T0. More...

#include <ChamberT0s.h>

Collaboration diagram for Muon::ChamberT0s:

Public Member Functions

 ChamberT0s ()
 
 ChamberT0s (const std::vector< std::pair< Identifier, float > > &t0s)
 
 ChamberT0s (std::vector< std::pair< Identifier, float > > &&t0s)
 
 ~ChamberT0s ()
 
bool haveChamber (const Identifier &id) const
 Returns true if we have the T0 for this chamber? More...
 
float getT0 (const Identifier &id) const
 Returns the T0 for this chamber (or ChamberT0s::ChamberUnknown if the chamber is not in list) More...
 
const std::vector< std::pair< Identifier, float > > & getAllT0s () const
 Returns entire list of T0s. More...
 

Static Public Attributes

static constexpr float ChamberUnknown = -99999.9
 Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s. More...
 

Private Attributes

std::vector< std::pair< Identifier, float > > m_t0s
 

Detailed Description

Stores links between chambers and the reconstructed T0.

Author
edwar.nosp@m.d.mo.nosp@m.yse@c.nosp@m.ern..nosp@m.ch

Definition at line 17 of file ChamberT0s.h.

Constructor & Destructor Documentation

◆ ChamberT0s() [1/3]

Muon::ChamberT0s::ChamberT0s ( )
default

◆ ChamberT0s() [2/3]

Muon::ChamberT0s::ChamberT0s ( const std::vector< std::pair< Identifier, float > > &  t0s)

Definition at line 12 of file ChamberT0s.cxx.

13  :
14  m_t0s (t0s)
15 {}

◆ ChamberT0s() [3/3]

Muon::ChamberT0s::ChamberT0s ( std::vector< std::pair< Identifier, float > > &&  t0s)

Definition at line 17 of file ChamberT0s.cxx.

18  :
19  m_t0s (std::move(t0s))
20 {}

◆ ~ChamberT0s()

Muon::ChamberT0s::~ChamberT0s ( )
default

Member Function Documentation

◆ getAllT0s()

const std::vector< std::pair< Identifier, float > > & Muon::ChamberT0s::getAllT0s ( ) const
inline

Returns entire list of T0s.

It consists of a vector of pairs, where the first element is the Chamber Identifier, and the second is the T0

Definition at line 68 of file ChamberT0s.h.

68  {
69  return m_t0s;
70 }

◆ getT0()

float Muon::ChamberT0s::getT0 ( const Identifier id) const
inline

Returns the T0 for this chamber (or ChamberT0s::ChamberUnknown if the chamber is not in list)

You could use this as e.g.

float t0 = chamberT0.getT0( chamberId );
// we know about chamber, so use T0
}

Definition at line 60 of file ChamberT0s.h.

60  {
61  std::vector< std::pair < Identifier, float > >::const_iterator it
62  = std::find_if(m_t0s.begin(), m_t0s.end(),
63  [&] (const auto& p) { return p.first == id; });
64  if (it==m_t0s.end()) return ChamberUnknown; // No such chamber known.
65  return (it->second);
66 }

◆ haveChamber()

bool Muon::ChamberT0s::haveChamber ( const Identifier id) const
inline

Returns true if we have the T0 for this chamber?

Definition at line 53 of file ChamberT0s.h.

53  {
54  std::vector< std::pair < Identifier, float > >::const_iterator it
55  = std::find_if(m_t0s.begin(), m_t0s.end(),
56  [&] (const auto& p) { return p.first == id; });
57  return (it!=m_t0s.end());
58 }

Member Data Documentation

◆ ChamberUnknown

constexpr float Muon::ChamberT0s::ChamberUnknown = -99999.9
staticconstexpr

Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.

Definition at line 20 of file ChamberT0s.h.

◆ m_t0s

std::vector< std::pair < Identifier, float > > Muon::ChamberT0s::m_t0s
private

Definition at line 50 of file ChamberT0s.h.


The documentation for this class was generated from the following files:
Muon::ChamberT0s::m_t0s
std::vector< std::pair< Identifier, float > > m_t0s
Definition: ChamberT0s.h:50
Muon::ChamberT0s::ChamberUnknown
static constexpr float ChamberUnknown
Value returned by ChamberT0s::getT0(...) when chamber is not known to ChamberT0s.
Definition: ChamberT0s.h:20
TRTCalib_cfilter.t0s
list t0s
Definition: TRTCalib_cfilter.py:110
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
skel.it
it
Definition: skel.GENtoEVGEN.py:396
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210