ATLAS Offline Software
|
Basic container for event feature data. More...
#include <EventFeature.h>
Public Types | |
enum | FeatureType { ETDENSITY = 0x1000, ETDENSITY_JETAREA = 0x1100, ETDENSITY_JETAREA_ETA = 0x1101, ETDENSITY_ETA_WINDOWS = 0x1201, ETDENSITY_USER = 0x0010, UNKNOWN = 0x0000, DEFAULT = 0xffff } |
@ More... | |
enum | FeatureStructureMask { NDATAWORDS = 0x0000007f, NDATABLOCKS = 0x00003f80, TAGBITS = 0x0000c000, MASKLENGTH = 0x0000ffff, BITSHIFT = 0x00000007 } |
Feature structure descriptors. More... | |
Public Member Functions | |
EventFeature () | |
Default constructor. More... | |
EventFeature (FeatureType type, const std::string &tag, const std::vector< double > &dataList) | |
Loaded constructor. More... | |
EventFeature (FeatureType type, const std::string &tag, unsigned int dataStructure, const std::vector< double > &dataList) | |
Loaded constructor. More... | |
EventFeature (FeatureType type, const std::string &tag, unsigned int dataStructure) | |
Loaded constructor. More... | |
EventFeature (const EventFeature &feature) | |
Copy constructor. More... | |
virtual | ~EventFeature () |
Destructor. More... | |
EventFeature & | operator= (const EventFeature &feature) |
Assignment operator. More... | |
const std::string & | tag () const |
Retrieve feature tag. More... | |
FeatureType | type () const |
Retrieve feature type. More... | |
unsigned int | featureStructure () const |
Retrieve data structure descriptor. More... | |
size_t | numberDataBlocks () |
Retrieve number of data blocks. More... | |
size_t | numberDataWords () const |
Retrieve number of words in data block. More... | |
const std::vector< double > & | dataList () const |
Retrieve reference to vector store. More... | |
std::vector< double > & | dataList () |
Retrieve reference to vector store. More... | |
bool | dataBlock (size_t blockIdx, std::vector< double > &data) |
Return one datablock. More... | |
void | setTag (const std::string &tag) |
Set feature tag. More... | |
void | setType (FeatureType type) |
Set feature type. More... | |
void | setNumberDataBlocks (size_t nBlocks) |
Set number of blocks. More... | |
void | setNumberDataWords (size_t nWords) |
Set number of data words per block. More... | |
void | setDataList (const std::vector< double > &data) |
Set vector data store. More... | |
bool | setDataBlock (size_t blockIdx, const std::vector< double > &data, bool replace=true) |
Set one data block. More... | |
bool | addDataBlock (const std::vector< double > &data) |
unsigned int | buildFeatureStructure () |
Build compressed feature structure. More... | |
Static Public Member Functions | |
static FeatureType | featureType (const std::string &typeTag) |
Binned scalar data model. More... | |
static FeatureType | featureType () |
Default feature type. More... | |
static const std::string & | featureTag (FeatureType type) |
Convert a FeatureType to a tag. More... | |
static const std::string & | featureTag () |
Default feature tag. More... | |
Private Types | |
typedef std::pair< size_t, size_t > | index_t |
Private Member Functions | |
void | setFeatureStructure (bool updateCache=false) |
Set/update feature structure. More... | |
bool | insertDataBlock (size_t startIdx, size_t endIdx, const std::vector< double > &data) |
bool | addDataBlock (size_t startIdx, size_t endIdx, const std::vector< double > &data) |
bool | indexRange (size_t startIdx, index_t &idx) |
Private Attributes | |
FeatureType | m_type |
Internal cache for feature type. More... | |
std::string | m_tag |
Internal cache for feature tag. More... | |
unsigned int | m_dataWords |
Internal cache data structure description (words per block) More... | |
unsigned int | m_dataBlocks |
Internal cache for data structure descriptor (number of blocks) More... | |
unsigned int | m_featureStructure |
Internal cache for compressed data structure descriptor. More... | |
std::vector< double > | m_dataList |
Internal cache for vector data. More... | |
bool | m_structureFixed |
Control flag for setting number of data words. More... | |
Static Private Attributes | |
static const std::map< FeatureType, std::string > | m_featureTags |
Lookup for feature type and tag matches. More... | |
Basic container for event feature data.
Basic container for event feature data or parameters. Each entry is characterized by the type of information, a tag, and possibly scalar (number) and/or vector (list of numbers or list of number patterns). The possible interpretation of the number patterns depends on the feature type and is usually implemented in the tool producing the EventFeature
object.
Definition at line 17 of file EventFeature.h.
|
private |
Definition at line 206 of file EventFeature.h.
Feature structure descriptors.
Mostly useful for T/P converter yet public for converter access
Enumerator | |
---|---|
NDATAWORDS | |
NDATABLOCKS | |
TAGBITS | |
MASKLENGTH | |
BITSHIFT |
Definition at line 39 of file EventFeature.h.
@
Type enumerators
Enumerator | |
---|---|
ETDENSITY | |
ETDENSITY_JETAREA |
|
ETDENSITY_JETAREA_ETA |
|
ETDENSITY_ETA_WINDOWS | density in sliding \( \eta \) windows |
ETDENSITY_USER | User defined density. |
UNKNOWN | Unknown type. |
DEFAULT | Default type. |
Definition at line 23 of file EventFeature.h.
EventFeature::EventFeature | ( | ) |
Default constructor.
Instantiates empty data object, with defaults:
type = EventFeature::UNKNOWN;
tag = "Default";
dataList = std::vector<double>();
This object also has no internal data structure (0 data words in 0 blocks).
Definition at line 46 of file EventFeature.cxx.
EventFeature::EventFeature | ( | FeatureType | type, |
const std::string & | tag, | ||
const std::vector< double > & | dataList | ||
) |
Loaded constructor.
[in] | type | EventFeature type |
[in] | tag | string identifier/tag for data |
[in] | dataList | reference to non-modifiable data vector to be copied to internal store |
dataList.size()
words in one block. Definition at line 56 of file EventFeature.cxx.
EventFeature::EventFeature | ( | FeatureType | type, |
const std::string & | tag, | ||
unsigned int | dataStructure, | ||
const std::vector< double > & | dataList | ||
) |
Loaded constructor.
[in] | type | EventFeature type |
[in] | tag | string identifier/tag for data |
[in] | data | scalar (number) data word to be stored internally |
[in] | dataList | reference to non-modifiable data vector to be copied to internal store |
Definition at line 69 of file EventFeature.cxx.
EventFeature::EventFeature | ( | FeatureType | type, |
const std::string & | tag, | ||
unsigned int | dataStructure | ||
) |
Loaded constructor.
[in] | type | EventFeature type |
[in] | tag | string identifier/tag for data |
[in] | data | scalar (number) data word to be stored internally |
std::vector<double>()
). Definition at line 82 of file EventFeature.cxx.
EventFeature::EventFeature | ( | const EventFeature & | feature | ) |
|
virtual |
bool EventFeature::addDataBlock | ( | const std::vector< double > & | data | ) |
Definition at line 158 of file EventFeature.cxx.
|
private |
Definition at line 165 of file EventFeature.cxx.
unsigned int EventFeature::buildFeatureStructure | ( | ) |
bool EventFeature::dataBlock | ( | size_t | blockIdx, |
std::vector< double > & | data | ||
) |
Return one datablock.
Definition at line 131 of file EventFeature.cxx.
|
inline |
Retrieve reference to vector store.
const
reference to modifiable vector data store. Definition at line 292 of file EventFeature.h.
|
inline |
Retrieve reference to vector store.
const
reference to non-modifiable vector data store. Definition at line 289 of file EventFeature.h.
|
inline |
Retrieve data structure descriptor.
Definition at line 286 of file EventFeature.h.
|
static |
Default feature tag.
Definition at line 35 of file EventFeature.cxx.
|
static |
|
static |
|
static |
Binned scalar data model.
[in] | lmin | minimum / void setBinnedData(double lmin,double lmax,double data); |
/*! Convert feature tag to FeatureType
Definition at line 27 of file EventFeature.cxx.
|
private |
Definition at line 225 of file EventFeature.cxx.
|
private |
|
inline |
Retrieve number of data blocks.
Definition at line 311 of file EventFeature.h.
|
inline |
Retrieve number of words in data block.
Definition at line 308 of file EventFeature.h.
EventFeature & EventFeature::operator= | ( | const EventFeature & | feature | ) |
Assignment operator.
Copies data content from EventFeature
source.
[in] | feature | reference to non-modifiable EventFeature object |
Definition at line 108 of file EventFeature.cxx.
bool EventFeature::setDataBlock | ( | size_t | blockIdx, |
const std::vector< double > & | data, | ||
bool | replace = true |
||
) |
|
inline |
Set vector data store.
[in] | data | reference to non-modifiable data vector |
Definition at line 301 of file EventFeature.h.
|
private |
void EventFeature::setNumberDataBlocks | ( | size_t | nBlocks | ) |
Set number of blocks.
[in] | nBlocks | number of data blocks |
Definition at line 194 of file EventFeature.cxx.
void EventFeature::setNumberDataWords | ( | size_t | nWords | ) |
Set number of data words per block.
[in] | nWords | number of data words per block |
Definition at line 183 of file EventFeature.cxx.
|
inline |
Set feature tag.
[in] | tag | reference to non-modifiable tag string |
Definition at line 298 of file EventFeature.h.
|
inline |
|
inline |
Retrieve feature tag.
const
reference to non-modifiable feature tag (string). Definition at line 280 of file EventFeature.h.
|
inline |
|
private |
Internal cache for data structure descriptor (number of blocks)
Definition at line 229 of file EventFeature.h.
|
private |
Internal cache for vector data.
Definition at line 233 of file EventFeature.h.
|
private |
Internal cache data structure description (words per block)
Definition at line 227 of file EventFeature.h.
|
private |
Internal cache for compressed data structure descriptor.
Definition at line 231 of file EventFeature.h.
|
staticprivate |
Lookup for feature type and tag matches.
Definition at line 242 of file EventFeature.h.
|
private |
Control flag for setting number of data words.
Can only be done once!
Definition at line 239 of file EventFeature.h.
|
private |
Internal cache for feature tag.
Definition at line 225 of file EventFeature.h.
|
private |
Internal cache for feature type.
Definition at line 223 of file EventFeature.h.