89 std::vector<G4VEMDataSet *>::const_iterator i(
components.begin());
90 std::vector<G4VEMDataSet *>::const_iterator end(
components.end());
94 value += (*i)->FindValue(energy);
106 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
165 std::ifstream
in(fullFileName);
170 message += fullFileName;
171 message +=
"\" not found";
182 G4int shellIndex = 0;
200 if ((k%nColumns == 0) && (orig_shell_energies != 0) )
203 orig_shell_energies = 0;
205 log_shell_energies = 0;
211 if (orig_shell_energies == 0)
221 log_shell_energies->push_back(std::log10(a) + std::log10(unitEnergies));
223 else if (k%nColumns == 1)
225 orig_shell_data->push_back(a*
unitData);
226 log_shell_data->push_back(std::log10(a) + std::log10(unitData));
235 delete orig_shell_energies;
236 delete orig_shell_data;
237 delete log_shell_energies;
238 delete log_shell_data;
249 std::ifstream
in(fullFileName);
254 message += fullFileName;
255 message +=
"\" not found";
264 G4int shellIndex = 0;
280 if ((k%nColumns == 0) && (orig_shell_energies != 0) )
283 orig_shell_energies = 0;
289 if (orig_shell_energies == 0)
298 else if (k%nColumns == 1)
300 orig_shell_data->push_back(a*
unitData);
309 delete orig_shell_energies;
310 delete orig_shell_data;
320 std::ofstream out(fullFileName);
325 message += fullFileName;
342 G4DataVector::const_iterator i = energies.begin();
343 G4DataVector::const_iterator endI = energies.end();
344 G4DataVector::const_iterator j = data.begin();
356 out << ((*j)/
unitData) << std::endl;
370 out << -1.f << std::endl;
383 out << -2.f << std::endl;
401 char* path = getenv(
"G4LEDATA");
409 std::ostringstream fullFileName;
411 fullFileName << path <<
'/' << fileName <<
z <<
".dat";
413 return G4String(fullFileName.str().c_str());
virtual G4VDataSetAlgorithm * Clone() const =0
std::vector< ExP01TrackerHit * > a
G4VDataSetAlgorithm * algorithm
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual G4bool LoadData(const G4String &fileName)
virtual size_t NumberOfComponents(void) const
virtual void SetLogEnergiesData(G4DataVector *energies, G4DataVector *data, G4DataVector *log_energies, G4DataVector *log_data, G4int componentId)
void message(RunManager *runmanager)
virtual G4bool SaveData(const G4String &fileName) const
virtual const G4DataVector & GetData(G4int componentId) const =0
void CleanUpComponents(void)
std::vector< G4VEMDataSet * > components
virtual void PrintData(void) const
const XML_Char const XML_Char * data
const XML_Char int const XML_Char * value
virtual G4bool LoadNonLogData(const G4String &fileName)
G4String FullFileName(const G4String &fileName) const
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual void SetEnergiesData(G4DataVector *energies, G4DataVector *data, G4int componentId)
virtual void SetLogEnergiesData(G4DataVector *x, G4DataVector *data, G4DataVector *Log_x, G4DataVector *Log_data, G4int component=0)=0
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void AddComponent(G4VEMDataSet *dataSet)
virtual ~G4ShellEMDataSet()
virtual void PrintData(void) const =0
G4GLOB_DLL std::ostream G4cout
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
virtual G4double FindValue(G4double energy, G4int componentId=0) const