CbmRoot
Loading...
Searching...
No Matches
CbmGeoSetupProvider.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Evgeny Lavrik, Florian Uhlig [committer] */
4
10#ifndef CBMGEOSETUPPROVIDER_H
11#define CBMGEOSETUPPROVIDER_H 1
12
13#include "CbmDefs.h"
14#include "CbmGeoSetup.h"
15#include "CbmGeoSetupModule.h"
16
17#include "TObject.h"
18
19#include <vector>
20
33public:
35 virtual ~CbmGeoSetupProvider() = default;
36
46 void SetModuleTag(ECbmModuleId moduleId, std::string tag, Bool_t active);
47
49 void RemoveModule(ECbmModuleId moduleId);
50
54 void SetFieldTag(std::string tag);
55
59 void RegisterSetup();
60
63 void Reset();
64
68 CbmGeoSetup& GetSetup() { return fSetup; };
69
71 virtual std::vector<std::string> GetSetupTags() = 0;
73 virtual std::vector<std::string> GetMediaTags() = 0;
75 virtual std::vector<std::string> GetFieldTags() = 0;
76
78 virtual CbmGeoSetup GetSetupByTag(std::string setupTag, std::string revision) = 0;
80 virtual CbmGeoSetupModule GetModuleByTag(ECbmModuleId moduleId, std::string tag) = 0;
82 virtual CbmGeoSetupField GetFieldByTag(std::string tag) = 0;
84 virtual CbmGeoSetupMedia GetMediaByTag(std::string tag) = 0;
85
88 virtual void LoadSetup(std::string setupTag, std::string revision = "") = 0;
89
90protected:
93
95
96private:
98};
99
100#endif /* CBMGEOSETUPPROVIDER_H */
ECbmModuleId
Definition CbmDefs.h:39
Abstract interface class for providing the CBM detector setup description, module list,...
CbmGeoSetup & GetSetup()
Direct access to underlying geometry setup representation. Allows for fine-tuning of parameters,...
virtual std::vector< std::string > GetSetupTags()=0
Abstract method to get the list of setup tags.
virtual std::vector< std::string > GetMediaTags()=0
Abstract method to get the list of media tags.
virtual CbmGeoSetupModule GetModuleByTag(ECbmModuleId moduleId, std::string tag)=0
Abstract method for constructing the module by id and tag.
CbmGeoSetupModule GetDefaultCaveModule()
Gets defauk cave if none was provided by the other means.
ClassDef(CbmGeoSetupProvider, 1)
underlying geometry setup representation.
void Reset()
Resets the setup to default (empty)
void SetModuleTag(ECbmModuleId moduleId, std::string tag, Bool_t active)
Loads the detector with a tag into setup, will invoke GetModuleByTag.
void SetFieldTag(std::string tag)
Loads the field with a tag and adds it to the setup.
virtual CbmGeoSetupMedia GetMediaByTag(std::string tag)=0
Abstract method for constructing the media by tag.
void RemoveModule(ECbmModuleId moduleId)
Removes the module from setup.
void RegisterSetup()
Registers the previously loaded setup with FairRoot. Replaces the registerSetup.C macro.
virtual void LoadSetup(std::string setupTag, std::string revision="")=0
Abstract method to load the setup with a tag and revision version.
virtual ~CbmGeoSetupProvider()=default
Default destructor is necessary.
virtual std::vector< std::string > GetFieldTags()=0
Abstract method to get the list of field tags.
virtual CbmGeoSetupField GetFieldByTag(std::string tag)=0
Abstract method for constructing the field by tag.
virtual CbmGeoSetup GetSetupByTag(std::string setupTag, std::string revision)=0
Abstract method for constructing the setup by id and tag.
Data transfer object to represent the CBM Detector setup.
Definition CbmGeoSetup.h:34