votca 2024.2-dev
Loading...
Searching...
No Matches
checkpoint.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17#pragma once
18#ifndef VOTCA_XTP_CHECKPOINT_H
19#define VOTCA_XTP_CHECKPOINT_H
20
21// Standard includes
22#include <fstream>
23
24#if defined(__clang__)
25#elif defined(__GNUC__)
26#pragma GCC diagnostic push
27#pragma GCC diagnostic ignored "-Wdeprecated-copy"
28#endif
29
30// Third party includes
31#include <H5Cpp.h>
32
33// Local VOTCA includes
34#include "checkpoint_utils.h"
35#include "checkpointreader.h"
36#include "checkpointtable.h"
37#include "checkpointwriter.h"
38
39namespace votca {
40namespace xtp {
41
43 READ = 0, // only read no write access
44 MODIFY = 1, // if file exists, change it
45 CREATE = 2 // create new file
46};
47
48std::ostream& operator<<(std::ostream& s, CheckpointAccessLevel l);
49
51 public:
52 CheckpointFile(std::string fN);
53 CheckpointFile(std::string fN, CheckpointAccessLevel access);
54
55 std::string getFileName();
56 std::string getVersion();
57
58 H5::H5File getHandle();
59
61 CheckpointWriter getWriter(const std::string path_);
63 CheckpointReader getReader(const std::string path_);
64
65 private:
66 std::string fileName_;
67 H5::H5File fileHandle_;
70};
71
72} // namespace xtp
73} // namespace votca
74
75#if defined(__clang__)
76#elif defined(__GNUC__)
77#pragma GCC diagnostic pop
78#endif
79
80#endif // VOTCA_XTP_CHECKPOINT_H
CheckpointAccessLevel accessLevel_
Definition checkpoint.h:69
CheckpointFile(std::string fN)
Definition checkpoint.cc:62
CheckpointReader getReader()
CheckpointWriter getWriter()
std::ostream & operator<<(std::ostream &out, const Correlate &c)
Definition correlate.h:53
CheckpointAccessLevel
Definition checkpoint.h:42
H5::Group CptLoc
base class for all analysis tools
Definition basebead.h:33