#include <TrigPassBits_v1.h>
Public Member Functions | |
TrigPassBits_v1 () | |
Default constructor. | |
Helper functions for easier usage | |
template<class CONT > | |
void | reset (const CONT *container, uint32_t containerKey=0xffff) |
Function configuring and resetting the object for a new target. | |
template<class OBJ , class CONT > | |
void | markPassing (const OBJ *obj, const CONT *container, bool passed=true) |
Mark one of the elements of the target container as passing/failing. | |
void | markPassing (size_t index, bool passed=true) |
Mark one of the elements of the target container as passing/failing. | |
template<class OBJ , class CONT > | |
bool | isPassing (const OBJ *obj, const CONT *container) const |
Check if an element of a container is passing/failing. | |
bool | isPassing (size_t index) const |
Check if an element of a container is passing/failing. | |
Raw data accessors | |
uint32_t | size () const |
The size of the target container. | |
void | setSize (uint32_t value) |
Set the size of the target container. | |
const std::vector< uint32_t > & | passBits () const |
The internal bitmap created with the hypo decisions. | |
void | setPassBits (const std::vector< uint32_t > &value) |
Set the internal bitmap directly (not recommended). | |
uint32_t | containerKey () const |
Hashed SG key of the target container. | |
void | setContainerKey (uint32_t value) |
Set the hashed SG key of the target container. | |
uint32_t | containerClid () const |
CLID of the target container. | |
void | setContainerClid (uint32_t value) |
Set the CLID of the target container. |
Type describing which elements in a container passed a trigger chain
This type allows us to attach simple pass/fail information to the containers that we reconstructed in Fex algorithms, in Hypo algorithms. In this case we can't just decorate the original objects, as we may want to evaluate a lot of hypotheses on the exact same objects.
bool xAOD::TrigPassBits_v1::isPassing | ( | size_t | index | ) | const |
Check if an element of a container is passing/failing.
Non-template function for checking the state of an object with a given index inside the container.
index | The index of the object to check the state of |
bool xAOD::TrigPassBits_v1::isPassing | ( | const OBJ * | obj, | |
const CONT * | container | |||
) | const [inline] |
Check if an element of a container is passing/failing.
The same comment applied as for the markPassing
function. In order to avoid clashes with the non-template function, I had to use pointer arguments for the function.
obj | The objects whose state we should check | |
container | The container that the object is part of |
void xAOD::TrigPassBits_v1::markPassing | ( | size_t | index, | |
bool | passed = true | |||
) |
Mark one of the elements of the target container as passing/failing.
Non-template function for marking an element with the specified index as passing/non-passing. Performs fewer checks than the template function, so should be used with care.
index | The index of the object to set the state of | |
passed | The "passing state" of the object with the specified index |
void xAOD::TrigPassBits_v1::markPassing | ( | const OBJ * | obj, | |
const CONT * | container, | |||
bool | passed = true | |||
) | [inline] |
Mark one of the elements of the target container as passing/failing.
Tried to use const references in the arguments, but then the function overload broke. So instead of providing template and non-template functions with slightly different names, decided to use pointers in the interface instead.
obj | The object whose state should be set | |
container | The container that the object is part of | |
passed | The "passing state" of the specified object |
void xAOD::TrigPassBits_v1::reset | ( | const CONT * | container, | |
uint32_t | containerKey = 0xffff | |||
) | [inline] |
Function configuring and resetting the object for a new target.
This function is used to initialise or reset the object, to describe a target container. It sets up all the internal variables of the object so that subsequent maskPassing/isPassing calls would succeed.
container | Pointer to the container that this object should describe | |
containerKey | A unique key describing the target container. (The sub-type index from the trigger navigation.) |