Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JsonMaterialDecorator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file JsonMaterialDecorator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 2017-2019 CERN for the benefit of the Acts project
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 
9 #pragma once
10 
17 
18 #include <fstream>
19 #include <map>
20 #include <mutex>
21 
22 // Convenience shorthand
23 
24 namespace Acts {
25 
31  public:
32  using SurfaceMaterialMap =
33  std::map<GeometryIdentifier, std::shared_ptr<const ISurfaceMaterial>>;
34 
35  using VolumeMaterialMap =
36  std::map<GeometryIdentifier, std::shared_ptr<const IVolumeMaterial>>;
37 
39  const std::string& jFileName,
41  bool clearSurfaceMaterial = true,
42  bool clearVolumeMaterial = true);
43 
47  void decorate(Surface& surface) const final;
48 
52  void decorate(TrackingVolume& volume) const final;
53 
54  private:
58 
61 
62  std::unique_ptr<const Logger> m_logger;
63 
64  const Logger& logger() const { return *m_logger; }
65 };
66 } // namespace Acts