ATLAS Offline Software
Public Member Functions | Private Attributes | Friends | List of all members
TrigRNNOutput Class Reference

This class carries the output of the Neural Network of TrigMultiVarHypo. More...

#include <TrigRNNOutput.h>

Collaboration diagram for TrigRNNOutput:

Public Member Functions

 TrigRNNOutput ()
 Class default constructor. More...
 
 TrigRNNOutput (const std::vector< float > &output)
 Class constructor. More...
 
std::vector< float > & output ()
 Acessor methods. More...
 
const std::vector< float > & output () const
 
void output (const std::vector< float > &o)
 
float & at (const unsigned int i)
 
const float & at (const unsigned int i) const
 
unsigned int size () const
 
const float & operator[] (const unsigned int i) const
 
float & operator[] (const unsigned int i)
 
bool isValid () const
 Set and manipulate ElementLink. More...
 
void setCluster (const TrigEMClusterContainer &cluster_con, unsigned int cluster_idx)
 
void setCluster (const ElementLink< TrigEMClusterContainer > &cluster)
 
const TrigEMClustercluster () const
 
const ElementLink< TrigEMClusterContainer > & clusterLink () const
 

Private Attributes

std::vector< float > m_output
 
ElementLink< TrigEMClusterContainerm_cluster
 

Friends

template<class T >
class TrigRNNOutputConverterBase
 

Detailed Description

This class carries the output of the Neural Network of TrigMultiVarHypo.

Definition at line 21 of file Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigRNNOutput.h.

Constructor & Destructor Documentation

◆ TrigRNNOutput() [1/2]

TrigRNNOutput::TrigRNNOutput ( )

Class default constructor.

Definition at line 9 of file TrigRNNOutput.cxx.

10  : m_output(), m_cluster() {
11 }

◆ TrigRNNOutput() [2/2]

TrigRNNOutput::TrigRNNOutput ( const std::vector< float > &  output)

Class constructor.

Parameters
outputThe neural network output.

Definition at line 13 of file TrigRNNOutput.cxx.

14  : m_output(output), m_cluster() {
15 }

Member Function Documentation

◆ at() [1/2]

float & TrigRNNOutput::at ( const unsigned int  i)

Definition at line 29 of file TrigRNNOutput.cxx.

29  {
30  return m_output.at(i);
31 }

◆ at() [2/2]

const float & TrigRNNOutput::at ( const unsigned int  i) const

Definition at line 33 of file TrigRNNOutput.cxx.

33  {
34  return m_output.at(i);
35 }

◆ cluster()

const TrigEMCluster * TrigRNNOutput::cluster ( ) const

Definition at line 64 of file TrigRNNOutput.cxx.

64  {
65  if (m_cluster.isValid()) {
66  return *m_cluster;
67  }
68  return 0;
69 }

◆ clusterLink()

const ElementLink< TrigEMClusterContainer > & TrigRNNOutput::clusterLink ( ) const

Definition at line 78 of file TrigRNNOutput.cxx.

79 {
80  return m_cluster;
81 }

◆ isValid()

bool TrigRNNOutput::isValid ( ) const

Set and manipulate ElementLink.

Definition at line 49 of file TrigRNNOutput.cxx.

49  {
50  return m_cluster.isValid();
51 }

◆ operator[]() [1/2]

float & TrigRNNOutput::operator[] ( const unsigned int  i)

Definition at line 45 of file TrigRNNOutput.cxx.

45  {
46  return m_output[i];
47 }

◆ operator[]() [2/2]

const float & TrigRNNOutput::operator[] ( const unsigned int  i) const

Definition at line 41 of file TrigRNNOutput.cxx.

41  {
42  return m_output[i];
43 }

◆ output() [1/3]

std::vector< float > & TrigRNNOutput::output ( )

Acessor methods.

Definition at line 17 of file TrigRNNOutput.cxx.

17  {
18  return m_output;
19 }

◆ output() [2/3]

const std::vector< float > & TrigRNNOutput::output ( ) const

Definition at line 21 of file TrigRNNOutput.cxx.

21  {
22  return m_output;
23 }

◆ output() [3/3]

void TrigRNNOutput::output ( const std::vector< float > &  o)

Definition at line 25 of file TrigRNNOutput.cxx.

25  {
26  m_output = o;
27 }

◆ setCluster() [1/2]

void TrigRNNOutput::setCluster ( const ElementLink< TrigEMClusterContainer > &  cluster)

Definition at line 72 of file TrigRNNOutput.cxx.

73 {
75 }

◆ setCluster() [2/2]

void TrigRNNOutput::setCluster ( const TrigEMClusterContainer cluster_con,
unsigned int  cluster_idx 
)

Definition at line 53 of file TrigRNNOutput.cxx.

53  {
54  if (cluster_idx < cluster_con.size()) {
55  m_cluster.toIndexedElement(cluster_con, cluster_idx);
56  if (!m_cluster.isValid()) {
57  m_cluster.reset();
58  }
59  } else {
60  m_cluster.reset();
61  }
62 }

◆ size()

unsigned int TrigRNNOutput::size ( ) const

Definition at line 37 of file TrigRNNOutput.cxx.

37  {
38  return m_output.size();
39 }

Friends And Related Function Documentation

◆ TrigRNNOutputConverterBase

template<class T >
friend class TrigRNNOutputConverterBase
friend

Member Data Documentation

◆ m_cluster

ElementLink<TrigEMClusterContainer> TrigRNNOutput::m_cluster
private

◆ m_output

std::vector<float> TrigRNNOutput::m_output
private

The documentation for this class was generated from the following files:
TrigRNNOutput::cluster
const TrigEMCluster * cluster() const
Definition: TrigRNNOutput.cxx:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
TrigRNNOutput::m_cluster
ElementLink< TrigEMClusterContainer > m_cluster
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigRNNOutput.h:25
TrigRNNOutput::m_output
std::vector< float > m_output
Definition: Trigger/TrigEvent/TrigCaloEvent/TrigCaloEvent/TrigRNNOutput.h:24
TrigRNNOutput::output
std::vector< float > & output()
Acessor methods.
Definition: TrigRNNOutput.cxx:17
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.