64 algorithm(argAlgorithm),
65 unitEnergies(argUnitEnergies),
66 unitData(argUnitData),
70 if (algorithm ==
nullptr)
71 G4Exception(
"G4CompositeEMDataSet::G4CompositeEMDataSet",
81 if (algorithm)
delete algorithm;
89 if (component)
return component->
FindValue(argEnergy);
91 std::ostringstream message;
92 message <<
"G4CompositeEMDataSet::FindValue - component " << argComponentId <<
" not found";
106 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
131 std::ostringstream message;
132 message <<
"G4CompositeEMDataSet::SetEnergiesData - component " << argComponentId <<
" not found";
134 G4Exception(
"G4CompositeEMDataSet::SetEnergiesData",
144 G4int argComponentId)
154 std::ostringstream message;
155 message <<
"G4CompositeEMDataSet::SetEnergiesData - component " << argComponentId <<
" not found";
157 G4Exception(
"G4CompositeEMDataSet::SetLogEnergiesData",
167 for (
G4int z(minZ); z<maxZ; ++z)
170 if (!component->
LoadData(argFileName))
186 for (
G4int z(minZ); z<maxZ; ++z)
203 for (
G4int z=minZ; z<maxZ; ++z)
209 std::ostringstream message;
210 message <<
"G4CompositeEMDataSet::SaveData - component " << (z-minZ) <<
" not found";
216 if (!component->
SaveData(argFileName))
225void G4CompositeEMDataSet::CleanUpComponents(
void)
227 while (!components.empty())
229 if (components.back())
230 delete components.back();
231 components.pop_back();
240 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
virtual void PrintData(void) const
virtual G4double RandomSelect(G4int componentId) const
virtual size_t NumberOfComponents() const
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int componentId)
virtual void AddComponent(G4VEMDataSet *dataSet)
virtual G4double FindValue(G4double x, G4int componentId=0) const
virtual ~G4CompositeEMDataSet()
virtual void SetLogEnergiesData(G4DataVector *xData, G4DataVector *data, G4DataVector *xLogData, G4DataVector *Logdata, G4int componentId)
G4CompositeEMDataSet(G4VDataSetAlgorithm *argAlgorithm, G4double eUnit=CLHEP::MeV, G4double dataUnit=CLHEP::barn, G4int zMin=1, G4int zMax=99)
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual G4bool LoadNonLogData(const G4String &fileName)
virtual G4bool LoadData(const G4String &fileName)
virtual G4bool SaveData(const G4String &fileName) const
virtual G4VDataSetAlgorithm * Clone() const =0
virtual G4bool SaveData(const G4String &fileName) const =0
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual G4bool LoadNonLogData(const G4String &fileName)=0
virtual G4double RandomSelect(G4int componentId=0) const =0
virtual void SetLogEnergiesData(G4DataVector *x, G4DataVector *data, G4DataVector *Log_x, G4DataVector *Log_data, G4int component=0)=0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual G4bool LoadData(const G4String &fileName)=0
virtual void PrintData(void) const =0