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

#include <TrigPassBits.h>

Collaboration diagram for TrigPassBits:

Public Member Functions

 TrigPassBits ()
 
 TrigPassBits (unsigned sz, const void *cont=0)
 Constructor to be used by the HLT algorithms Else the mark_passing and is_passing won't work. More...
 
void markPassing (unsigned position, const void *cont=0)
 Set the bit value a the position to true. More...
 
bool isPassing (unsigned position) const
 Check the bit value a the position. More...
 
unsigned int size () const
 gets size of the bits array More...
 

Private Attributes

const void * m_container_ptr
 
std::vector< bool > m_decisions
 trainsient bits storage (STL docu assures that this is efficient) More...
 

Friends

class TrigPassBitsCnv_p1
 

Detailed Description

Definition at line 17 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h.

Constructor & Destructor Documentation

◆ TrigPassBits() [1/2]

TrigPassBits::TrigPassBits ( )

Definition at line 7 of file TrigPassBits.cxx.

8  : m_container_ptr(0), m_decisions(0) {}

◆ TrigPassBits() [2/2]

TrigPassBits::TrigPassBits ( unsigned  sz,
const void *  cont = 0 
)

Constructor to be used by the HLT algorithms Else the mark_passing and is_passing won't work.

Parameters
szthe size of container for which the bits storing decision for particular obj will be stored.
contpointer to the container, if given then the mark_passing will be performing additional check if the bits setting is about the same (desired initailly container)

Definition at line 10 of file TrigPassBits.cxx.

11  : m_container_ptr(cont), m_decisions(sz) {}

Member Function Documentation

◆ isPassing()

bool TrigPassBits::isPassing ( unsigned  position) const

Check the bit value a the position.

Warning
The HLT code should be using helper of the same name defined below.

Definition at line 23 of file TrigPassBits.cxx.

23  {
24  if ( position >= m_decisions.size())
25  throw std::runtime_error("When checking that object passed the trigger discovered to small bit storage");
26 
27  return m_decisions[position];
28 }

◆ markPassing()

void TrigPassBits::markPassing ( unsigned  position,
const void *  cont = 0 
)

Set the bit value a the position to true.

Warning
The HLT code should be using helper defined of the same name for each container type needed.

Definition at line 13 of file TrigPassBits.cxx.

13  {
14  if (m_container_ptr && cont != m_container_ptr)
15  throw std::runtime_error("When marking that object passed the trigger discovered that TrigPassBits was created for other container");
16 
17  if ( position >= m_decisions.size())
18  throw std::runtime_error("When marking that object passed the trigger discovered to small bit storage");
19 
20  m_decisions[position] = true;
21 }

◆ size()

unsigned int TrigPassBits::size ( ) const
inline

gets size of the bits array

Definition at line 44 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h.

44 { return m_decisions.size(); }

Friends And Related Function Documentation

◆ TrigPassBitsCnv_p1

friend class TrigPassBitsCnv_p1
friend

Member Data Documentation

◆ m_container_ptr

const void* TrigPassBits::m_container_ptr
private

◆ m_decisions

std::vector<bool> TrigPassBits::m_decisions
private

trainsient bits storage (STL docu assures that this is efficient)

Definition at line 49 of file Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h.


The documentation for this class was generated from the following files:
fitman.sz
sz
Definition: fitman.py:527
TrigPassBits::m_container_ptr
const void * m_container_ptr
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:48
TrigPassBits::m_decisions
std::vector< bool > m_decisions
trainsient bits storage (STL docu assures that this is efficient)
Definition: Trigger/TrigEvent/TrigSteeringEvent/TrigSteeringEvent/TrigPassBits.h:49