ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DetectorDescription
GeoModel
GeoModelInterfaces
GeoModelInterfaces
StoredMaterialManager.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef GEOMODELINTERFACES_STOREDMATERIALMANAGER_H
6
#define GEOMODELINTERFACES_STOREDMATERIALMANAGER_H
7
16
17
18
#include "GeoModelKernel/GeoIntrusivePtr.h"
19
#include "GeoModelKernel/GeoMaterial.h"
20
#include "GeoModelKernel/GeoElement.h"
21
#include "
AthenaKernel/CLASS_DEF.h
"
22
23
#include <iosfwd>
24
#include <map>
25
#include <string>
26
27
28
29
class
StoredMaterialManager
30
{
31
public
:
32
using
MaterialMap
= std::map<std::string, GeoIntrusivePtr<GeoMaterial>, std::less<>>;
33
using
MaterialMapIterator
= MaterialMap::const_iterator;
34
35
// Constructor:
36
StoredMaterialManager
() =
default
;
37
38
// Destructor:
39
virtual
~StoredMaterialManager
() =
default
;
40
41
// Query the material:
42
virtual
const
GeoMaterial*
getMaterial
(std::string_view name) = 0;
43
44
// Query the elements:
45
virtual
const
GeoElement*
getElement
(
const
std::string& name) = 0;
46
47
// Query the elements (by atomic number):
48
virtual
const
GeoElement*
getElement
(
unsigned
int
atomicNumber) = 0;
49
50
// Add new material
51
virtual
void
addMaterial
(
const
std::string& space, GeoMaterial* material) = 0;
52
53
// Return iterators
54
virtual
MaterialMapIterator
begin
()
const
= 0;
55
virtual
MaterialMapIterator
end
()
const
= 0;
56
57
// Number of materials in the manager
58
virtual
size_t
size
() = 0;
59
60
// Dump the contents
61
virtual
std::ostream&
printAll
(std::ostream & o)
const
= 0;
62
//default stream to std::cout
63
virtual
std::ostream&
printAll
()
const
= 0;
64
};
65
66
CLASS_DEF
(
StoredMaterialManager
, 9896,1)
67
68
#endif
CLASS_DEF.h
macros to associate a CLID to a type
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:67
StoredMaterialManager
This class holds one or more material managers and makes them storeable, under StoreGate.
Definition
StoredMaterialManager.h:30
StoredMaterialManager::begin
virtual MaterialMapIterator begin() const =0
StoredMaterialManager::getElement
virtual const GeoElement * getElement(unsigned int atomicNumber)=0
StoredMaterialManager::StoredMaterialManager
StoredMaterialManager()=default
StoredMaterialManager::printAll
virtual std::ostream & printAll(std::ostream &o) const =0
StoredMaterialManager::end
virtual MaterialMapIterator end() const =0
StoredMaterialManager::~StoredMaterialManager
virtual ~StoredMaterialManager()=default
StoredMaterialManager::MaterialMapIterator
MaterialMap::const_iterator MaterialMapIterator
Definition
StoredMaterialManager.h:33
StoredMaterialManager::size
virtual size_t size()=0
StoredMaterialManager::getMaterial
virtual const GeoMaterial * getMaterial(std::string_view name)=0
StoredMaterialManager::addMaterial
virtual void addMaterial(const std::string &space, GeoMaterial *material)=0
StoredMaterialManager::printAll
virtual std::ostream & printAll() const =0
StoredMaterialManager::MaterialMap
std::map< std::string, GeoIntrusivePtr< GeoMaterial >, std::less<> > MaterialMap
Definition
StoredMaterialManager.h:32
StoredMaterialManager::getElement
virtual const GeoElement * getElement(const std::string &name)=0
Generated on
for ATLAS Offline Software by
1.17.0