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.

References G4tgrUtils::DumpVS(), FatalException, FindRotMatrix(), G4cout, G4endl, G4Exception(), G4tgrRotationMatrix::GetName(), G4tgrUtils::GetString(), and G4tgrMessenger::GetVerboseLevel().

Referenced by G4tgrLineProcessor::ProcessLine().

00077 {
00078   //---------- Check for miminum number of words read 
00079   if( wl.size() != 5 && wl.size() != 8 && wl.size() != 11 )
00080   {
00081     G4tgrUtils::DumpVS(wl, "G4tgrRotationMatrixFactory::AddRotMatrix()");
00082     G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()", "InvalidMatrix",
00083                 FatalException, "Line should have 5, 8 or 11 words !");
00084   }
00085 
00086 #ifdef G4VERBOSE
00087   if( G4tgrMessenger::GetVerboseLevel() >= 2 )
00088   {
00089     G4cout << " G4tgrRotationMatrixFactory::AddRotMatrix() - Adding: "
00090            << wl[1] << G4endl;
00091   }
00092 #endif
00093   //---------- Look if rotation matrix exists
00094   if( FindRotMatrix( G4tgrUtils::GetString(wl[1]) ) != 0 )
00095   {
00096     G4String ErrMessage = "Rotation matrix repeated... " + wl[1];
00097     G4Exception("G4tgrRotationMatrixFactory::AddRotMatrix()",
00098                 "InvalidInput", FatalException, ErrMessage);
00099   } 
00100  
00101   G4tgrRotationMatrix* rotm = new G4tgrRotationMatrix( wl );
00102   theTgrRotMats[ rotm->GetName() ] =  rotm;
00103   theTgrRotMatList.push_back( rotm );
00104  
00105   return rotm;
00106 }

void G4tgrRotationMatrixFactory::DumpRotmList (  ) 

Definition at line 126 of file G4tgrRotationMatrixFactory.cc.

References G4cout, and G4endl.

Referenced by G4tgrVolumeMgr::DumpSummary().

00127 {
00128   G4cout << " @@@@@@@@@@@@@@@@ DUMPING G4tgrRotationMatrix's List " << G4endl;
00129   G4mstgrrotm::const_iterator cite;
00130   for(cite = theTgrRotMats.begin(); cite != theTgrRotMats.end(); cite++)
00131   {
00132     G4cout << " ROTM: " << (*cite).second->GetName() << G4endl;
00133   }
00134 }

G4tgrRotationMatrix * G4tgrRotationMatrixFactory::FindRotMatrix ( const G4String rotm  ) 

Definition at line 111 of file G4tgrRotationMatrixFactory.cc.

Referenced by AddRotMatrix().

00112 {
00113   G4tgrRotationMatrix* rotm = 0;
00114 
00115   G4mstgrrotm::const_iterator cite = theTgrRotMats.find( name );
00116   if( cite != theTgrRotMats.end() )
00117   { 
00118     rotm = (*cite).second;
00119   } 
00120 
00121   return rotm;
00122 }

G4tgrRotationMatrixFactory * G4tgrRotationMatrixFactory::GetInstance (  )  [static]

Definition at line 45 of file G4tgrRotationMatrixFactory.cc.

Referenced by G4tgrVolumeMgr::DumpSummary(), and G4tgrLineProcessor::ProcessLine().

00046 {
00047   if( !theInstance )
00048   {
00049     theInstance = new G4tgrRotationMatrixFactory;
00050   }
00051   return theInstance;
00052 }

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

Definition at line 66 of file G4tgrRotationMatrixFactory.hh.

Referenced by G4tgrVolumeMgr::DumpSummary().

00067       { return theTgrRotMatList; }

const G4mstgrrotm& G4tgrRotationMatrixFactory::GetRotMatMap (  )  const [inline]

Definition at line 64 of file G4tgrRotationMatrixFactory.hh.

00065       { return theTgrRotMats; }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:31 2013 for Geant4 by  doxygen 1.4.7