]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliCDBDump.h
Removing obsolete data member
[u/mrichter/AliRoot.git] / STEER / AliCDBDump.h
1 #ifndef ALI_CDB_DUMP_H
2 #define ALI_CDB_DUMP_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /////////////////////////////////////////////////////////////////////
8 //                                                                 //
9 //  class AliCDBDump                                               //
10 //  access class to a DataBase in a dump storage (single file)     //
11 //                                                                 //
12 /////////////////////////////////////////////////////////////////////
13
14 #include "AliCDBStorage.h"
15 #include "AliCDBManager.h"
16
17 class TDirectory;
18 class TFile;
19
20 class AliCDBDump: public AliCDBStorage {
21         friend class AliCDBDumpFactory;
22
23 public:
24
25         virtual Bool_t IsReadOnly() const {return fReadOnly;};
26         virtual Bool_t HasSubVersion() const {return kFALSE;};
27         virtual Bool_t Contains(const char* path) const;
28         virtual Int_t GetLatestVersion(const char* path, Int_t run);
29         virtual Int_t GetLatestSubVersion(const char* path, Int_t run, Int_t version=-1);
30         virtual Bool_t IdToFilename(const AliCDBId& id, TString& filename) const;
31
32 protected:
33
34         virtual AliCDBEntry*    GetEntry(const AliCDBId& query);
35         virtual TList*          GetEntries(const AliCDBId& query);
36         virtual Bool_t          PutEntry(AliCDBEntry* entry);
37         virtual TList*          GetIdListFromFile(const char* fileName);
38
39 private:
40
41         AliCDBDump(const AliCDBDump & source);
42         AliCDBDump & operator=(const AliCDBDump & source);
43         AliCDBDump(const char* dbFile, Bool_t readOnly);
44         virtual ~AliCDBDump();  
45
46         Bool_t KeyNameToId(const char* keyname, AliCDBRunRange& runRange,
47                         Int_t& version, Int_t& subVersion);
48         Bool_t IdToKeyName(const AliCDBRunRange& runRange, Int_t version,
49                         Int_t subVersion, TString& keyname);    
50
51         Bool_t MkDir(const TString& dir);
52
53
54         Bool_t PrepareId(AliCDBId& id);
55         Bool_t GetId(const AliCDBId& query, AliCDBId& result);
56
57         virtual void QueryValidFiles();
58
59         void GetEntriesForLevel0(const AliCDBId& query, TList* result);
60         void GetEntriesForLevel1(const AliCDBId& query, TList* result);
61
62         TFile* fFile;           // Dump file
63         Bool_t fReadOnly;       // ReadOnly flag
64
65         ClassDef(AliCDBDump, 0);
66 };
67
68 /////////////////////////////////////////////////////////////////////
69 //                                                                 //
70 //  class AliCDBDumpFactory                                        //
71 //                                                                 //
72 /////////////////////////////////////////////////////////////////////
73
74 class AliCDBDumpFactory: public AliCDBStorageFactory {
75
76 public:
77
78         virtual Bool_t Validate(const char* dbString);
79         virtual AliCDBParam* CreateParameter(const char* dbString);
80
81 protected:
82         virtual AliCDBStorage* Create(const AliCDBParam* param);
83
84         ClassDef(AliCDBDumpFactory, 0);
85 };
86
87 /////////////////////////////////////////////////////////////////////
88 //                                                                 //
89 //  class AliCDBDumpParam                                          //
90 //                                                                 //
91 /////////////////////////////////////////////////////////////////////
92
93 class AliCDBDumpParam: public AliCDBParam {
94
95 public:
96         AliCDBDumpParam();
97         AliCDBDumpParam(const char* dbPath, Bool_t readOnly = kFALSE);
98         
99         virtual ~AliCDBDumpParam();
100
101         const TString& GetPath() const {return fDBPath;};
102         Bool_t IsReadOnly() const {return fReadOnly;};
103
104         virtual AliCDBParam* CloneParam() const;
105
106         virtual ULong_t Hash() const;
107         virtual Bool_t IsEqual(const TObject* obj) const;
108         
109 private:
110
111         TString fDBPath;        // Dump file path name
112         Bool_t fReadOnly;       // ReadOnly flag
113
114         ClassDef(AliCDBDumpParam, 0);
115 };
116
117 #endif