Geant4  10.02.p03
G4tgrRotationMatrixFactory Class Reference

#include <G4tgrRotationMatrixFactory.hh>

Collaboration diagram for G4tgrRotationMatrixFactory:

Public Member Functions

G4tgrRotationMatrixAddRotMatrix (const std::vector< G4String > &wl)
 
G4tgrRotationMatrixFindRotMatrix (const G4String &rotm)
 
const G4mstgrrotmGetRotMatMap () const
 
std::vector< G4tgrRotationMatrix * > GetRotMatList () const
 
void DumpRotmList ()
 

Static Public Member Functions

static G4tgrRotationMatrixFactoryGetInstance ()
 

Private Member Functions

 G4tgrRotationMatrixFactory ()
 
 ~G4tgrRotationMatrixFactory ()
 

Private Attributes

std::vector< G4tgrRotationMatrix * > theTgrRotMatList
 
G4mstgrrotm theTgrRotMats
 

Static Private Attributes

static G4ThreadLocal G4tgrRotationMatrixFactorytheInstance = 0
 

Detailed Description

Definition at line 51 of file G4tgrRotationMatrixFactory.hh.

Constructor & Destructor Documentation

◆ G4tgrRotationMatrixFactory()

G4tgrRotationMatrixFactory::G4tgrRotationMatrixFactory ( )
private

Definition at line 56 of file G4tgrRotationMatrixFactory.cc.

57 {
58 }
Here is the caller graph for this function:

◆ ~G4tgrRotationMatrixFactory()

G4tgrRotationMatrixFactory::~G4tgrRotationMatrixFactory ( )
private

Definition at line 62 of file G4tgrRotationMatrixFactory.cc.

63 {
64  G4mstgrrotm::iterator cite;
65  for( cite = theTgrRotMats.begin(); cite != theTgrRotMats.end(); cite++)
66  {
67  delete (*cite).second;
68  }
69  theTgrRotMats.clear();
70  delete theInstance;
71 }
static G4ThreadLocal G4tgrRotationMatrixFactory * theInstance
Here is the caller graph for this function:

Member Function Documentation

◆ AddRotMatrix()

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::AddRotMatrix ( const std::vector< G4String > &  wl)

Definition at line 76 of file G4tgrRotationMatrixFactory.cc.

77 {
78  //---------- Check for miminum number of words read
79  if( wl.size() != 5 && wl.size() != 8 && wl.size() != 11 )
80  {
81  G4tgrUtils::DumpVS(wl, "G4tgrRotationMatrixFactory::AddRotMatrix()");
82  G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()", "InvalidMatrix",
83  FatalException, "Line should have 5, 8 or 11 words !");
84  }
85 
86 #ifdef G4VERBOSE
88  {
89  G4cout << " G4tgrRotationMatrixFactory::AddRotMatrix() - Adding: "
90  << wl[1] << G4endl;
91  }
92 #endif
93  //---------- Look if rotation matrix exists
94  if( FindRotMatrix( G4tgrUtils::GetString(wl[1]) ) != 0 )
95  {
96  G4String ErrMessage = "Rotation matrix repeated... " + wl[1];
97  G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()",
98  "InvalidInput", FatalException, ErrMessage);
99  }
100 
101  G4tgrRotationMatrix* rotm = new G4tgrRotationMatrix( wl );
102  theTgrRotMats[ rotm->GetName() ] = rotm;
103  theTgrRotMatList.push_back( rotm );
104 
105  return rotm;
106 }
G4tgrRotationMatrix * FindRotMatrix(const G4String &rotm)
G4GLOB_DLL std::ostream G4cout
static G4int GetVerboseLevel()
std::vector< G4tgrRotationMatrix * > theTgrRotMatList
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static void DumpVS(const std::vector< G4String > &wl, const char *msg)
Definition: G4tgrUtils.cc:158
const G4String & GetName()
static G4String GetString(const G4String &str)
Definition: G4tgrUtils.cc:180
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DumpRotmList()

void G4tgrRotationMatrixFactory::DumpRotmList ( )

Definition at line 126 of file G4tgrRotationMatrixFactory.cc.

127 {
128  G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrRotationMatrix's List " << G4endl;
129  G4mstgrrotm::const_iterator cite;
130  for(cite = theTgrRotMats.begin(); cite != theTgrRotMats.end(); cite++)
131  {
132  G4cout << " ROTM: " << (*cite).second->GetName() << G4endl;
133  }
134 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ FindRotMatrix()

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::FindRotMatrix ( const G4String rotm)

Definition at line 111 of file G4tgrRotationMatrixFactory.cc.

112 {
113  G4tgrRotationMatrix* rotm = 0;
114 
115  G4mstgrrotm::const_iterator cite = theTgrRotMats.find( name );
116  if( cite != theTgrRotMats.end() )
117  {
118  rotm = (*cite).second;
119  }
120 
121  return rotm;
122 }
G4String name
Definition: TRTMaterials.hh:40
Here is the caller graph for this function:

◆ GetInstance()

G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::GetInstance ( void  )
static

Definition at line 45 of file G4tgrRotationMatrixFactory.cc.

46 {
47  if( !theInstance )
48  {
50  }
51  return theInstance;
52 }
static G4ThreadLocal G4tgrRotationMatrixFactory * theInstance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRotMatList()

std::vector<G4tgrRotationMatrix*> G4tgrRotationMatrixFactory::GetRotMatList ( ) const
inline

Definition at line 66 of file G4tgrRotationMatrixFactory.hh.

67  { return theTgrRotMatList; }
std::vector< G4tgrRotationMatrix * > theTgrRotMatList
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRotMatMap()

const G4mstgrrotm& G4tgrRotationMatrixFactory::GetRotMatMap ( ) const
inline

Definition at line 64 of file G4tgrRotationMatrixFactory.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ theInstance

G4ThreadLocal G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::theInstance = 0
staticprivate

Definition at line 79 of file G4tgrRotationMatrixFactory.hh.

◆ theTgrRotMatList

std::vector<G4tgrRotationMatrix*> G4tgrRotationMatrixFactory::theTgrRotMatList
private

Definition at line 81 of file G4tgrRotationMatrixFactory.hh.

◆ theTgrRotMats

G4mstgrrotm G4tgrRotationMatrixFactory::theTgrRotMats
private

Definition at line 82 of file G4tgrRotationMatrixFactory.hh.


The documentation for this class was generated from the following files: