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