53 const char description[],
56 : mname(name), mdescription(description), moutput(0), minput(0) {
68 os <<
"Agenda *" <<
mname <<
"* not found in WSV data.";
69 throw std::runtime_error(os.str());
78 os <<
"Unknown output WSV " << output[j] <<
" in WSM " <<
mname;
79 throw runtime_error(os.
str());
89 os <<
"Unknown input WSV " << input[j] <<
" in WSM " <<
mname;
90 throw runtime_error(os.
str());
180 os <<
"\n*-------------------------------------------------------------------*\n" 181 <<
"Workspace variable = " << agr.
Name()
182 <<
"\n---------------------------------------------------------------------\n" 185 <<
"\n---------------------------------------------------------------------\n";
187 os <<
"Group = Agenda\n";
214 os <<
"\n*-------------------------------------------------------------------*\n";
238 os <<
"\n*-------------------------------------------------------------------*\n" 239 <<
"Workspace variable = " << wr.
Name()
240 <<
"\n---------------------------------------------------------------------\n" 243 <<
"\n---------------------------------------------------------------------\n" 245 <<
"\n*-------------------------------------------------------------------*\n";
254 map<String, Index>::const_iterator j =
AgendaMap.find(wr.
Name());
272 bool is_agenda_array) {
276 ofs <<
"void " << agr.
Name() <<
"Execute(\n";
279 ofs <<
" // Workspace\n";
280 ofs <<
" Workspace& ws,\n";
283 ofs <<
" // Output\n";
284 for (ArrayOfIndex::const_iterator j = ago.begin(); j != ago.end(); j++) {
287 ofs << Workspace::wsv_data[*j].Name() <<
",\n";
292 ofs <<
" // Input\n";
293 for (ArrayOfIndex::const_iterator j = agi.begin(); j != agi.end(); j++) {
295 ArrayOfIndex::const_iterator it = ago.begin();
296 while (it != ago.end() && *it != *j) it++;
298 if (it == ago.end()) {
305 if (group_name !=
"Index" && group_name !=
"Numeric") {
308 ofs <<
" " << Workspace::wsv_data[*j].Name() <<
",\n";
313 ofs <<
" // Wrapper Input\n";
314 if (is_agenda_array) {
315 ofs <<
" const ArrayOfAgenda& input_agenda_array)";
317 ofs <<
" const Agenda& input_agenda)";
Index get_wsv_group_id(const String &name)
Returns the id of the given group.
INDEX Index
The type to use for all integer numbers and indices.
static Array< WsvRecord > wsv_data
Global WSV data.
Lookup information for one agenda.
ArrayOfIndex minput
Workspace Input.
Index nelem() const
Number of elements.
Declarations having to do with the four output streams.
Index Group() const
The wsv group to which this variable belongs.
map< String, Index > AgendaMap
The map associated with agenda_data.
void write_agenda_wrapper_header(ofstream &ofs, const AgRecord &agr, bool is_agenda_array)
Write a agenda wrapper header.
const ArrayOfIndex & Out() const
const String & Name() const
Name of this workspace variable.
String mname
The name of this agenda.
This file contains the Workspace class.
Index get_wsv_id(const String &name)
Get index of WSV.
const String & Description() const
_CS_string_type str() const
const String & Description() const
A text describing this workspace variable.
bool check_agenda_data()
Check that agendas.cc and workspace.cc are consistent.
ArrayOfIndex moutput
Workspace Output.
const Array< AgRecord > agenda_data
The lookup information for the agendas.
const ArrayOfIndex & In() const
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
This can be used to make arrays out of anything.
const ArrayOfString wsv_group_names
The names associated with Wsv groups as Strings.
static map< String, Index > WsvMap
Global map associated with wsv_data.
const String & Name() const
ostream & operator<<(ostream &os, const AgRecord &agr)
Output operator for AgRecord.
This class contains all static information for one workspace variable.
constexpr Rational end(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the largest M for a polarization type of this transition.
AgRecord()
Default constructor.
Declarations for AgRecord, storing lookup information for one agenda.
Auxiliary header stuff related to workspace variable groups.