41 out3 <<
" Manual agenda execution\n";
49 os <<
"This agenda is uninitialized. We don't even know its name.";
51 os <<
"*" << this_agenda.
name() <<
"* is uninitialized.";
52 os <<
" Use *AgendaSet* to add methods to it.";
53 throw std::runtime_error(os.str());
67 sain.insert(ain.begin(), ain.end());
68 saout.insert(aout.begin(), aout.end());
71 set_difference(sain.begin(),
75 insert_iterator<set<Index> >(in_only, in_only.begin()));
76 for (set<Index>::const_iterator it = in_only.begin(); it != in_only.end();
84 for (ArrayOfIndex::const_iterator it = outputs_to_push.begin();
85 it != outputs_to_push.end();
93 for (ArrayOfIndex::const_iterator it = outputs_to_dup.begin();
94 it != outputs_to_dup.end();
100 bool agenda_failed =
false;
104 }
catch (
const std::exception& e) {
106 os <<
"Run-time error in agenda: " << this_agenda.
name() <<
'\n' 108 agenda_failed =
true;
109 agenda_error_msg = os.
str();
111 for (ArrayOfIndex::const_iterator it = outputs_to_push.begin();
112 it != outputs_to_push.end();
117 for (ArrayOfIndex::const_iterator it = outputs_to_dup.begin();
118 it != outputs_to_dup.end();
123 for (set<Index>::const_iterator it = in_only.begin(); it != in_only.end();
128 if (agenda_failed)
throw runtime_error(agenda_error_msg);
134 const Index& agenda_array_index,
137 if (agenda_array_index < 0 || agenda_array_index >= agenda_array.
nelem()) {
139 os <<
"Agenda index " << agenda_array_index
140 <<
" out of bounds. 0 <= index < " << agenda_array.
nelem();
141 throw std::runtime_error(os.str());
143 AgendaExecute(ws, agenda_array[agenda_array_index], verbosity);
149 const Agenda& this_agenda,
152 out3 <<
" Manual, exclusive agenda execution\n";
154 #pragma omp critical(AgendaExecuteExclusive_region) 163 const String& agenda_name,
165 const Agenda& input_agenda,
167 output_agenda = input_agenda;
168 output_agenda.
set_name(agenda_name);
170 output_agenda.
check(ws, verbosity);
178 const String& agenda_name,
180 const Agenda& input_agenda,
182 out.push_back(input_agenda);
185 appended_agenda.
set_name(agenda_name);
187 appended_agenda.
check(ws, verbosity);
195 const String& output_agenda_name,
199 const String& in_agenda_name,
201 const Agenda& input_agenda,
203 if (output_agenda_name != in_agenda_name) {
205 os <<
"Output and input agenda must be the same!" << endl
206 <<
"*" << output_agenda_name <<
"* and *" << in_agenda_name <<
"* " 208 throw runtime_error(os.
str());
213 methods.push_back(input_agenda.
Methods()[
i]);
216 output_agenda.
check(ws, verbosity);
226 "The 'Arts' method is obsolete. Arts1 controlfiles are no longer supported.",
233 const Agenda& input_agenda,
240 if (v == &verbosity) {
void AgendaExecuteExclusive(Workspace &ws, const Agenda &this_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaExecuteExclusive.
INDEX Index
The type to use for all integer numbers and indices.
Lookup information for one agenda.
void ArrayOfAgendaAppend(Workspace &ws, ArrayOfAgenda &out, const String &agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: ArrayOfAgendaAppend.
String name() const
Agenda name.
Index nelem() const
Number of elements.
void check(Workspace &ws, const Verbosity &verbosity)
Checks consistency of an agenda.
Declarations having to do with the four output streams.
map< String, Index > AgendaMap
The map associated with agenda_data.
void duplicate(Index i)
Duplicate WSV.
void AgendaAppend(Workspace &ws, Agenda &output_agenda, const String &output_agenda_name, const Agenda &in_agenda, const String &in_agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaAppend.
void pop_free(Index i)
Remove the topmost WSV from its stack and free its memory.
bool is_initialized(Index i)
Checks existence of the given WSV.
void ArrayOfAgendaExecute(Workspace &ws, const Index &agenda_array_index, const ArrayOfAgenda &agenda_array, const Verbosity &verbosity)
WORKSPACE METHOD: ArrayOfAgendaExecute.
This file contains the Workspace class.
Index get_wsv_id(const String &name)
Get index of WSV.
_CS_string_type str() const
void Arts(Workspace &, const Agenda &, const Verbosity &verbosity)
WORKSPACE METHOD: Arts.
Declarations for agendas.
std::vector< Method > methods()
Index nelem() const
Number of elements.
void execute(Workspace &ws) const
Execute an agenda.
const Array< AgRecord > agenda_data
The lookup information for the agendas.
void set_methods(const Array< MRecord > &ml)
const ArrayOfIndex & get_output2push() const
const ArrayOfIndex & get_output2dup() const
void AgendaSet(Workspace &ws, Agenda &output_agenda, const String &agenda_name, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaSet.
void arts_exit_with_error_message(const String &m, ArtsOut &out)
Print error message and exit.
basic_ostringstream< char, string_char_traits< char >, alloc > ostringstream
This can be used to make arrays out of anything.
void set_name(const String &nname)
Set agenda name.
void push_uninitialized(Index i, void *wsv)
Put a new WSV onto its stack.
const Array< MRecord > & Methods() const
void AgendaExecute(Workspace &ws, const Agenda &this_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: AgendaExecute.
Declarations for AgRecord, storing lookup information for one agenda.
void Arts2(Workspace &ws, const Agenda &input_agenda, const Verbosity &verbosity)
WORKSPACE METHOD: Arts2.
Auxiliary header stuff related to workspace variable groups.