15 {ETDENSITY,
"ETDENSITY"},
16 {ETDENSITY_JETAREA,
"ETDESNSITY_JETAREA"},
17 {ETDENSITY_JETAREA_ETA,
"ETDENSITY_JETAREA_ETA"},
18 {ETDENSITY_ETA_WINDOWS,
"ETDENSITY_ETA_WINDOWS"},
19 {ETDENSITY_USER,
"ETDENSITY_USER"},
29 std::map<FeatureType,std::string>::const_iterator fMap(
m_featureTags.begin());
30 std::map<FeatureType,std::string>::const_iterator lMap(
m_featureTags.end());
31 while ( fMap != lMap &&
tag != fMap->second ) { ++ fMap; }
32 return fMap != lMap ? fMap->first :
UNKNOWN;
64 const std::string&
tag,
117 if (
this != &feature) {
143 if ( !this->
indexRange(blockIdx,idx) )
return false;
145 for (
size_t i(idx.first); i<idx.second; ++i )
149 return !
data.empty();
153 const std::vector<double>&
data,
173 const std::vector<double>&
data)
176 size_t imax(std::min(endIdx-startIdx,
data.size()));
183 const std::vector<double>&
data)
185 size_t imax(std::min(endIdx-startIdx,
data.size()));
203 if ( nBlocks <= (
size_t)
236 if ( locIdx >
m_dataList.size() )
return false;
237 idx.first = startIdx;
char data[hepevt_bytes_allocation_ATLAS]
bool inRange(const double *boundaries, const double value, const double tolerance=0.02)
std::string m_tag
Internal cache for feature tag.
unsigned int buildFeatureStructure()
Build compressed feature structure.
void setNumberDataWords(size_t nWords)
Set number of data words per block.
static FeatureType featureType()
Default feature type.
FeatureType type() const
Retrieve feature type.
std::vector< double > m_dataList
Internal cache for vector data.
bool setDataBlock(size_t blockIdx, const std::vector< double > &data, bool replace=true)
Set one data block.
EventFeature & operator=(const EventFeature &feature)
Assignment operator.
static const std::map< FeatureType, std::string > m_featureTags
Lookup for feature type and tag matches.
unsigned int m_dataBlocks
Internal cache for data structure descriptor (number of blocks)
void setNumberDataBlocks(size_t nBlocks)
Set number of blocks.
virtual ~EventFeature()
Destructor.
static const std::string & featureTag()
Default feature tag.
FeatureType m_type
Internal cache for feature type.
unsigned int m_dataWords
Internal cache data structure description (words per block)
bool addDataBlock(const std::vector< double > &data)
void setFeatureStructure(bool updateCache=false)
Set/update feature structure.
bool dataBlock(size_t blockIdx, std::vector< double > &data)
Return one datablock.
const std::vector< double > & dataList() const
Retrieve reference to vector store.
bool indexRange(size_t startIdx, index_t &idx)
bool insertDataBlock(size_t startIdx, size_t endIdx, const std::vector< double > &data)
std::pair< size_t, size_t > index_t
bool m_structureFixed
Control flag for setting number of data words.
unsigned int m_featureStructure
Internal cache for compressed data structure descriptor.
const std::string & tag() const
Retrieve feature tag.
EventFeature()
Default constructor.
std::string replace(std::string s, const std::string &s2, const std::string &s3)
static double invalidValue()
static double nullValue()