Bridge++  Ver. 1.1.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  FieldIO_LIME(const IO_Format::Format *format) : FieldIO(format)
58  {
59  }
60 
61  void read_file(Field *v, std::string filename);
62  void write_file(Field *v, std::string filename);
63 
64  private:
65 
66  void process_file(Field *v, std::string filename);
67 
68  void load_data(LimeReader *reader, Field *v);
69  void store_data(LimeWriter *writer, Field *v);
70 
71 #ifdef USE_ILDG_METADATA
72  void load_metadata(LimeReader *reader, ILDG_Format::Params *params);
73  void check_metadata(const ILDG_Format::Params *params);
74  void store_metadata(LimeWriter *writer);
75 #endif
76 
77  void load_lfn(LimeReader *reader);
78  void store_lfn(LimeWriter *reader, std::string lfn_string);
79 };
80 
81 #else
82 
83 class FieldIO_LIME : public FieldIO
84 {
85  public:
86  FieldIO_LIME(const IO_Format::Format *format) : FieldIO(format)
87  {
88  Bridge::vout.crucial("FieldIO_LIME unimplemented.\n");
89 
90  abort();
91  }
92 
93  void read_file(Field *v, std::string filename);
94  void write_file(Field *v, std::string filename);
95 };
96 #endif
97 #endif /* GAUGECONFIG_ILDG_INCLUDED */