Psi4
psio.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef PSIO_H
30 #define PSIO_H
31 
32 #include <cstdio>
33 #include "psi4/libpsio/config.h"
34 #include <string>
35 
36 namespace psi {
37 
38  int psio_init(void);
39  int psio_ipv1_config(void);
40  int psio_state(void);
41  int psio_done(void);
42  void psio_error(unsigned int unit, unsigned int errval);
43  int psio_open(unsigned int unit, int status);
44  int psio_close(unsigned int unit, int keep);
45  std::string psio_getpid(void);
46 
47  unsigned int psio_get_numvols_default(void);
48  int psio_get_volpath_default(unsigned int volume, char **path);
49  int psio_get_filename_default(char **name);
50  psio_address psio_get_address(psio_address start, ULI shift);
51  psio_address psio_get_global_address(psio_address entry_start,
52  psio_address rel_address);
53  int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols);
54  //ULI psio_get_length(psio_address sadd, psio_address eadd);
55  psio_address psio_get_entry_end(unsigned int unit, const char *key);
56 
57  int psio_tocwrite(unsigned int unit);
58  int psio_tocread(unsigned int unit);
59  void psio_tocprint(unsigned int unit, FILE *output);
60  psio_tocentry *psio_tocscan(unsigned int unit, const char *key);
61  bool psio_tocentry_exists(unsigned int unit, const char *key);
62  psio_tocentry *psio_toclast(unsigned int unit);
63  int psio_tocclean(unsigned int unit, const char *key);
64 
65  int psio_write(unsigned int unit, const char *key, char *buffer, ULI size,
66  psio_address sadd, psio_address *eadd);
67  int psio_read(unsigned int unit, const char *key, char *buffer, ULI size,
68  psio_address sadd, psio_address *eadd);
69  int psio_write_entry(unsigned int unit, const char *key, char *buffer, ULI size);
70  int psio_read_entry(unsigned int unit, const char *key, char *buffer, ULI size);
71  int psio_write_block(unsigned int unit, const char *key, char *buffer, ULI blksiz,
72  ULI start_blk, ULI end_blk);
73  int psio_read_block(unsigned int unit, const char *key, char *buffer, ULI blksiz,
74  ULI start_blk, ULI end_blk);
75  int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size,
76  int wrt);
77  int psio_zero_disk(unsigned int unit, const char *key, ULI rows, ULI cols);
78 
79  int psio_open_check(unsigned int unit);
80 
81  unsigned long int psio_rd_toclen(unsigned int unit);
82  void psio_wt_toclen(unsigned int unit, ULI toclen);
83 
84  int psio_set_filescfg_kwd(const char* kwdgrp, const char* kwd, int unit,
85  const char* kwdval);
86  const char* psio_get_filescfg_kwd(const char* kwdgrp, const char* kwd,
87  int unit);
88 
89  bool psio_tocdel(unsigned int unit, const char *key);
90 }
91 
92 #endif /* #ifndef PSIO_H */
int psio_read_block(unsigned int unit, const char *key, char *buffer, ULI blksiz, ULI start_blk, ULI end_blk)
void status(const char *, std::string)
Definition: cchbar/status.cc:38
int psio_tocwrite(unsigned int unit)
Definition: tocwrite.cc:81
psio_tocentry * psio_toclast(unsigned int unit)
int psio_zero_disk(unsigned int unit, const char *key, ULI rows, ULI cols)
Definition: zero_disk.cc:65
bool psio_tocentry_exists(unsigned int unit, const char *key)
Definition: tocscan.cc:115
int psio_set_filescfg_kwd(const char *kwdgrp, const char *kwd, int unit, const char *kwdval)
Definition: filescfg.cc:83
int psio_read(unsigned int unit, const char *key, char *buffer, ULI size, psio_address sadd, psio_address *eadd)
Definition: read.cc:117
int psio_open(unsigned int unit, int status)
Definition: open.cc:234
psio_address psio_get_global_address(psio_address entry_start, psio_address rel_address)
Definition: get_global_address.cc:45
int psio_read_entry(unsigned int unit, const char *key, char *buffer, ULI size)
Definition: read_entry.cc:60
int psio_ipv1_config(void)
const char * psio_get_filescfg_kwd(const char *kwdgrp, const char *kwd, int unit)
Definition: filescfg.cc:89
void psio_tocprint(unsigned int unit, FILE *output)
int psio_tocclean(unsigned int unit, const char *key)
Definition: tocclean.cc:85
int psio_write_block(unsigned int unit, const char *key, char *buffer, ULI blksiz, ULI start_blk, ULI end_blk)
psio_address psio_get_address(psio_address start, ULI shift)
Definition: get_address.cc:44
int psio_tocread(unsigned int unit)
psio_tocentry * psio_tocscan(unsigned int unit, const char *key)
Definition: tocscan.cc:78
std::string psio_getpid(void)
Definition: getpid.cc:59
unsigned long int ULI
Definition: dftensor.cc:48
void psio_wt_toclen(unsigned int unit, ULI toclen)
struct psi::psio_entry psio_tocentry
int psio_init(void)
Definition: libpsio/init.cc:123
int psio_get_filename_default(char **name)
Definition: get_filename.cc:83
int psio_write(unsigned int unit, const char *key, char *buffer, ULI size, psio_address sadd, psio_address *eadd)
Definition: write.cc:163
int psio_state()
Definition: libpsio/init.cc:144
void psio_error(unsigned int unit, unsigned int errval)
Definition: libpsio/error.cc:51
int psio_rw(unsigned int unit, char *buffer, psio_address address, ULI size, int wrt)
Definition: rw.cc:146
psio_address psio_get_entry_end(unsigned int unit, const char *key)
int psio_write_entry(unsigned int unit, const char *key, char *buffer, ULI size)
Definition: write_entry.cc:55
int psio_volseek(psio_vol *vol, ULI page, ULI offset, ULI numvols)
Definition: volseek.cc:46
bool psio_tocdel(unsigned int unit, const char *key)
Definition: tocdel.cc:69
int psio_close(unsigned int unit, int keep)
Definition: libpsio/close.cc:89
int psio_open_check(unsigned int unit)
Definition: open_check.cc:64
unsigned int psio_get_numvols_default(void)
Definition: get_numvols.cc:65
int psio_done(void)
Definition: done.cc:84
unsigned long int psio_rd_toclen(unsigned int unit)
Definition: toclen.cc:109
int psio_get_volpath_default(unsigned int volume, char **path)
Definition: get_volpath.cc:73