|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRTCONDITIONSDATA_FLOATARRAYSTORE_H
6 #define TRTCONDITIONSDATA_FLOATARRAYSTORE_H
27 #include "Identifier/Identifier.h"
37 typedef std::less<Identifier>
lessp;
38 typedef std::map<Identifier,int,lessp>
BufferMap;
39 typedef BufferMap::const_iterator
map_citr;
40 typedef std::vector< std::vector<float> >
Buffer;
51 const std::string&
tag()
const;
72 void push_back(
const std::vector<Identifier>& identvec,
const std::vector<float>&
value);
124 for(std::vector<Identifier>::const_iterator
it = identvec.begin() ;
it != identvec.end(); ++
it)
139 inline const std::vector<float>& FloatArrayStore::operator[]
141 {
return m_buf[std::abs(m_bufmap.find(
ident)->second)]; }
std::string m_tag
The tag std::string.
int numberOfIDs() const
Size accessor.
void removeID(const Identifier &ident)
remove new index
map_citr begin() const
begin/end iterators
void share(const Identifier &ident, const Identifier &referenceIdent)
makes index ident share data with referenceIdent
const std::string & tag() const
Tag accessor.
virtual ~FloatArrayStore()
destructor
Buffer m_buf
The std::vector<float> stored in each second element.
void dbg() const
print method
FloatArrayStore & operator=(FloatArrayStore &&other)
move assignment
FloatArrayStore()
constructors, optionally with a tag
std::istream & operator>>(std::istream &is, FloatArrayStore &store)
std::ostream & operator<<(std::ostream &os, const FloatArrayStore &store)
const Buffer & buffer() const
return stored vector
const std::vector< float > & operator[](const Identifier &ident) const
Overload [] const access.
std::vector< std::vector< float > > Buffer
bool existID(const Identifier &ident) const
returns flag for index existing in the std::map
map_citr cbegin() const
begin/end const iterators
std::less< Identifier > lessp
bool sharedID(const Identifier &ident) const
returns flag for index sharing data
void cleanUp()
remove data with no index pointing to it
BufferMap::const_iterator map_citr
std::map< Identifier, int, lessp > BufferMap
BufferMap m_bufmap
The std::map.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
class FloatArrayStore Access and manipulate an indexed storage of float vectors
macros to associate a CLID to a type
void push_back(const Identifier &ident, const std::vector< float > &value)
makes new indices