xAOD::TrigPassBits_v1 Class Reference

#include <TrigPassBits_v1.h>

Inheritance diagram for xAOD::TrigPassBits_v1:
SG::AuxElement SG::IAuxElement

List of all members.

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.

Detailed Description

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.

Author:
Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Tomasz Bold <Tomasz.Bold@cern.ch>
Revision
704009
Date
2015-10-28 09:32:05 +0100 (Wed, 28 Oct 2015)

Member Function Documentation

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.

Parameters:
index The index of the object to check the state of
Returns:
The "passing state" of the object with the specified index
template<class OBJ , class CONT >
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.

Parameters:
obj The objects whose state we should check
container The container that the object is part of
Returns:
The "passing state" of the object
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.

Parameters:
index The index of the object to set the state of
passed The "passing state" of the object with the specified index
template<class OBJ , class CONT >
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.

Parameters:
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
template<class CONT >
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.

Parameters:
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.)

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 15 Apr 2017 for RootCore Packages by  doxygen 1.6.1