G4IDataSet.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 as G4VDataSet
00034 // 31 Jul 2008   MGP        Revised and renamed to G4IDataSet
00035 //
00036 // -------------------------------------------------------------------
00037 
00038 // Class description:
00039 // Data set abstract interface
00040 // Applies a Composite design pattern for data library management
00041 
00042 // -------------------------------------------------------------------
00043 
00044 #ifndef  G4IDATASET_HH
00045 #define  G4IDATASET_HH 1
00046 
00047 #include "globals.hh"
00048 #include "G4DataVector.hh"
00049 
00050 class G4IDataSet 
00051 { 
00052 public:
00053   G4IDataSet() { }
00054   virtual ~G4IDataSet() { }
00055   
00056   virtual G4double FindValue(G4double x, G4int componentId = 0) const = 0;
00057  
00058   virtual void PrintData(void) const = 0;
00059   
00060   virtual const G4IDataSet* GetComponent(G4int componentId) const = 0;
00061   virtual void AddComponent(G4IDataSet* dataSet) = 0;
00062   virtual size_t NumberOfComponents(void) const = 0;
00063  
00064   virtual const G4DataVector& GetEnergies(G4int componentId) const = 0;
00065   virtual const G4DataVector& GetData(G4int componentId) const = 0;
00066   virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int component=0) = 0;
00067  
00068   virtual G4bool LoadData(const G4String& fileName) = 0;
00069   virtual G4bool SaveData(const G4String& fileName) const = 0;
00070 
00071   virtual G4double RandomSelect(G4int componentId = 0) const = 0;
00072    
00073 private:
00074   // Hide copy constructor and assignment operator 
00075   G4IDataSet(const G4IDataSet& copy);
00076   G4IDataSet& operator=(const G4IDataSet& right);
00077 };
00078 #endif /* G4IDATASET_HH */

Generated on Mon May 27 17:48:33 2013 for Geant4 by  doxygen 1.4.7