FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairGeoAsciiIo.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 FAIRGEOASCIIIO_H
9 #define FAIRGEOASCIIIO_H
10 
11 #include "FairGeoIo.h" // for FairGeoIo
12 
13 #include <Rtypes.h> // for Bool_t, etc
14 #include <TString.h> // for TString
15 #include <iosfwd> // for fstream
16 
17 class FairGeoSet;
18 class FairGeoMedia;
19 class FairGeoInterface;
20 
25 class FairGeoAsciiIo : public FairGeoIo
26 {
27  TString filename;
28  TString filedir;
29  Bool_t writable;
30  std::fstream* file;
31 
32  public:
34  virtual ~FairGeoAsciiIo();
35  void setDirectory(const char* fDir) { filedir = fDir; }
36  const char* getDirectory() { return filedir.Data(); }
37  const char* getFilename() { return filename.Data(); }
38  Bool_t open(const char*, const Text_t* status = "in");
39  Bool_t isOpen();
40  Bool_t isWritable();
41  void close();
42  void print();
43  Bool_t read(FairGeoMedia*);
44  Bool_t read(FairGeoSet*, FairGeoMedia*);
45  Bool_t write(FairGeoMedia*);
46  Bool_t write(FairGeoSet* set);
49  Bool_t setSimulRefRun(const char*) { return kTRUE; }
50  Bool_t setHistoryDate(const char*) { return kTRUE; }
51 
52  private:
54  FairGeoAsciiIo& operator=(const FairGeoAsciiIo&);
55  ClassDef(FairGeoAsciiIo, 0); // Class for geometry I/O from ASCII file
56 };
57 
58 #endif /* !FAIRGEOASCIIIO_H */
Bool_t readDetectorSetup(FairGeoInterface *)
Bool_t setSimulRefRun(const char *)
Bool_t read(FairGeoMedia *)
Bool_t write(FairGeoMedia *)
virtual ~FairGeoAsciiIo()
const char * getDirectory()
void setDirectory(const char *fDir)
Bool_t readGeomConfig(FairGeoInterface *)
Bool_t setHistoryDate(const char *)
Bool_t open(const char *, const Text_t *status="in")
const char * getFilename()