G4tgbRotationMatrixMgr.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 // $Id: G4tgbRotationMatrixMgr.hh 69803 2013-05-15 15:24:50Z gcosmo $
00028 //
00029 //
00030 // class G4tgbRotationMatrixMgr
00031 //
00032 // Class description:
00033 //
00034 // Singleton class to manage the building of transient rotation matrix,
00035 // as well as the construction of the corresponding G4RotationMatrix's.
00036 
00037 // History:
00038 // - Created.                                 P.Arce, CIEMAT (November 2007)
00039 // -------------------------------------------------------------------------
00040 
00041 #ifndef G4tgbRotationMatrixMgr_h
00042 #define G4tgbRotationMatrixMgr_h
00043 
00044 #include "globals.hh"
00045 
00046 #include <iostream>
00047 #include <map>
00048 
00049 #include "G4tgbRotationMatrix.hh"
00050 
00051 typedef std::map< G4String, G4tgbRotationMatrix*,
00052                   std::less<G4String> > G4mstgbrotm;
00053 typedef std::map< G4String, G4RotationMatrix*,
00054                   std::less<G4String> > G4msg4rotm;
00055 
00056 class G4tgbRotationMatrixMgr 
00057 {
00058   public:  // with description
00059 
00060     ~G4tgbRotationMatrixMgr();
00061   
00062     static G4tgbRotationMatrixMgr* GetInstance();
00063       // Get only instance (if it does not exists, create it)
00064 
00065     G4RotationMatrix* FindOrBuildG4RotMatrix(const G4String& name);
00066       // Look for a G4RotationMatrix and if not found create it
00067        // from the corresponding G4tgbRotationMatrix
00068     G4RotationMatrix* FindG4RotMatrix(const G4String& name);
00069       // Look for a G4RotationMatrix and if not found return 0
00070 
00071     G4tgbRotationMatrix* FindOrBuildTgbRotMatrix(const G4String& name);
00072       // Look for an G4tgbRotationMatrix and if not found exit
00073     G4tgbRotationMatrix* FindTgbRotMatrix(const G4String& name);
00074       // Look for an G4tgbRotationMatrix and if not found return 0
00075 
00076   public:  // without description
00077 
00078     const G4mstgbrotm GetTgbRotMatList() const { return theTgbRotMats; }
00079     const G4msg4rotm& GetG4RotMatList() const { return theG4RotMats; }
00080 
00081   private:
00082 
00083     G4tgbRotationMatrixMgr();
00084     void CopyRotMats();
00085 
00086     static G4tgbRotationMatrixMgr* theInstance;
00087    
00088   private:
00089 
00090     G4mstgbrotm theTgbRotMats;
00091     G4msg4rotm theG4RotMats; 
00092 };
00093 
00094 std::ostream& operator<<(std::ostream&, const G4RotationMatrix &);
00095 
00096 #endif

Generated on Mon May 27 17:49:58 2013 for Geant4 by  doxygen 1.4.7