ATLAS Offline Software
DetCondFloat.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_DETCONDFLOAT_H
6 #define DETDESCRCOND_DETCONDFLOAT_H
7 
34 #include <vector>
35 #include <map>
36 #include <algorithm>
37 #include "Identifier/Identifier.h"
38 
39 
40 class DetCondFloat {
41  public:
42  DetCondFloat();
43  DetCondFloat(const int size,const std::string& tag);
44  virtual ~DetCondFloat();
45 
46  int size() const;
47  const std::string& tag() const;
48 
49  int add(const Identifier& ident, const float* f);
50  void share(const Identifier& ident, const int index);
51  const float* find(const Identifier& ident) const;
52  int findindex(const Identifier& ident) const;
53  virtual void print() const;
54  virtual void print2() const;
55 
56  protected:
57  int m_size;
58  std::string m_tag;
59  typedef std::less<Identifier> lessp;
60  typedef std::map<Identifier,int,lessp> BufferMap;
62  std::vector<float> m_buf;
63 };
64 
65 
66 // inline functions for DetCondFloat
67 
68 inline DetCondFloat::DetCondFloat() : m_size(0), m_tag("null") {}
69 
70 inline DetCondFloat::DetCondFloat(int size,const std::string& tag) :
71 m_size(size), m_tag(tag) {}
72 
74 
75 inline int DetCondFloat::size() const {return m_size;}
76 
77 inline const std::string& DetCondFloat::tag() const {return m_tag;}
78 
79 #endif // DETDESCRCOND_DETCONDFLOAT_H
DetCondFloat::add
int add(const Identifier &ident, const float *f)
Definition: DetCondFloat.cxx:13
DetCondFloat::print2
virtual void print2() const
Definition: DetCondFloat.cxx:57
index
Definition: index.py:1
DetCondFloat::m_size
int m_size
Definition: DetCondFloat.h:57
DetCondFloat::~DetCondFloat
virtual ~DetCondFloat()
Definition: DetCondFloat.h:73
DetCondFloat::findindex
int findindex(const Identifier &ident) const
Definition: DetCondFloat.cxx:40
DetCondFloat::m_bufmap
BufferMap m_bufmap
Definition: DetCondFloat.h:61
DetCondFloat::m_tag
std::string m_tag
Definition: DetCondFloat.h:58
DetCondFloat::size
int size() const
Definition: DetCondFloat.h:75
DetCondFloat
Definition: DetCondFloat.h:40
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
DetCondFloat::share
void share(const Identifier &ident, const int index)
Definition: DetCondFloat.cxx:24
DetCondFloat::print
virtual void print() const
Definition: DetCondFloat.cxx:51
hist_file_dump.f
f
Definition: hist_file_dump.py:135
DetCondFloat::BufferMap
std::map< Identifier, int, lessp > BufferMap
Definition: DetCondFloat.h:60
DetCondFloat::DetCondFloat
DetCondFloat()
Definition: DetCondFloat.h:68
DetCondFloat::lessp
std::less< Identifier > lessp
Definition: DetCondFloat.h:59
TRT::Hit::ident
@ ident
Definition: HitInfo.h:77
DetCondFloat::find
const float * find(const Identifier &ident) const
Definition: DetCondFloat.cxx:29
DetCondFloat::m_buf
std::vector< float > m_buf
Definition: DetCondFloat.h:62
DetCondFloat::tag
const std::string & tag() const
Definition: DetCondFloat.h:77
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
Identifier
Definition: IdentifierFieldParser.cxx:14