58 G4Exception(
"G4RDShellEMDataSet::G4RDShellEMDataSet()",
"InvalidSetup",
75 std::vector<G4RDVEMDataSet *>::const_iterator i(
components.begin());
76 std::vector<G4RDVEMDataSet *>::const_iterator end(
components.end());
80 value += (*i)->FindValue(energy);
92 G4cout <<
"The data set has " << n <<
" components" <<
G4endl;
119 message <<
"Component " << componentId <<
" not found";
121 G4Exception(
"G4RDShellEMDataSet::SetEnergiesData()",
"DataNotFound",
131 std::ifstream
in(fullFileName);
136 message += fullFileName;
137 message +=
"\" not found";
138 G4Exception(
"G4RDShellEMDataSet::LoadData()",
"DataNotFound",
146 G4int shellIndex = 0;
147 bool energyColumn =
true;
155 if (energyColumn && energies!=0)
162 energyColumn = (!energyColumn);
177 energyColumn = (!energyColumn);
189 std::ofstream out(fullFileName);
194 message += fullFileName;
196 G4Exception(
"G4RDEMDataSet::SaveData()",
"CannotOpenFile",
212 G4DataVector::const_iterator i = energies.begin();
213 G4DataVector::const_iterator endI = energies.end();
214 G4DataVector::const_iterator j = data.begin();
226 out << ((*j)/
unitData) << std::endl;
240 out << -1.f << std::endl;
253 out << -2.f << std::endl;
271 char* path = getenv(
"G4LEDATA");
273 G4Exception(
"G4RDShellEMDataSet::FullFileName()",
"InvalidSetup",
276 std::ostringstream fullFileName;
278 fullFileName << path <<
'/' << fileName <<
z <<
".dat";
280 return G4String(fullFileName.str().c_str());
virtual void SetEnergiesData(G4DataVector *x, G4DataVector *data, G4int component=0)=0
std::vector< G4RDVEMDataSet * > components
std::vector< ExP01TrackerHit * > a
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
void message(RunManager *runmanager)
virtual void PrintData(void) const =0
virtual void PrintData(void) const
const XML_Char const XML_Char * data
virtual G4bool LoadData(const G4String &fileName)
virtual ~G4RDShellEMDataSet()
virtual G4RDVDataSetAlgorithm * Clone() const =0
const XML_Char int const XML_Char * value
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const
virtual G4double FindValue(G4double energy, G4int componentId=0) const
virtual size_t NumberOfComponents(void) const
virtual void AddComponent(G4RDVEMDataSet *dataSet)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
virtual void SetEnergiesData(G4DataVector *energies, G4DataVector *data, G4int componentId)
G4String FullFileName(const G4String &fileName) const
G4RDVDataSetAlgorithm * algorithm
G4GLOB_DLL std::ostream G4cout
virtual const G4DataVector & GetData(G4int componentId) const =0
void CleanUpComponents(void)
virtual G4bool SaveData(const G4String &fileName) const