50 algorithm(argAlgorithm),
51 unitEnergies(argUnitEnergies),
52 unitData(argUnitData),
57 G4Exception(
"G4RDCompositeEMDataSet::G4RDCompositeEMDataSet()",
66 if (algorithm)
delete algorithm;
74 if (component)
return component->
FindValue(argEnergy);
76 std::ostringstream message;
77 message <<
"Component " << argComponentId <<
" not found";
89 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
112 std::ostringstream message;
113 message <<
"Component " << argComponentId <<
" not found";
115 G4Exception(
"G4RDCompositeEMDataSet::SetEnergiesData()",
126 if (!component->
LoadData(argFileName))
146 std::ostringstream message;
147 message <<
"Component " << (
z-minZ) <<
" not found";
152 if (!component->
SaveData(argFileName))
159 void G4RDCompositeEMDataSet::CleanUpComponents(
void)
161 while (!components.empty())
163 if (components.back())
164 delete components.back();
165 components.pop_back();
173 if (componentId >= 0 && componentId < (
G4int)components.size())
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual G4RDVDataSetAlgorithm * Clone() const =0
virtual ~G4RDCompositeEMDataSet()
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const
virtual G4bool SaveData(const G4String &fileName) const =0
G4GLOB_DLL std::ostream G4cout
virtual void PrintData(void) const
const XML_Char int const XML_Char * value
virtual void AddComponent(G4RDVEMDataSet *dataSet)
virtual G4double RandomSelect(G4int componentId) const
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual void PrintData(void) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const
virtual G4bool SaveData(const G4String &fileName) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual size_t NumberOfComponents() const
G4RDCompositeEMDataSet(G4RDVDataSetAlgorithm *argAlgorithm, G4double eUnit=CLHEP::MeV, G4double dataUnit=CLHEP::barn, G4int zMin=1, G4int zMax=99)
virtual G4double RandomSelect(G4int componentId=0) const =0
virtual G4bool LoadData(const G4String &fileName)=0
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int componentId)
virtual G4bool LoadData(const G4String &fileName)