Index: trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh
===================================================================
--- trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh	(revision 819)
+++ trunk/source/processes/electromagnetic/lowenergy/include/G4CompositeEMDataSet.hh	(revision 961)
@@ -25,6 +25,6 @@
 //
 //
-// $Id: G4CompositeEMDataSet.hh,v 1.8 2006/06/29 19:33:08 gunter Exp $
-// GEANT4 tag $Name: geant4-09-01-patch-02 $
+// $Id: G4CompositeEMDataSet.hh,v 1.12 2008/03/17 13:45:25 pia Exp $
+// GEANT4 tag $Name: geant4-09-02-ref-02 $
 //
 // Author: Maria Grazia Pia (Maria.Grazia.Pia@cern.ch)
@@ -44,52 +44,61 @@
 // -------------------------------------------------------------------
 
-#ifndef   G4COMPOSITEEMDATASET_HH
- #define  G4COMPOSITEEMDATASET_HH 1
+#ifndef G4COMPOSITEEMDATASET_HH
+#define G4COMPOSITEEMDATASET_HH 1
 
- #include "globals.hh"
- #include "G4VEMDataSet.hh"
- #include <vector>
+#include "globals.hh"
+#include "G4VEMDataSet.hh"
+#include <vector>
 
- class G4VDataSetAlgorithm;
+class G4VDataSetAlgorithm;
 
- class G4CompositeEMDataSet : public G4VEMDataSet 
- {
-  public:
-                                                G4CompositeEMDataSet(G4VDataSetAlgorithm* argAlgorithm, G4double argUnitEnergies=MeV, G4double argUnitData=barn, G4int argMinZ=1, G4int argMaxZ=99); 
-   virtual                                     ~G4CompositeEMDataSet();
+class G4CompositeEMDataSet : public G4VEMDataSet 
+{
+public:
+  G4CompositeEMDataSet(G4VDataSetAlgorithm* argAlgorithm, 
+		       G4double eUnit=MeV, 
+		       G4double dataUnit=barn, 
+		       G4int zMin=1, 
+		       G4int zMax=99); 
+
+  virtual ~G4CompositeEMDataSet();
  
-   virtual G4double                             FindValue(G4double argEnergy, G4int argComponentId=0) const;
+  virtual G4double FindValue(G4double x, G4int componentId=0) const;
   
-   virtual void                                 PrintData(void) const;
+  virtual void PrintData(void) const;
 
-   virtual const G4VEMDataSet *                 GetComponent(G4int argComponentId) const { return components[argComponentId]; }
-   virtual void                                 AddComponent(G4VEMDataSet * argDataSet) { components.push_back(argDataSet); }
-   virtual size_t                               NumberOfComponents(void) const { return components.size(); }
+  virtual const G4VEMDataSet* GetComponent(G4int componentId) const { return components[componentId]; }
+  virtual void AddComponent(G4VEMDataSet* dataSet) { components.push_back(dataSet); }
+  virtual size_t NumberOfComponents() const { return components.size(); }
 
-   virtual const G4DataVector &                 GetEnergies(G4int argComponentId) const { return GetComponent(argComponentId)->GetEnergies(0); }
-   virtual const G4DataVector &                 GetData(G4int argComponentId) const { return GetComponent(argComponentId)->GetData(0); }
-   virtual void                                 SetEnergiesData(G4DataVector * argEnergies, G4DataVector * argData, G4int argComponentId);
+  virtual const G4DataVector& GetEnergies(G4int componentId) const { return GetComponent(componentId)->GetEnergies(0); }
+  virtual const G4DataVector& GetData(G4int componentId) const { return GetComponent(componentId)->GetData(0); }
+  virtual void SetEnergiesData(G4DataVector* x, G4DataVector* data, G4int componentId);
 
-   virtual G4bool                               LoadData(const G4String & argFileName);
-   virtual G4bool                               SaveData(const G4String & argFileName) const;
+  virtual G4bool LoadData(const G4String& fileName);
+  virtual G4bool SaveData(const G4String& fileName) const;
+
+ virtual G4double RandomSelect(G4int componentId) const;
+
    
-  private:
-   void                                         CleanUpComponents(void);
+private:
+
+  void CleanUpComponents(void);
   
-   // Hide copy constructor and assignment operator 
-                                                G4CompositeEMDataSet();
-                                                G4CompositeEMDataSet(const G4CompositeEMDataSet & copy);
-   G4CompositeEMDataSet &                       operator=(const G4CompositeEMDataSet & right);
+  // Hide copy constructor and assignment operator 
+  G4CompositeEMDataSet();
+  G4CompositeEMDataSet(const G4CompositeEMDataSet& copy);
+  G4CompositeEMDataSet& operator=(const G4CompositeEMDataSet& right);
 
-   std::vector<G4VEMDataSet *>                  components;          // Owned pointers
+  std::vector<G4VEMDataSet*> components;    // Owned pointers
 
-   G4VDataSetAlgorithm *                        algorithm;           // Owned pointer 
+  G4VDataSetAlgorithm* algorithm;           // Owned pointer 
   
-   G4double                                     unitEnergies;
-   G4double                                     unitData;
+  G4double unitEnergies;
+  G4double unitData;
 
-   G4int                                        minZ;
-   G4int                                        maxZ;
- };
+  G4int minZ;
+  G4int maxZ;
+};
 #endif /* G4COMPOSITEEMDATASET_HH */
 
