Bridge++  Ver. 1.2.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fieldIO_LIME.h
Go to the documentation of this file.
1 
9 #ifndef FIELDIO_LIME_INCLUDED
10 #define FIELDIO_LIME_INCLUDED
11 
12 #include <string>
13 using std::string;
14 
15 #ifdef USE_LIMELIB
16 extern "C" {
17 #include <lime.h>
18 }
19 #endif
20 
21 #include "fieldIO.h"
22 #include "index_lex.h"
23 #include "field.h"
24 //#include "ildg_metadata.h"
25 
26 #include "bridgeIO.h"
27 
28 #undef USE_ILDG_METADATA
29 
31 
52 #ifdef USE_LIMELIB
53 
54 class FieldIO_LIME : public FieldIO
55 {
56  public:
57  static const std::string class_name;
58 
59  public:
60  FieldIO_LIME(const IO_Format::Format *format) : FieldIO(format)
61  {
62  }
63 
64  void read_file(Field *v, std::string filename);
65  void write_file(Field *v, std::string filename);
66 
67  private:
68 
69  void process_file(Field *v, std::string filename);
70 
71  void load_data(LimeReader *reader, Field *v);
72  void store_data(LimeWriter *writer, Field *v);
73 
74 #ifdef USE_ILDG_METADATA
75  void load_metadata(LimeReader *reader, ILDG_Format::Params *params);
76  void check_metadata(const ILDG_Format::Params *params);
77  void store_metadata(LimeWriter *writer);
78 
79 #endif
80 
81  void load_lfn(LimeReader *reader);
82  void store_lfn(LimeWriter *reader, std::string lfn_string);
83 };
84 
85 #else
86 
87 class FieldIO_LIME : public FieldIO
88 {
89  public:
90  FieldIO_LIME(const IO_Format::Format *format) : FieldIO(format)
91  {
92  Bridge::vout.crucial("FieldIO_LIME: USE_LIMELIB is not defined.\n");
93 
94  abort();
95  }
96 
97  void read_file(Field *v, std::string filename);
98  void write_file(Field *v, std::string filename);
99 };
100 #endif
101 #endif /* GAUGECONFIG_ILDG_INCLUDED */
BridgeIO vout
Definition: bridgeIO.cpp:207
static const std::string class_name
Definition: fieldIO.h:51
FieldIO_LIME class for file I/O of Field data in LIME format.
Definition: fieldIO_LIME.h:87
Container of Field-type object.
Definition: field.h:37
void read_file(Field *v, std::string filename)
read data from file.
void write_file(Field *v, std::string filename)
write data to file.
FieldIO_LIME(const IO_Format::Format *format)
Definition: fieldIO_LIME.h:90
void crucial(const char *format,...)
Definition: bridgeIO.cpp:26
FieldIO class for file I/O of space-time distributed data.
Definition: fieldIO.h:48