BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
FairMagnet.cxx
Go to the documentation of this file.
1/********************************************************************************
2 * Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3 * *
4 * This software is distributed under the terms of the *
5 * GNU Lesser General Public Licence (LGPL) version 3, *
6 * copied verbatim in the file "LICENSE" *
7 ********************************************************************************/
8/* Generated by Together */
9
10#include "FairMagnet.h"
11
12#include "FairGeoMagnet.h" // for FairGeoMagnet
13#include "FairGeoPassivePar.h" // for FairGeoPassivePar
14
15#include <TString.h> // for TString
16#include <iostream> // for operator<<, basic_ostream, etc
17
19
21 : FairModule("FairMagnet", "")
22{}
23
24FairMagnet::FairMagnet(const char* name, const char* Title)
25 : FairModule(name, Title)
26{}
27
29 : FairModule(rhs)
30{}
31
33{
34 TString fileName = GetGeometryFileName();
35 if (fileName.EndsWith(".geo")) {
37 } else if (fileName.EndsWith(".root")) {
38 ConstructRootGeometry();
39 } else {
40 std::cout << "Geometry format not supported " << std::endl;
41 }
42}
43
44Bool_t FairMagnet::IsSensitive(const std::string& /*name*/)
45{
46 // just to get rid of the warrning during run, not need this is a passive element!
47 return kFALSE;
48}
49
51{
52#ifdef FairRoot_18_8_0
53 FairModule::ConstructASCIIGeometry<FairGeoMagnet, FairGeoPassivePar>("FairGeoPassivePar");
54#else
55 FairGeoMagnet* MGeo = new FairGeoMagnet();
56 FairModule::ConstructASCIIGeometry<FairGeoMagnet, FairGeoPassivePar>(MGeo, "FairGeoPassivePar");
57#endif
58}
59
61{
62 return new FairMagnet(*this);
63}
bool Bool_t
constexpr Bool_t kFALSE
void ConstructASCIIGeometry()
virtual ~FairMagnet()
void ConstructGeometry()
FairMagnet(const char *name, const char *Title="PND Magnet")
Bool_t IsSensitive(const std::string &name)
virtual FairModule * CloneModule() const
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const