CbmRoot
Loading...
Searching...
No Matches
CbmRecoSetupManager.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#ifndef CbmRecoSetupManager_h
11#define CbmRecoSetupManager_h 1
12
13#include "CbmGeoNodeMap.h"
15
16#include <FairTask.h>
17
18#include <string>
19
20namespace cbm
21{
24 class RecoSetupManager : public FairTask {
25 public:
27 static RecoSetupManager* Instance();
28
29 // Disable copy and move
34
37 std::shared_ptr<const GeoNodeMap> GetGeoNodeMap() const { return fGeoNodeMap; }
38
40 const algo::RecoSetup& GetSetup() const { return fSetup; }
41
44
46 InitStatus Init() override;
47
50 bool IsInitialized() const;
51
53 bool Has(ECbmModuleId moduleId) const { return fSetup.Has(moduleId); }
54
56 bool HasGeoNodeMaps() const;
57
60 void LoadSetup(const std::string& filename);
61
65 void StoreSetup(const std::string& filename) { fSetupOutFilename = filename; }
66
67
68 private:
70 std::string fSetupOutFilename{};
71 std::shared_ptr<const GeoNodeMap> fGeoNodeMap;
72 bool fbInitialized{false};
73 bool fbBuildGeoNodeMaps{false};
74
77
79 ~RecoSetupManager() = default;
80
82 InitStatus ReInit() override { return Init(); }
83
85 void SetParContainers() override;
86
88 };
89} // namespace cbm
90
91#endif // CbmRecoSetupManager_h
ECbmModuleId
Enumerator for module Identifiers.
Definition CbmDefs.h:45
A common map for hardware address -> node path in TGeoManager (source)
A collection of reconstruction setup unit interfaces for different CBM subsystems.
InitStatus ReInit() override
Re-initialization method.
const algo::RecoSetup & GetSetup() const
Setup accessor.
std::shared_ptr< const GeoNodeMap > fGeoNodeMap
A mapper for node address -> path in TGeoManager.
RecoSetupManager(const RecoSetupManager &)=delete
void BuildGeoNodeMaps()
Requests geo-node map building.
RecoSetupManager & operator=(const RecoSetupManager &)=delete
ClassDefOverride(RecoSetupManager, 0)
static RecoSetupManager * Instance()
Instance access.
bool fbInitialized
Flag, if the instance was initialized.
bool IsInitialized() const
Returns initialization status.
~RecoSetupManager()=default
Destructor.
RecoSetupManager(RecoSetupManager &&)=delete
algo::RecoSetup fSetup
Instance of reconstruction setup.
void LoadSetup(const std::string &filename)
Loads setup from a binary file.
void SetParContainers() override
Sets parameter containers for different subsystems.
bool fbBuildGeoNodeMaps
Flag, if to create the geo node map.
std::shared_ptr< const GeoNodeMap > GetGeoNodeMap() const
Access to geo node map.
RecoSetupManager & operator=(RecoSetupManager &&)=delete
bool HasGeoNodeMaps() const
Checks, if the geo node maps were built.
std::string fSetupOutFilename
Output name for the setup (if not empty, the setup is stored)
void StoreSetup(const std::string &filename)
Stores setup to a binary file.
InitStatus Init() override
Initialization method.
bool Has(ECbmModuleId moduleId) const
Checks, if a detector is in setup.
An instance of reconstruction setup unit interfaces for online/offline data reconstruction.
Definition RecoSetup.h:62