|
CbmRoot
|
#include <CbmSetup.h>
Public Member Functions | |
| ~CbmSetup () | |
| virtual void | Clear (Option_t *opt="") |
| void | LoadStoredSetup (CbmSetupStorable *setupIn) |
| void | LoadSetup (const char *setupName) |
| void | RegisterSetup () |
| std::string | GetMediaFilePath () |
| void | SetMediaFilePath (std::string filePath) |
| CbmFieldMap * | CreateFieldMap () |
| Bool_t | GetGeoTag (ECbmModuleId moduleId, TString &tag) |
| Bool_t | GetGeoFileName (ECbmModuleId moduleId, TString &fileName) |
| size_t | GetHash () |
| Int_t | GetNofModules () const |
| Bool_t | IsActive (ECbmModuleId moduleId) |
| Bool_t | IsEmpty () const |
| virtual void | Print (Option_t *="") const |
| Info to screen. | |
| void | RemoveModule (ECbmModuleId moduleId) |
| void | SetActive (ECbmModuleId moduleId, Bool_t active=kTRUE) |
| void | SetField (const char *tag, Double_t scale=1., Double_t xPos=0., Double_t yPos=0., Double_t zPos=0.) |
| void | SetFieldScale (Double_t scale) |
| void | SetModule (ECbmModuleId moduleId, const char *geoTag, Bool_t active=kTRUE) |
| std::string | ToString () const |
| Info to string. | |
| void | SetSetupSource (ECbmSetupSource setupSource) |
| Set the source the setup will be loaded from. | |
| CbmGeoSetupProvider * | GetProvider () |
| Get the geo setup provider. | |
| void | SetProvider (CbmGeoSetupProvider *value) |
| Set the geo setup provider. | |
Static Public Member Functions | |
| static CbmSetup * | Instance () |
Private Member Functions | |
| CbmSetup () | |
| ! Setup provider | |
| CbmSetup (const CbmSetup &) | |
| CbmSetup | operator= (const CbmSetup &) |
| ClassDef (CbmSetup, 3) | |
Private Attributes | |
| CbmGeoSetupProvider * | fProvider {new CbmGeoSetupRepoProvider()} |
Static Private Attributes | |
| static CbmSetup * | fgInstance = NULL |
| Pointer to static instance. | |
Definition at line 43 of file CbmSetup.h.
|
inline |
Destructor
Definition at line 46 of file CbmSetup.h.
|
inlineprivate |
! Setup provider
Default constructor
Definition at line 217 of file CbmSetup.h.
Referenced by CbmSetup(), ClassDef(), Instance(), and operator=().
|
private |
Copy constructor and assignment operator (not implemented )
References CbmSetup().
|
private |
References CbmSetup().
|
virtual |
Clear the setup
All settings are removed.
Definition at line 42 of file CbmSetup.cxx.
References fProvider.
| CbmFieldMap * CbmSetup::CreateFieldMap | ( | ) |
Create the field map using the given settings
Definition at line 66 of file CbmSetup.cxx.
References fProvider, CbmGeoSetupField::GetFilePath(), CbmGeoSetupField::GetMatrix(), CbmGeoSetupField::GetScale(), CbmGeoSetupField::GetTag(), CbmFieldMapData::GetType(), CbmFieldMap::SetPosition(), and CbmFieldMap::SetScale().
| Bool_t CbmSetup::GetGeoFileName | ( | ECbmModuleId | moduleId, |
| TString & | fileName ) |
Get a geometry file name
| [in] | moduleId | Module identifier (type ESystemId or EPassiveId) |
| [out] | fileName | Geometry file name for this module |
Definition at line 112 of file CbmSetup.cxx.
References fProvider.
| Bool_t CbmSetup::GetGeoTag | ( | ECbmModuleId | moduleId, |
| TString & | tag ) |
Get a geometry tag
| [in] | moduleId | Module identifier (type ESystemId or EPassiveId) |
| [out] | tag | Geometry tag for this module |
Definition at line 127 of file CbmSetup.cxx.
References fProvider.
Referenced by CbmOnlineParWrite::AddCa(), CbmDeviceUnpack::InitContainers(), and cbm::much::RecoSetupUnitFactory::RecoSetupUnitFactory().
| size_t CbmSetup::GetHash | ( | ) |
Get a hash of the setup
The hash is formed from a string of pairs "module name -- module tag", separated by semicolon. Only active modules are considered.
Definition at line 142 of file CbmSetup.cxx.
References fProvider.
|
inline |
|
inline |
Get number of modules in the setup @value Number of modules in setup
Definition at line 111 of file CbmSetup.h.
References fProvider.
Referenced by IsEmpty(), and ToString().
|
inline |
Get the geo setup provider.
Definition at line 197 of file CbmSetup.h.
References fProvider.
Referenced by CbmSetupStorable::CbmSetupStorable(), and cbm::kf::TrackingGeoSetupFactory::MaterialCacheFile().
|
static |
Get singleton instance of CbmSetup
Definition at line 160 of file CbmSetup.cxx.
References CbmSetup(), and fgInstance.
Referenced by CbmOnlineParWrite::AddCa(), cbm::kf::TrackingGeoSetupFactory::CheckDetectorPresence(), cbm::ca::InputQaSetup::CheckoutDetectors(), cbm::atconverter::Run::Exec(), cbm::reco::offline::Run::Exec(), cbm::sim::digitization::Run::Exec(), cbm::ca::IdealHitProducer::Init(), cbm::RecoSetupManager::Init(), CbmDeviceBmonMonitor::InitContainers(), CbmDeviceUnpack::InitContainers(), CbmRecoQaTask::InitDefault(), CbmRecoQaTask::InitMcbm22(), CbmRecoQaTask::InitMcbm24(), CbmRecoQaTask::InitMcbm25(), ParameterMQServer::InitTask(), cbm::kf::TrackingGeoSetupFactory::MaterialCacheFile(), cbm::much::RecoSetupUnitFactory::RecoSetupUnitFactory(), cbm::reco::offline::TaskFactory::RegisterMuchReco(), CbmOnlineParWrite::Run(), and cbm::kf::TrackingGeoSetupFactory::TrackingGeoSetupFactory().
| Bool_t CbmSetup::IsActive | ( | ECbmModuleId | moduleId | ) |
Get the activity flag of a detector
| moduleId | Module identifier (type ESystemId or EPassiveId) |
Definition at line 169 of file CbmSetup.cxx.
References fProvider.
Referenced by cbm::kf::TrackingGeoSetupFactory::CheckDetectorPresence(), cbm::ca::IdealHitProducer::Init(), CbmRecoQaTask::InitDefault(), CbmRecoQaTask::InitMcbm22(), CbmRecoQaTask::InitMcbm24(), and CbmRecoQaTask::InitMcbm25().
|
inline |
Check whether the setup is empty (contains no modules) @value kTRUE if the number of modules is null
Definition at line 128 of file CbmSetup.h.
References GetNofModules().
|
inline |
Load setup modules, field and media. Afterward the parameters can be overriden over the provider See CbmGeoSetupProvider::GetSetup() for details Actual functionality is implemented in the CbmGeoSetupProvider
Definition at line 64 of file CbmSetup.h.
References fProvider.
Referenced by CbmTransportConfig::SetGeometry().
| void CbmSetup::LoadStoredSetup | ( | CbmSetupStorable * | setupIn | ) |
Load a stored/exchanged copy of the setup
To avoid clang format one-lining
Definition at line 46 of file CbmSetup.cxx.
References CbmSetupStorable::GetDbProvPtr(), CbmSetupStorable::GetRepoProvPtr(), and SetProvider().
Referenced by CbmDeviceBmonMonitor::InitContainers(), and CbmDeviceUnpack::InitContainers().
References CbmSetup().
|
inlinevirtual |
|
inline |
Register setup modules, field and media with FairRoot Actual functionality is implemented in the CbmGeoSetupProvider
Definition at line 69 of file CbmSetup.h.
References fProvider.
| void CbmSetup::RemoveModule | ( | ECbmModuleId | moduleId | ) |
Remove a module from the current setup
| moduleId | Module identifier (enum SystemId or kMagnet etc.) |
Definition at line 180 of file CbmSetup.cxx.
References fProvider.
Referenced by CbmTransportConfig::SetGeometry().
| void CbmSetup::SetActive | ( | ECbmModuleId | moduleId, |
| Bool_t | active = kTRUE ) |
Activate a module (detector)
| moduleId | Module identifier. SystemId for detectors, or kMagnet, kPipe, kTarget |
| active | Activity tag for module (only in case of detectors) |
Activate or deactivate a detector already present in the setup. The method will have no effect if called for a passive module (target, pipe, magnet). If a detector is flagged active, its ProcessHits method will be called during the transport simulation.
Definition at line 185 of file CbmSetup.cxx.
References fProvider.
| void CbmSetup::SetField | ( | const char * | tag, |
| Double_t | scale = 1., | ||
| Double_t | xPos = 0., | ||
| Double_t | yPos = 0., | ||
| Double_t | zPos = 0. ) |
Set the magnetic field map
The magnetic field map is automatically selected according to the magnet geometry version. The user can, however, override this by choosing a different field map. In this case, consistency between field map and magnet geometry is within the responsibility of the user.
Definition at line 203 of file CbmSetup.cxx.
References fProvider, CbmGeoSetupField::GetMatrix(), and CbmGeoSetupField::SetScale().
Referenced by CbmTransportConfig::SetGeometry().
|
inline |
Set the field scaling factor
| scale | Field scaling factor |
The currently selected field map will be scaled by the specified factor.
Definition at line 172 of file CbmSetup.h.
References fProvider.
Referenced by CbmTransportConfig::SetGeometry().
|
inline |
| void CbmSetup::SetModule | ( | ECbmModuleId | moduleId, |
| const char * | geoTag, | ||
| Bool_t | active = kTRUE ) |
Add a module to the setup
| moduleId | Module identifier. SystemId for detectors, or kMagnet, kPipe, kTarget |
| geoTag | Geometry version for module |
| active | Activity tag for module (only in case of detectors) |
The module / detector will be added to the setup. If a detector is flagged active, its ProcessHits method will be called during the transport simulation.
Definition at line 218 of file CbmSetup.cxx.
References fProvider, and CbmGeoSetupModule::GetTag().
Referenced by CbmTransportConfig::SetGeometry().
|
inline |
Set the geo setup provider.
| value | provider This class takes the ownership of the provider |
Definition at line 204 of file CbmSetup.h.
References fProvider.
Referenced by LoadStoredSetup(), and SetSetupSource().
| void CbmSetup::SetSetupSource | ( | ECbmSetupSource | setupSource | ) |
Set the source the setup will be loaded from.
| setupSource | enum value ECbmSetupSource |
Definition at line 263 of file CbmSetup.cxx.
References kDb, kRepo, and SetProvider().
| string CbmSetup::ToString | ( | ) | const |
Info to string.
Definition at line 235 of file CbmSetup.cxx.
References fProvider, CbmGeoSetupModule::GetActive(), CbmGeoSetup::GetField(), CbmGeoSetupModule::GetFilePath(), CbmGeoSetupField::GetMatrix(), CbmGeoSetup::GetModuleMap(), CbmModuleList::GetModuleNameCaps(), CbmGeoSetup::GetName(), GetNofModules(), CbmGeoSetupField::GetScale(), CbmGeoSetupField::GetTag(), and CbmGeoSetupModule::GetTag().
Referenced by Print().
|
staticprivate |
|
private |
Definition at line 213 of file CbmSetup.h.
Referenced by Clear(), CreateFieldMap(), GetGeoFileName(), GetGeoTag(), GetHash(), GetMediaFilePath(), GetNofModules(), GetProvider(), IsActive(), LoadSetup(), RegisterSetup(), RemoveModule(), SetActive(), SetField(), SetFieldScale(), SetMediaFilePath(), SetModule(), SetProvider(), and ToString().