ATLAS Offline Software
Loading...
Searching...
No Matches
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>
9
10TrigPassBits::TrigPassBits(unsigned sz, const void* cont)
11 : m_container_ptr(cont), m_decisions(sz) {}
12
13void 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
23bool 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}
bool isPassing(unsigned position) const
Check the bit value a the position.
void markPassing(unsigned position, const void *cont=0)
Set the bit value a the position to true.
std::vector< bool > m_decisions
trainsient bits storage (STL docu assures that this is efficient)