ATLAS Offline Software
Classes | Public Member Functions | Public Attributes | List of all members
ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug > Struct Template Reference
Collaboration diagram for ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >:

Classes

struct  Empty
 

Public Member Functions

template<class T_OutStream >
void dumpStatistics (T_OutStream &out) const
 
void fillStatistics (unsigned int n_measurements) const
 

Public Attributes

std::conditional< IsDebug, std::mutex, Empty >::type m_mutex ATLAS_THREAD_SAFE
 
std::conditional< IsDebug, ActsUtils::StatHist, Empty >::type m_measPerTruthParticle ATLAS_THREAD_SAFE {20,-.5,40.-.5}
 

Detailed Description

template<bool IsDebug>
struct ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >

Definition at line 79 of file TruthParticleHitCountAlg.h.

Member Function Documentation

◆ dumpStatistics()

template<bool IsDebug>
template<class T_OutStream >
void ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >::dumpStatistics ( T_OutStream &  out) const
inline

Definition at line 74 of file TruthParticleHitCountAlg.cxx.

74  {
75  if constexpr(IsDebug) {
76  out << "Measurements per truth particle :" << m_measPerTruthParticle << std::endl
77  << m_measPerTruthParticle.histogramToString();
78  }
79  }

◆ fillStatistics()

template<bool IsDebug>
void ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >::fillStatistics ( unsigned int  n_measurements) const
inline

Definition at line 81 of file TruthParticleHitCountAlg.cxx.

81  {
82  if constexpr(IsDebug) {
83  std::lock_guard<std::mutex> lock(m_mutex);
84  m_measPerTruthParticle.add(n_measurements);
85  }
86  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/2]

template<bool IsDebug>
std::conditional<IsDebug, std::mutex, Empty>::type m_mutex ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >::ATLAS_THREAD_SAFE
mutable

Definition at line 86 of file TruthParticleHitCountAlg.h.

◆ ATLAS_THREAD_SAFE [2/2]

template<bool IsDebug>
std::conditional<IsDebug, ActsUtils::StatHist, Empty>::type m_measPerTruthParticle ActsTrk::TruthParticleHitCountAlg::AssociationCounter< IsDebug >::ATLAS_THREAD_SAFE {20,-.5,40.-.5}
mutable

Definition at line 89 of file TruthParticleHitCountAlg.h.


The documentation for this struct was generated from the following files:
createSimpleDistributions.IsDebug
bool IsDebug
Definition: createSimpleDistributions.py:12
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71