]>
Commit | Line | Data |
---|---|---|
9e1ceb13 | 1 | #ifndef ALI_CDB_PATH_H |
2 | #define ALI_CDB_PATH_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 AliCDBPath // | |
10 | // Path string identifying the object: // | |
11 | // "level0/level1/level2" // | |
12 | // (was: "Detector/DBType/DetSpecType") // | |
13 | // (example: "ZDC/Calib/Pedestals") // | |
14 | // // | |
15 | ///////////////////////////////////////////////////////////////////// | |
16 | ||
17 | #include <TObject.h> | |
18 | #include <TString.h> | |
19 | ||
20 | class AliCDBPath: public TObject { | |
21 | ||
5078a13f | 22 | public: |
9e1ceb13 | 23 | |
5078a13f | 24 | AliCDBPath(); |
9e1ceb13 | 25 | |
5078a13f | 26 | AliCDBPath(const AliCDBPath& other); |
9e1ceb13 | 27 | |
5078a13f | 28 | AliCDBPath(const char* level0, const char* level1, |
29 | const char* level2); | |
9e1ceb13 | 30 | |
5078a13f | 31 | AliCDBPath(const char* path); |
9e1ceb13 | 32 | |
5078a13f | 33 | AliCDBPath(const TString& path); |
9e1ceb13 | 34 | |
5078a13f | 35 | virtual ~AliCDBPath(); |
9e1ceb13 | 36 | |
9e1ceb13 | 37 | |
5078a13f | 38 | const TString& GetPath() const {return fPath;} |
39 | void SetPath(const char* path) {fPath=path; InitPath();} | |
9e1ceb13 | 40 | |
5078a13f | 41 | const char* GetLevel(Int_t i) const; |
9e1ceb13 | 42 | |
5078a13f | 43 | Bool_t IsValid() const {return fIsValid;} |
9e1ceb13 | 44 | |
5078a13f | 45 | Bool_t IsWildcard() const {return fIsWildcard;} |
9e1ceb13 | 46 | |
5078a13f | 47 | Bool_t Level0Comprises(const TString& str) const; |
48 | Bool_t Level1Comprises(const TString& str) const; | |
49 | Bool_t Level2Comprises(const TString& str) const; | |
9e1ceb13 | 50 | |
5078a13f | 51 | Bool_t Comprises(const AliCDBPath& other) const; |
9e1ceb13 | 52 | |
5078a13f | 53 | private: |
9e1ceb13 | 54 | |
5078a13f | 55 | Bool_t IsWord(const TString& str); |
9e1ceb13 | 56 | |
5078a13f | 57 | void InitPath(); |
9e1ceb13 | 58 | |
5078a13f | 59 | void Init(); |
9e1ceb13 | 60 | |
5078a13f | 61 | TString fPath; // detector pathname (Detector/DBType/SpecType) |
62 | TString fLevel0; // level0 name (ex. detector: ZDC, TPC...) | |
63 | TString fLevel1; // level1 name (ex. DB type, Calib, Align) | |
64 | TString fLevel2; // level2 name (ex. DetSpecType, pedestals, gain...) | |
65 | ||
66 | Bool_t fIsValid; // validity flag | |
67 | Bool_t fIsWildcard; // wildcard flag | |
68 | ||
69 | ClassDef(AliCDBPath, 1); | |
9e1ceb13 | 70 | }; |
71 | ||
72 | #endif |