Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
InternalAlignmentDecorator.hpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file InternalAlignmentDecorator.hpp
1 // This file is part of the Acts project.
2 //
3 // Copyright (C) 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 
19 
20 #include <cstddef>
21 #include <memory>
22 #include <mutex>
23 #include <string>
24 #include <unordered_map>
25 #include <vector>
26 
27 namespace ActsExamples {
28 struct AlgorithmContext;
29 
30 namespace Contextual {
31 class InternallyAlignedDetectorElement;
32 
39  public:
40  using LayerStore =
41  std::vector<std::shared_ptr<InternallyAlignedDetectorElement>>;
42  using DetectorStore = std::vector<LayerStore>;
43 
48  };
49 
55  std::unique_ptr<const Acts::Logger> logger =
56  Acts::getDefaultLogger("AlignmentDecorator",
58 
60  ~InternalAlignmentDecorator() override = default;
61 
69  ProcessCode decorate(AlgorithmContext& context) override;
70 
72  const std::string& name() const override { return m_name; }
73 
74  private:
76  std::unique_ptr<const Acts::Logger> m_logger;
77  std::string m_name = "AlignmentDecorator";
78 
80  std::mutex m_alignmentMutex;
81  struct IovStatus {
82  size_t lastAccessed;
83  };
84  std::unordered_map<unsigned int, IovStatus> m_activeIovs;
85  size_t m_eventsSeen{0};
86 
88  const Acts::Logger& logger() const { return *m_logger; }
89 };
90 } // namespace Contextual
91 } // namespace ActsExamples