ATLAS Offline Software
DetCondKeyTrans.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DETDESCRCONDITIONS_DETCONDKEYTRANS_H
6 #define DETDESCRCONDITIONS_DETCONDKEYTRANS_H
7 
21 #include <string>
22 #include <map>
23 #include "CLHEP/Geometry/Transform3D.h"
24 #include "AthenaKernel/CLASS_DEF.h"
25 #include "AthenaKernel/CondCont.h"
26 
28  public:
30  virtual ~DetCondKeyTrans();
31 
32  // set a transform corresponding to a particular key value
33  // if a transform with this key is already present, it is overwritten
34  void setTransform(const std::string& key, const HepGeom::Transform3D& trans);
35 
36  // get the transform corresponding to this key into result
37  // returns false if the transform cannot be found
38  bool getTransform(const std::string& key, HepGeom::Transform3D& result) const;
39 
40  // check if transform corresponding to this key exists
41  bool exists(const std::string& key) const;
42 
43  // print the set of key/transform pairs to stdout
44  void print() const;
45 
46  typedef std::map<std::string,HepGeom::Transform3D> KeyTrans;
47  const KeyTrans& keyTrans() const;
48 
49 
50 private:
52 };
53 
54 CLASS_DEF(DetCondKeyTrans,254546453,1)
56 
57 // iterator declaration for SEAL dictionary
58 // removed - perhaps will not be needed for reflex, causes problem for gcc344
59 // template std::map<std::string,HepGeom::Transform3D>::iterator;
60 
61 // virtual destructor to satify requirement for persistent classes to have vtbl
63 
64 inline void DetCondKeyTrans::setTransform(const std::string& key,
65  const HepGeom::Transform3D&trans) { m_keytrans[key]=trans;}
66 
67 #endif // DETDESCRCOND_KEYTRANS_H
DetCondKeyTrans::exists
bool exists(const std::string &key) const
Definition: DetCondKeyTrans.cxx:25
DetCondKeyTrans::keyTrans
const KeyTrans & keyTrans() const
Definition: DetCondKeyTrans.cxx:45
get_generator_info.result
result
Definition: get_generator_info.py:21
DetCondKeyTrans::m_keytrans
KeyTrans m_keytrans
Definition: DetCondKeyTrans.h:51
CondCont.h
Hold mappings of ranges to condition objects.
DetCondKeyTrans
Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typi...
Definition: DetCondKeyTrans.h:27
DetCondKeyTrans::print
void print() const
Definition: DetCondKeyTrans.cxx:30
CONDCONT_DEF
CONDCONT_DEF(DetCondKeyTrans, 116888117)
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
DetCondKeyTrans::KeyTrans
std::map< std::string, HepGeom::Transform3D > KeyTrans
Definition: DetCondKeyTrans.h:46
DetCondKeyTrans::getTransform
bool getTransform(const std::string &key, HepGeom::Transform3D &result) const
Definition: DetCondKeyTrans.cxx:14
DetCondKeyTrans::~DetCondKeyTrans
virtual ~DetCondKeyTrans()
Definition: DetCondKeyTrans.h:62
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
DetCondKeyTrans::setTransform
void setTransform(const std::string &key, const HepGeom::Transform3D &trans)
Definition: DetCondKeyTrans.h:64
CLASS_DEF.h
macros to associate a CLID to a type
DetCondKeyTrans::DetCondKeyTrans
DetCondKeyTrans()
Definition: DetCondKeyTrans.cxx:11
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37