16#include <communications.h>
20inline void erreur(
const Nom&
id)
23 Cerr <<
"The restarting has failed. The tag " <<
id <<
" has not been" << finl;
24 Cerr <<
"found in the restarting file. Check the restarting time in your data set." << finl;
28inline void erreur_syn(
const Nom&
id,
const Nom& syn_id)
31 Cerr <<
"The restarting has failed. The tag " <<
id <<
" or its synonym"<< syn_id <<
" has not been" << finl;
32 Cerr <<
"found in the restarting file. Check the restarting time in your data set." << finl;
36extern void convert_to(
const char *s,
double& ob);
37double extract_time_from_string(
const Nom& ident_lu,
const int digits)
41 convert_to(ident_lu.
substr_old(length-digits,digits),temps);
46double avancer_fichier(
Entree& fich,
const Nom&
id,
const int read_header)
67 Cerr <<
"Looking for the tag " <<
id <<
" in the file." << finl;
75 if (ident_lu!=
"format_sauvegarde:")
92 un_objet.
typer(type_lu);
93 Cerr <<
"-> Passing object " << ident_lu <<
" ... " << flush;
96 temps = extract_time_from_string(ident_lu, digits);
99 if (
id!=(
Nom)
"fin" && ident_lu == (
Nom)
"fin") erreur(
id);
102 Cerr <<
"-> Find object " <<
id <<
" and reading data in it ..." << finl;
104 envoyer_broadcast(temps, 0);
110double avancer_fichier_with_syno(
Entree& fich,
const Nom&
id,
const Nom& syn_id,
const int read_header)
131 Cerr <<
"Looking for the tag " <<
id <<
"or its synonym "<< syn_id<<
" in the file." << finl;
139 if (ident_lu!=
"format_sauvegarde:")
156 un_objet.
typer(type_lu);
157 Cerr <<
"-> Passing object " << ident_lu <<
" ... " << flush;
159 Cerr <<
"OK" << finl;
160 temps = extract_time_from_string(ident_lu, digits);
163 if (
id!=(
Nom)
"fin" && ident_lu == (
Nom)
"fin") erreur_syn(
id,syn_id);
166 Cerr <<
"-> Find object " <<
id <<
" or its synonym "<< syn_id<<
" and reading data in it ..." << finl;
168 envoyer_broadcast(temps, 0);
173double get_last_time(
Entree& fich)
175 return avancer_fichier(fich,
"fin", 1);
Class defining operators and methods for all reading operation in an input flow (file,...
virtual void set_diffuse(bool diffuse)
ToDo TMA : commenter.
virtual istream & get_istream()
Une chaine de caractere (Nom) en majuscules.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Nom substr_old(const int, const int) const
Retourne un nom selon la commande usuelle substr ATTENTION : deb = 1 => premier caractere de la chain...
int longueur() const
Renvoie le nombre de caracteres de la chaine du Nom y compris le caractere zero de fin de chaine.
Objet_U * typer(const char *nom_type)
Essaie de creer une instance du type "type".
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
int reprendre(Entree &is) override
Reprise d'un Objet_U sur un flot d'entree Methode a surcharger.