ATLAS Offline Software
Loading...
Searching...
No Matches
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
20
21#include <string>
22#include <map>
23#include "CLHEP/Geometry/Transform3D.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
50private:
52};
53
54CLASS_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
64inline void DetCondKeyTrans::setTransform(const std::string& key,
65 const HepGeom::Transform3D&trans) { m_keytrans[key]=trans;}
66
67#endif // DETDESCRCOND_KEYTRANS_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
Class to hold set of HepGeom::Transform3D keyed by string value for storage in the conditions DB typi...
void setTransform(const std::string &key, const HepGeom::Transform3D &trans)
bool exists(const std::string &key) const
const KeyTrans & keyTrans() const
virtual ~DetCondKeyTrans()
bool getTransform(const std::string &key, HepGeom::Transform3D &result) const
std::map< std::string, HepGeom::Transform3D > KeyTrans