forked from FairRootGroup/FairRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFairMagnet.cxx
More file actions
52 lines (42 loc) · 1.61 KB
/
Copy pathFairMagnet.cxx
File metadata and controls
52 lines (42 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/********************************************************************************
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/* Generated by Together */
#include "FairMagnet.h"
#include "FairGeoMagnet.h" // for FairGeoMagnet
#include "FairGeoPassivePar.h" // for FairGeoPassivePar
#include <TString.h> // for TString
#include <iostream> // for operator<<, basic_ostream, etc
FairMagnet::~FairMagnet() {}
FairMagnet::FairMagnet()
: FairModule("FairMagnet", "")
{}
FairMagnet::FairMagnet(const char* name, const char* Title)
: FairModule(name, Title)
{}
FairMagnet::FairMagnet(const FairMagnet& rhs)
: FairModule(rhs)
{}
void FairMagnet::ConstructGeometry()
{
TString fileName = GetGeometryFileName();
if (fileName.EndsWith(".geo")) {
ConstructASCIIGeometry();
} else if (fileName.EndsWith(".root")) {
ConstructRootGeometry();
} else {
std::cout << "Geometry format not supported " << std::endl;
}
}
void FairMagnet::ConstructASCIIGeometry()
{
FairModule::ConstructASCIIGeometry<FairGeoMagnet, FairGeoPassivePar>("FairGeoPassivePar");
}
FairModule* FairMagnet::CloneModule() const
{
return new FairMagnet(*this);
}