G4VEMDataSet.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$
00028 //
00029 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
00030 //
00031 // History:
00032 // -----------
00033 // 31 Jul 2001   MGP                 Created
00034 //
00035 // 15 Jul 2009   N.A.Karakatsanis    New methods added for loading logarithmic data
00036 //                                   to enhance computing performance of interpolation
00037 //
00038 // 24 Dec 2010   V.Ivanchenko moved constructor and destructor to the source
00039 //
00040 // -------------------------------------------------------------------
00041 
00042 // Class description:
00043 // Low Energy Electromagnetic Physics
00044 // Data set for an electromagnetic physics process
00045 // A strategy pattern is used to encapsulate algorithms for data interpolation
00046 // Further documentation available from http://www.ge.infn.it/geant4/lowE
00047 
00048 // -------------------------------------------------------------------
00049 
00050 #ifndef  G4VEMDATASET_HH
00051 #define  G4VEMDATASET_HH 1
00052 
00053 #include "globals.hh"
00054 #include "G4DataVector.hh"
00055 
00056 class G4VEMDataSet 
00057 { 
00058 public:
00059 
00060   G4VEMDataSet();
00061   virtual ~G4VEMDataSet();
00062   
00063   virtual G4double FindValue(G4double x, G4int componentId = 0) const = 0;
00064  
00065   virtual void PrintData(void) const = 0;
00066   
00067   virtual const G4VEMDataSet* GetComponent(G4int componentId) const = 0;
00068   virtual void AddComponent(G4VEMDataSet* dataSet) = 0;
00069   virtual size_t NumberOfComponents(void) const = 0;
00070  
00071   virtual const G4DataVector& GetEnergies(G4int componentId) const = 0;
00072   virtual const G4DataVector& GetData(G4int componentId) const = 0;
00073   virtual const G4DataVector& GetLogEnergies(G4int componentId) const = 0;
00074   virtual const G4DataVector& GetLogData(G4int componentId) const = 0;
00075 
00076   virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int component=0) = 0;
00077   virtual void SetLogEnergiesData(G4DataVector* x,
00078                                   G4DataVector* data,
00079                                   G4DataVector* Log_x, 
00080                                   G4DataVector* Log_data,
00081                                   G4int component=0) = 0;
00082  
00083   virtual G4bool LoadData(const G4String& fileName) = 0;
00084   virtual G4bool LoadNonLogData(const G4String& fileName) = 0;
00085 
00086   virtual G4bool SaveData(const G4String& fileName) const = 0;
00087 
00088   virtual G4double RandomSelect(G4int componentId = 0) const = 0;
00089    
00090 private:
00091   // Hide copy constructor and assignment operator 
00092   G4VEMDataSet(const G4VEMDataSet& copy);
00093   G4VEMDataSet& operator=(const G4VEMDataSet& right);
00094 };
00095 #endif /* G4VEMDATASET_HH */

Generated on Mon May 27 17:50:11 2013 for Geant4 by  doxygen 1.4.7