ATLAS Offline Software
TrigPassBits.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <iostream>
8  : m_container_ptr(0), m_decisions(0) {}
9 
10 TrigPassBits::TrigPassBits(unsigned sz, const void* cont)
11  : m_container_ptr(cont), m_decisions(sz) {}
12 
13 void TrigPassBits::markPassing( unsigned position, const void* cont) {
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 }
22 
23 bool TrigPassBits::isPassing( unsigned position ) const {
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 }
TrigPassBits::TrigPassBits
TrigPassBits()
Definition: TrigPassBits.cxx:7
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::isPassing
bool isPassing(unsigned position) const
Check the bit value a the position.
Definition: TrigPassBits.cxx:23
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
TrigPassBits::markPassing
void markPassing(unsigned position, const void *cont=0)
Set the bit value a the position to true.
Definition: TrigPassBits.cxx:13
TrigPassBits.h