FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairParIo.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 FAIRPARIO_H
9 #define FAIRPARIO_H
10 
11 #include <Rtypes.h> // for Bool_t, Text_t, etc
12 #include <TObject.h> // for TObject
13 #include <TString.h> // for TString
14 
15 class FairDetParIo;
16 class FairRtdbRun;
17 class TList;
18 
19 class FairParIo : public TObject
20 {
21  protected:
22  TList* detParIoList; // list of detector I/Os
23  Bool_t autoWritable; // flag indicating if automatic write is possible
24  TString filename;
25 
26  public:
27  FairParIo();
28  virtual ~FairParIo();
29  virtual FairDetParIo* getDetParIo(const Text_t*);
30  virtual void setDetParIo(FairDetParIo*);
31  virtual void removeDetParIo(Text_t*);
32  void setInputNumber(Int_t);
33  virtual void close() { ; }
34 
35  // returns the filename
36  const char* getFilename() { return filename.Data(); }
37 
38  // creates input/output class for a special detector and stores pointer
39  // used only for Oracle input/output
40  // (code in class OraIo)
41  virtual void setDetParIo(Text_t*) { ; }
42 
43  // prints information about input/output
44  virtual void print() { ; }
45 
46  // checks if the input/output is open
47  virtual Bool_t check() { return kFALSE; }
48 
49  // reads versions of parameter containers for an event file
50  virtual void readVersions(FairRtdbRun*) { ; }
51 
52  // sets global file pointer in ROOT if input/output is a ROOT-file
53  // (code in FairParRootFileIo)
54  virtual void cd() { ; }
55 
56  // set and get for flag autoWritable
57  void setAutoWritable(Bool_t f = kTRUE) { autoWritable = f; }
58  Bool_t isAutoWritable() { return autoWritable; }
59 
60  private:
61  FairParIo(const FairParIo&);
62  FairParIo& operator=(const FairParIo&);
63 
64  ClassDef(FairParIo, 0); // Base class for all parameter I/Os
65 };
66 
67 #endif /* !FAIRPARIO_H */
void setInputNumber(Int_t)
Definition: FairParIo.cxx:61
virtual void removeDetParIo(Text_t *)
Definition: FairParIo.cxx:78
Bool_t isAutoWritable()
Definition: FairParIo.h:58
virtual Bool_t check()
Definition: FairParIo.h:47
TList * detParIoList
Definition: FairParIo.h:22
TString filename
Definition: FairParIo.h:24
virtual void cd()
Definition: FairParIo.h:54
virtual FairDetParIo * getDetParIo(const Text_t *)
Definition: FairParIo.cxx:71
const char * getFilename()
Definition: FairParIo.h:36
virtual void readVersions(FairRtdbRun *)
Definition: FairParIo.h:50
void setAutoWritable(Bool_t f=kTRUE)
Definition: FairParIo.h:57
virtual void setDetParIo(FairDetParIo *)
Definition: FairParIo.cxx:51
virtual void close()
Definition: FairParIo.h:33
virtual void setDetParIo(Text_t *)
Definition: FairParIo.h:41
virtual void print()
Definition: FairParIo.h:44
virtual ~FairParIo()
Definition: FairParIo.cxx:41
Bool_t autoWritable
Definition: FairParIo.h:23