LatticeYangMills
outputobs.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * MIT License
4 *
5 * Copyright (c) 2018 Giovanni Pederiva
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to deal
9 * in the Software without restriction, including without limitation the rights
10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 * copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 ******************************************************************************/
25 
38 #pragma once
39 
40 #include <vector>
41 #include <string>
42 
43 #include "Observables/observable.h"
44 
45 namespace LatticeIO {
46 
59  class OutputObs{
60  public:
62  static void initialize(std::vector<Observable*>& obsList);
64  static void writeObs(std::vector<Observable*>& obsList, int MCSteps);
66  static void writeFlowObs(int confNum, std::vector<Observable*>& obsList, std::vector<std::vector<double>>& obsMatrix);
68  static void setOutputDir(std::string outputDir);
69 
70  private:
72  static FILE* m_file;
74  static char fileName[1024];
76  static std::string m_outputDir;
77 
78  };
79 
80 } // end LatticeIO
static char fileName[1024]
The name of the output file.
Definition: outputobs.h:74
Contains the definition of the Observable prototype.
static void writeFlowObs(int confNum, std::vector< Observable * > &obsList, std::vector< std::vector< double >> &obsMatrix)
Writes the observables for given flow step.
Definition: outputobs.cpp:97
static void setOutputDir(std::string outputDir)
Sets the output directory for the file output.
Definition: outputobs.cpp:52
static std::string m_outputDir
The output directory.
Definition: outputobs.h:76
static void writeObs(std::vector< Observable * > &obsList, int MCSteps)
Writes the list of observables to file at given generation point.
Definition: outputobs.cpp:80
static FILE * m_file
The file object for target output.
Definition: outputobs.h:72
Class for output to file of observables values.
Definition: outputobs.h:59
static void initialize(std::vector< Observable * > &obsList)
Opens the files and writes needed headers.
Definition: outputobs.cpp:63