#include <AcceptInfo.h>
|
std::string | m_name |
| The name of the class instance. More...
|
|
std::map< std::string, std::pair< std::string, unsigned int > > | m_cutMap |
| The map for mapping cut names to their description and position. More...
|
|
std::bitset< NBITS > | m_cutMask |
| A bitmap that provides a mask that only leaves defined cuts. More...
|
|
Definition at line 27 of file AcceptInfo.h.
◆ AcceptInfo()
asg::AcceptInfo::AcceptInfo |
( |
const char * |
name = "AcceptInfo" | ) |
|
|
inline |
◆ addCut()
int asg::AcceptInfo::addCut |
( |
const std::string & |
cutName, |
|
|
const std::string & |
cutDescription |
|
) |
| |
|
inline |
Add a cut; returning the cut position.
Definition at line 53 of file AcceptInfo.h.
62 std::pair< std::string, unsigned int > cutPair = std::make_pair( cutDescription,
m_cutMap.size() );
63 m_cutMap.insert( std::make_pair( cutName, cutPair ) );
◆ getCutDescription() [1/2]
const std::string & AcceptInfo::getCutDescription |
( |
const std::string & |
cutName | ) |
const |
Get the description of a cut, based on the cut name.
Definition at line 119 of file AcceptInfo.cxx.
121 static const std::string emptyString;
◆ getCutDescription() [2/2]
const std::string & AcceptInfo::getCutDescription |
( |
unsigned int |
cutPosition | ) |
const |
Get the description of a cut, based on the cut position.
Definition at line 66 of file AcceptInfo.cxx.
68 static const std::string emptyString;
71 if ( cutPosition >=
m_cutMap.size() )
79 for ( ;
it != itEnd; ++
it )
81 if ( (
it->second).second == cutPosition )
83 return (
it->second).first;
◆ getCutMask()
const std::bitset<NBITS>& asg::AcceptInfo::getCutMask |
( |
| ) |
const |
|
inline |
Get a bitmask for all cuts defined.
Definition at line 49 of file AcceptInfo.h.
◆ getCutName()
const std::string & AcceptInfo::getCutName |
( |
unsigned int |
cutPosition | ) |
const |
Get the name of a cut, based on the cut position (slow, avoid usage)
Definition at line 36 of file AcceptInfo.cxx.
38 static const std::string emptyString;
41 if ( cutPosition >=
m_cutMap.size() )
49 for ( ;
it != itEnd; ++
it )
51 if ( (
it->second).second == cutPosition )
◆ getCutPosition()
unsigned int asg::AcceptInfo::getCutPosition |
( |
const std::string & |
cutName | ) |
const |
|
inline |
Get the bit position of a cut.
Definition at line 73 of file AcceptInfo.h.
◆ getName()
const char* asg::AcceptInfo::getName |
( |
| ) |
const |
|
inline |
Get the name of the class instance.
Definition at line 43 of file AcceptInfo.h.
43 {
return m_name.c_str(); };
◆ getNCuts()
unsigned int asg::AcceptInfo::getNCuts |
( |
| ) |
const |
|
inline |
Get the number of cuts defined.
Definition at line 46 of file AcceptInfo.h.
◆ setCutDescription() [1/2]
void asg::AcceptInfo::setCutDescription |
( |
const std::string & |
cutName, |
|
|
const std::string & |
cutDescription |
|
) |
| |
|
inline |
Set the result of a cut, based on the cut name (safer)
Definition at line 92 of file AcceptInfo.h.
◆ setCutDescription() [2/2]
void AcceptInfo::setCutDescription |
( |
unsigned int |
cutPosition, |
|
|
const std::string & |
cutDescription |
|
) |
| |
Get the result of a cut, based on the cut position (faster)
Definition at line 97 of file AcceptInfo.cxx.
102 for ( ;
it != itEnd; ++
it )
104 if ( (
it->second).second == cutPosition )
106 ((
it->second).
first) = cutDescription;
◆ m_cutMap
std::map< std::string, std::pair< std::string, unsigned int > > asg::AcceptInfo::m_cutMap |
|
private |
The map for mapping cut names to their description and position.
Definition at line 109 of file AcceptInfo.h.
◆ m_cutMask
std::bitset<NBITS> asg::AcceptInfo::m_cutMask |
|
private |
A bitmap that provides a mask that only leaves defined cuts.
Definition at line 112 of file AcceptInfo.h.
◆ m_name
std::string asg::AcceptInfo::m_name |
|
private |
The name of the class instance.
Definition at line 106 of file AcceptInfo.h.
◆ NBITS
const unsigned int asg::AcceptInfo::NBITS =32 |
|
static |
The number of bits for cuts.
Definition at line 32 of file AcceptInfo.h.
The documentation for this class was generated from the following files: