CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ChordFinderSetter.cc
Go to the documentation of this file.
2 
3 #include "G4FieldManager.hh"
4 
5 namespace sim {
6  thread_local G4ChordFinder *ChordFinderSetter::fChordFinder = nullptr;
7  thread_local G4ChordFinder *ChordFinderSetter::fChordFinderMonopole = nullptr;
8 
11 
12  void ChordFinderSetter::setStepperAndChordFinder(G4FieldManager * fM, int val) {
13  if (fM != 0) {
14  if (val == 0) {
15  if (fChordFinder != 0) fM->SetChordFinder(fChordFinder);
16  } else {
17  fChordFinder = fM->GetChordFinder();
18  if (fChordFinderMonopole != 0) fM->SetChordFinder(fChordFinderMonopole);
19  }
20  }
21  }
22 }
Definition: sim.h:19
static thread_local G4ChordFinder * fChordFinderMonopole
void setStepperAndChordFinder(G4FieldManager *fM, int val)
static thread_local G4ChordFinder * fChordFinder