Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4tgrRotationMatrixFactory Class Reference

#include <G4tgrRotationMatrixFactory.hh>

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 ()
 

Detailed Description

Definition at line 51 of file G4tgrRotationMatrixFactory.hh.

Member Function Documentation

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()
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:

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:

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 }
const XML_Char * name
Definition: expat.h:151

Here is the caller graph for this function:

G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::GetInstance ( )
static

Definition at line 45 of file G4tgrRotationMatrixFactory.cc.

46 {
47  if( !theInstance )
48  {
49  theInstance = new G4tgrRotationMatrixFactory;
50  }
51  return theInstance;
52 }

Here is the caller graph for this function:

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

Definition at line 66 of file G4tgrRotationMatrixFactory.hh.

67  { return theTgrRotMatList; }

Here is the caller graph for this function:

const G4mstgrrotm& G4tgrRotationMatrixFactory::GetRotMatMap ( ) const
inline

Definition at line 64 of file G4tgrRotationMatrixFactory.hh.

65  { return theTgrRotMats; }

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