57 G4Exception(
"G4CompositeDataSet::G4CompositeDataSet",
60 "Interpolation == 0");
68 if (algorithm)
delete algorithm;
76 if (component)
return component->
FindValue(energy);
78 std::ostringstream message;
79 message <<
"G4CompositeDataSet::FindValue - component " << componentId <<
" not found";
84 message.str().c_str());
93 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
108 G4IDataSet * component(components[componentId]);
116 std::ostringstream message;
117 message <<
"G4CompositeDataSet::SetEnergiesData - component " << componentId <<
" not found";
122 message.str().c_str());
130 for (
G4int z(minZ); z<maxZ; ++z)
133 if (!component->
LoadData(argFileName))
147 for (
G4int z=minZ; z<maxZ; ++z)
153 std::ostringstream message;
154 message <<
"G4CompositeDataSet::SaveData - component " << (z-minZ) <<
" not found";
158 message.str().c_str());
161 if (!component->
SaveData(argFileName))
168void G4CompositeDataSet::CleanUpComponents(
void)
170 while (!components.empty())
172 if (components.back())
173 delete components.back();
174 components.pop_back();
182 if (componentId >= 0 && componentId < (
G4int)components.size())
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
G4CompositeDataSet(G4IInterpolator *argAlgorithm, G4double eUnit=CLHEP::MeV, G4double dataUnit=CLHEP::barn, G4int zMin=1, G4int zMax=99)
virtual size_t NumberOfComponents() const
virtual G4bool SaveData(const G4String &fileName) const
virtual void AddComponent(G4IDataSet *dataSet)
virtual G4double RandomSelect(G4int componentId) const
virtual ~G4CompositeDataSet()
virtual void PrintData(void) const
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int componentId)
virtual const G4IDataSet * GetComponent(G4int componentId) const
virtual G4bool LoadData(const G4String &fileName)
virtual G4double FindValue(G4double x, G4int componentId=0) const
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual G4bool LoadData(const G4String &fileName)=0
virtual G4double RandomSelect(G4int componentId=0) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual void PrintData(void) const =0
virtual G4bool SaveData(const G4String &fileName) const =0
virtual G4IInterpolator * Clone() const =0