votca 2024-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// Third party includes
25#include <H5Cpp.h>
26
27// Local VOTCA includes
28#include "checkpoint_utils.h"
29#include "checkpointreader.h"
30#include "checkpointtable.h"
31#include "checkpointwriter.h"
32
33namespace votca {
34namespace xtp {
35
37 READ = 0, // only read no write access
38 MODIFY = 1, // if file exists, change it
39 CREATE = 2 // create new file
40};
41
42std::ostream& operator<<(std::ostream& s, CheckpointAccessLevel l);
43
45 public:
46 CheckpointFile(std::string fN);
47 CheckpointFile(std::string fN, CheckpointAccessLevel access);
48
49 std::string getFileName();
50 std::string getVersion();
51
52 H5::H5File getHandle();
53
55 CheckpointWriter getWriter(const std::string path_);
57 CheckpointReader getReader(const std::string path_);
58
59 private:
60 std::string fileName_;
61 H5::H5File fileHandle_;
64};
65
66} // namespace xtp
67} // namespace votca
68#endif // VOTCA_XTP_CHECKPOINT_H
CheckpointAccessLevel accessLevel_
Definition checkpoint.h:63
CheckpointReader getReader()
CheckpointWriter getWriter()
std::ostream & operator<<(std::ostream &out, const Correlate &c)
Definition correlate.h:53
H5::Group CptLoc
CheckpointAccessLevel
Definition checkpoint.h:36
base class for all analysis tools
Definition basebead.h:33