ATLAS Offline Software
|
A Flag is an ordered collection of bits (vector<bool>) that can hold additional (boolean) information about a trigger object. More...
#include <TrigPassFlags.h>
Public Member Functions | |
TrigPassFlags () | |
TrigPassFlags (const unsigned int size, const unsigned int flagSize, const void *cont=0) | |
Constructor to be used by the HLT algorithms Initialized the flags vector. More... | |
void | setFlagBit (const unsigned int position, const unsigned int bitPosition, const bool bitValue, const void *cont=0) |
Set bit of the flag at index position. More... | |
void | setFlag (const unsigned int position, const std::vector< bool > &flag, const void *cont=0) |
Set the flag at index position. More... | |
bool | getFlagBit (const unsigned int position, const unsigned int bitPosition) const |
Returns the bit 'bitPosition' of the flag at index position. More... | |
const std::vector< bool > & | getFlag (const unsigned int position) const |
Returns the flag (vector<bool>) at index position. More... | |
unsigned int | size () const |
gets size of the container object vector More... | |
unsigned int | flagSize () const |
gets size of the flag vector for the object at index More... | |
Private Attributes | |
const void * | m_container_ptr |
std::vector< std::vector< bool > > | m_flagsPerObject |
list of trainsient n-bit value (STL docu assures that a vector of booleans is efficient) More... | |
Friends | |
class | TrigPassFlagsCnv_p1 |
A Flag is an ordered collection of bits (vector<bool>) that can hold additional (boolean) information about a trigger object.
This information can be stored by a Hypo algorithm, together with the trigger object in the same TE. Since trigger objects are often stored within a container in the TE, the TrigPassFlags class acts a container for the corresponding flags.
Note that all flags witin a TrigPassFlags object have to be of the same size (given as parameter flagSize in the constructor)
Definition at line 29 of file TrigPassFlags.h.
TrigPassFlags::TrigPassFlags | ( | ) |
Definition at line 8 of file TrigPassFlags.cxx.
TrigPassFlags::TrigPassFlags | ( | const unsigned int | size, |
const unsigned int | flagSize, | ||
const void * | cont = 0 |
||
) |
Constructor to be used by the HLT algorithms Initialized the flags vector.
size | the size of container for which the flags will be recorded. This determines the length of the outer vector<vector<bool> > of m_flagsPerObject. |
flagSize | the size of the flags. This determines the length of the inner vector<bool> m_flagsPerObject. |
cont | pointer to the container, if given then the member functions will be performing additional check if the bits setting is the same (desired initailly container) |
Definition at line 11 of file TrigPassFlags.cxx.
|
inline |
Returns the flag (vector<bool>) at index position.
Definition at line 54 of file TrigPassFlags.cxx.
bool TrigPassFlags::getFlagBit | ( | const unsigned int | position, |
const unsigned int | bitPosition | ||
) | const |
Returns the bit 'bitPosition' of the flag at index position.
Definition at line 44 of file TrigPassFlags.cxx.
void TrigPassFlags::setFlag | ( | const unsigned int | position, |
const std::vector< bool > & | flag, | ||
const void * | cont = 0 |
||
) |
Set the flag at index position.
position | postion of the flag in the vector of flags |
flagValue | value of the flag (can be used if flagSize is smaller than sizeof(int) |
Definition at line 31 of file TrigPassFlags.cxx.
void TrigPassFlags::setFlagBit | ( | const unsigned int | position, |
const unsigned int | bitPosition, | ||
const bool | bitValue, | ||
const void * | cont = 0 |
||
) |
Set bit of the flag at index position.
position | postion of the flag in the vector of flags |
bitPosition | position of the bit within the flag |
bitValue | enable/disable the bit |
Definition at line 18 of file TrigPassFlags.cxx.
|
inline |
|
friend |
Definition at line 81 of file TrigPassFlags.h.
|
private |
Definition at line 83 of file TrigPassFlags.h.
|
private |
list of trainsient n-bit value (STL docu assures that a vector of booleans is efficient)
Definition at line 84 of file TrigPassFlags.h.