FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMagnet.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 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 
24 FairMagnet::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")) {
39  } else {
40  std::cout << "Geometry format not supported " << std::endl;
41  }
42 }
43 
44 Bool_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  FairGeoMagnet* MGeo = new FairGeoMagnet();
53 
54  FairModule::ConstructASCIIGeometry<FairGeoMagnet, FairGeoPassivePar>(MGeo, "FairGeoPassivePar");
55 }
56 
57 FairModule* FairMagnet::CloneModule() const { return new FairMagnet(*this); }
58 
void ConstructGeometry()
Definition: FairMagnet.cxx:32
virtual FairModule * CloneModule() const
Definition: FairMagnet.cxx:57
ClassImp(FairEventBuilder)
virtual ~FairMagnet()
Definition: FairMagnet.cxx:18
void ConstructASCIIGeometry()
Definition: FairMagnet.cxx:50
Bool_t IsSensitive(const std::string &name)
Definition: FairMagnet.cxx:44
virtual void ConstructRootGeometry(TGeoMatrix *shiftM=nullptr)
Definition: FairModule.cxx:327
virtual TString GetGeometryFileName()
Definition: FairModule.h:60