33 throw std::runtime_error(
"Index out of range" );
38 accBits(
"passBits" );
39 std::vector< uint32_t >& bits = accBits( *
this );
42 const size_t vec_element =
index / 32;
43 const size_t vec_index =
index % 32;
46 if( vec_element >= bits.size() ) {
47 throw std::runtime_error(
"The object is in an inconsistent state" );
51 const uint32_t bit = ( 0x1 << vec_index );
58 bits[ vec_element ] = mask;
73 throw std::runtime_error(
"Index out of range" );
77 const std::vector< uint32_t >& bits =
passBits();
80 const size_t vec_element =
index / 32;
81 const size_t vec_index =
index % 32;
84 if( vec_element >= bits.size() ) {
85 throw std::runtime_error(
"The object is in an inconsistent state" );
89 const uint32_t bit = ( 0x1 << vec_index );
90 const uint32_t mask = bits[ vec_element ];
91 return ( mask & bit );
103 static const std::hash< std::string > helper;
107 return (
static_cast< uint32_t >( helper( key ) ) & 0x3fffffff );
117 containerKey, setContainerKey )
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
SG::Accessor< T, ALLOC > Accessor
AuxElement()
Default constructor.
Type describing which elements in a container passed a trigger chain.
uint32_t size() const
The size of the target container.
const std::vector< uint32_t > & passBits() const
The internal bitmap created with the hypo decisions.
static uint32_t hash(const std::string &key)
Function calculating a "hash" out of a string.
bool isPassing(const OBJ *obj, const CONT *container) const
Check if an element of a container is passing/failing.
void markPassing(const OBJ *obj, const CONT *container, bool passed=true)
Mark one of the elements of the target container as passing/failing.
const void * m_container
Transient pointer to the target container.
TrigPassBits_v1()
Default constructor.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
setPassBits containerClid