ATLAS Offline Software
Loading...
Searching...
No Matches
DetCondCFloat.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DETDESCRCOND_DETCONDCFLOAT_H
6#define DETDESCRCOND_DETCONDCFLOAT_H
36
37#include <vector>
38#include <map>
39#include <algorithm>
40#include "Identifier/Identifier.h"
42
44
46 public:
48 DetCondCFloat(const int size,const std::string& tag);
49 virtual ~DetCondCFloat();
50
51 int size() const;
52 const std::string& tag() const;
53
54 int add(const Identifier& ident, const float* f);
55 void share(const Identifier& ident, const int index);
56 const float* find(const Identifier& ident) const;
57 int findindex(const Identifier& ident) const;
58 float get(const Identifier& ident, int k) const;
59 void print() const;
60 void print2() const;
61
62 private:
63 friend class DetCondCFloatCnv_p1;
64
65 int m_size;
66 std::string m_tag;
67 typedef std::less<Identifier> lessp;
68 typedef std::map<Identifier,int,lessp> BufferMap;
70 std::vector<float> m_buf;
71};
72
73CLASS_DEF(DetCondCFloat,247459965,1)
75
76// inline functions for DetCondCFloat
77
78inline DetCondCFloat::DetCondCFloat() : m_size(0), m_tag("null") {}
79
80inline DetCondCFloat::DetCondCFloat(int size,const std::string& tag) :
81m_size(size), m_tag(tag) {}
82
84
85inline int DetCondCFloat::size() const {return m_size;}
86
87inline const std::string& DetCondCFloat::tag() const {return m_tag;}
88
89#endif // DETDESCRCOND_DETCONDCFLOAT_H
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
DetCondCFloat is a class to hold sets of Identifiers and arrays of floats for detector element specif...
const std::string & tag() const
std::map< Identifier, int, lessp > BufferMap
std::less< Identifier > lessp
const float * find(const Identifier &ident) const
void print() const
std::vector< float > m_buf
virtual ~DetCondCFloat()
void print2() const
std::string m_tag
float get(const Identifier &ident, int k) const
BufferMap m_bufmap
int add(const Identifier &ident, const float *f)
void share(const Identifier &ident, const int index)
int size() const
int findindex(const Identifier &ident) const
friend class DetCondCFloatCnv_p1
Definition index.py:1