FairRoot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
FairParAsciiFileIo.h
Go to the documentation of this file.
1
/********************************************************************************
2
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3
* *
4
* This software is distributed under the terms of the *
5
* GNU Lesser General Public Licence (LGPL) version 3, *
6
* copied verbatim in the file "LICENSE" *
7
********************************************************************************/
8
#ifndef FAIRPARASCIFILEIIO_H
9
#define FAIRPARASCIFILEIIO_H
10
11
#include "
FairParIo.h
"
// for FairParIo
12
13
#include <Rtypes.h>
// for Bool_t, Text_t, etc
14
#include <fstream>
// for fstream, etc
15
16
class
TList;
17
18
class
FairParAsciiFileIo
:
public
FairParIo
19
{
20
protected
:
21
std::fstream*
file
;
// pointer to a file
22
23
public
:
24
FairParAsciiFileIo
();
25
26
// default destructor closes an open file and deletes list of I/Os
27
~FairParAsciiFileIo
();
28
29
// opens file
30
// if a file is already open, this file will be closed
31
// activates detector I/Os
32
Bool_t
open
(
const
Text_t* fname,
const
Text_t* status =
"in"
);
33
34
// concatenate files whose names are stored in the TList
35
// TList holds list od TObjStrings
36
// create file all.par in local working directory
37
// calls open to open the generated file all.par
38
Bool_t
open
(
const
TList* fnamelist,
const
Text_t* status =
"in"
);
39
40
// closes file
41
void
close
();
42
43
// returns kTRUE if file is open
44
Bool_t
check
()
45
{
46
if
(
file
) {
47
return
(
file
->rdbuf()->is_open() == 1);
48
}
else
{
49
return
kFALSE;
50
}
51
}
52
53
// prints information about the file and the detector I/Os
54
void
print
();
55
56
std::fstream*
getFile
();
57
58
private
:
59
FairParAsciiFileIo
(
const
FairParAsciiFileIo
&);
60
FairParAsciiFileIo
& operator=(
const
FairParAsciiFileIo
&);
61
62
ClassDef(
FairParAsciiFileIo
, 0);
// Parameter I/O from ASCII files
63
};
64
65
#endif
/* !FAIRPARASCIIFILEIO_H */
FairParAsciiFileIo::open
Bool_t open(const Text_t *fname, const Text_t *status="in")
Definition:
FairParAsciiFileIo.cxx:56
FairParAsciiFileIo::getFile
std::fstream * getFile()
Definition:
FairParAsciiFileIo.cxx:153
FairParAsciiFileIo::FairParAsciiFileIo
FairParAsciiFileIo()
Definition:
FairParAsciiFileIo.cxx:42
FairParAsciiFileIo::check
Bool_t check()
Definition:
FairParAsciiFileIo.h:44
FairParAsciiFileIo::close
void close()
Definition:
FairParAsciiFileIo.cxx:122
FairParIo.h
FairParIo
Definition:
FairParIo.h:19
FairParAsciiFileIo
Definition:
FairParAsciiFileIo.h:18
FairParAsciiFileIo::print
void print()
Definition:
FairParAsciiFileIo.cxx:136
FairParAsciiFileIo::~FairParAsciiFileIo
~FairParAsciiFileIo()
Definition:
FairParAsciiFileIo.cxx:50
FairParAsciiFileIo::file
std::fstream * file
Definition:
FairParAsciiFileIo.h:21
FairRoot
parbase
FairParAsciiFileIo.h
Generated on Mon Mar 8 2021 12:14:06 for FairRoot by
1.8.5