7#ifndef CALOEVENT_CALOSAMPLINGDATA_H
8#define CALOEVENT_CALOSAMPLINGDATA_H
10#include "CaloGeoHelpers/CaloSampling.h"
90 template <
class Iterator>
129 size_t index (
size_t theVariable,
size_t theSampling)
const;
257 variable_store_type::iterator beg =
259 variable_store_type::iterator end =
m_dataStore.end();
261 for (; beg < end; beg += nsamp)
268 size_t idx =
index (theVariable, 0);
293 if (testBit == 0)
return false;
303 return theVariable *
fastNsamp() + theSampling;
309 return (
size_t)(CaloSampling::Unknown);
313template <
class Iterator>
322 variable_store_type::iterator output =
Functor to check if data is valid (non-zero)
bool operator()(value_type theData)
std::vector< value_type > const_vector_type
Vector type for data exchange (read only)
unsigned int getBitPattern(variable_key_type theVariable) const
void swap(CaloSamplingData &other)
size_t index(size_t theVariable, size_t theSampling) const
size_t getNumberOfSamplings() const
Set variable type pattern for this store.
friend class CaloSamplingDataCnv_p1
std::vector< value_type > vector_type
Vector type for data exchange (read/write)
friend class CaloClusterContainerCnv_p6
CaloVariableType::VariableType variable_key_type
Variable look-up type.
unsigned int m_varTypePattern
bool checkBitPattern(variable_key_type theVariable)
CaloSamplingData()
Constructor.
value_type retrieveData(variable_key_type theVariable, sampling_key_type theSampling) const
Retrieve const reference to individual variable.
double value_type
General data type.
bool testConstPattern() const
CaloSampling::CaloSample sampling_key_type
Sampling look-up key type.
friend class CaloClusterContainerCnvTest_p7
friend class CaloSamplingDataContainerCnv_p1
size_t getNumberOfVariableTypes() const
Return number of variable types.
virtual ~CaloSamplingData()
Destructor.
std::vector< value_type > variable_store_type
Sampling look-up table type, internal use only.
bool testBitPattern(variable_key_type theVariable) const
CaloSamplingData(const CaloSamplingData &rData)
Copy constructor.
friend class CaloClusterContainerCnv_p4
friend class CaloClusterContainerCnv_p7
friend class CaloClusterContainerCnv_p5
bool storeData(variable_key_type theVariable, sampling_key_type theSampling, value_type theData)
}
friend class CaloClusterContainerCnvTest_p6
CaloSamplingData & operator=(const CaloSamplingData &)
variable_store_type m_dataStore
bool contains(variable_key_type theVariable) const
Check on available variable types.
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Copy a range with bounds restriction.
OutputIterator copy_bounded(InputIterator begi, InputIterator endi, OutputIterator bego, OutputIterator endo)
Copy a range with bounds restriction.
static unsigned int getVariableBit(const VariableType &varType)
static bool checkConst(const unsigned int &bitPattern)
static unsigned int getNumberOfVariables()