ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
jet::VecAttIndexFiller< T > Struct Template Reference
Inheritance diagram for jet::VecAttIndexFiller< T >:
Collaboration diagram for jet::VecAttIndexFiller< T >:

Public Member Functions

 VecAttIndexFiller (const std::string &attname, TH1F *h, size_t index, bool gev1)
 
virtual void fill (const xAOD::Jet &j, float weight)
 
virtual bool isValid (const xAOD::Jet &j)
 

Protected Attributes

size_t m_index
 
Accessor< std::vector< T > > m_accessor
 
TH1Fm_h
 
const float m_toGeV1
 

Detailed Description

template<typename T>
struct jet::VecAttIndexFiller< T >

Definition at line 68 of file JetAttributeHisto.cxx.

Constructor & Destructor Documentation

◆ VecAttIndexFiller()

template<typename T >
jet::VecAttIndexFiller< T >::VecAttIndexFiller ( const std::string &  attname,
TH1F h,
size_t  index,
bool  gev1 
)
inline

Definition at line 69 of file JetAttributeHisto.cxx.

69 : AccessorAndHisto<std::vector<T>,TH1F>(attname,h, gev1), m_index(index) {}

Member Function Documentation

◆ fill()

template<typename T >
virtual void jet::VecAttIndexFiller< T >::fill ( const xAOD::Jet j,
float  weight 
)
inlinevirtual

Reimplemented from jet::HistoFiller.

Definition at line 71 of file JetAttributeHisto.cxx.

71  {
72  const std::vector<T> & vec = this->m_accessor( j);
73  if( vec.size() > m_index) this->m_h->Fill( vec[m_index]*scale1, weight );
74  }

◆ isValid()

template<typename T >
virtual bool jet::VecAttIndexFiller< T >::isValid ( const xAOD::Jet j)
inlinevirtual

Reimplemented from jet::HistoFiller.

Definition at line 75 of file JetAttributeHisto.cxx.

75 {return this->m_accessor.isAvailable(j);}

Member Data Documentation

◆ m_accessor

Accessor< std::vector< T > > jet::AccessorAndHisto< std::vector< T > , TH1F >::m_accessor
protectedinherited

Definition at line 26 of file JetAttributeHisto.cxx.

◆ m_h

TH1F * jet::AccessorAndHisto< std::vector< T > , TH1F >::m_h
protectedinherited

Definition at line 27 of file JetAttributeHisto.cxx.

◆ m_index

template<typename T >
size_t jet::VecAttIndexFiller< T >::m_index
protected

Definition at line 78 of file JetAttributeHisto.cxx.

◆ m_toGeV1

const float jet::AccessorAndHisto< std::vector< T > , TH1F >::m_toGeV1
protectedinherited

Definition at line 28 of file JetAttributeHisto.cxx.


The documentation for this struct was generated from the following file:
index
Definition: index.py:1
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
jet::VecAttIndexFiller::m_index
size_t m_index
Definition: JetAttributeHisto.cxx:78
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
jet::AccessorAndHisto< std::vector< T >, TH1F >::m_h
TH1F * m_h
Definition: JetAttributeHisto.cxx:27
extractSporadic.h
list h
Definition: extractSporadic.py:97
jet::AccessorAndHisto
Definition: JetAttributeHisto.cxx:22
jet::AccessorAndHisto< std::vector< T >, TH1F >::m_accessor
Accessor< std::vector< T > > m_accessor
Definition: JetAttributeHisto.cxx:26
SG::ConstAccessor::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
scale1
#define scale1
Definition: JetAttributeHisto.cxx:41