ROOT logo
#ifndef ALI_CDB_PATH_H
#define ALI_CDB_PATH_H

/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/////////////////////////////////////////////////////////////////////
//                                                                 //
//  class AliCDBPath						   //
//  Path string identifying the object:  			   //
//  "level0/level1/level2" 					   //
//  (was: "Detector/DBType/DetSpecType") 		           //
//  (example: "ZDC/Calib/Pedestals") 		         	   //
//                                                                 //
/////////////////////////////////////////////////////////////////////

#include <TObject.h>
#include <TString.h>

class AliCDBPath: public TObject {

  public:

    AliCDBPath();

    AliCDBPath(const AliCDBPath& other);

    AliCDBPath(const char* level0, const char* level1, 
        const char* level2);

    AliCDBPath(const char* path);

    AliCDBPath(const TString& path);

    virtual ~AliCDBPath();


    const TString& GetPath() const {return fPath;}
    void  SetPath(const char* path) {fPath=path; InitPath();}

    const char* GetLevel(Int_t i) const;

    Bool_t IsValid() const {return fIsValid;}

    Bool_t IsWildcard() const {return fIsWildcard;}

    Bool_t Level0Comprises(const TString& str) const;
    Bool_t Level1Comprises(const TString& str) const;
    Bool_t Level2Comprises(const TString& str) const;

    Bool_t Comprises(const AliCDBPath& other) const;

  private:

    Bool_t IsWord(const TString& str);

    void InitPath();

    void Init();

    TString fPath;		// detector pathname (Detector/DBType/SpecType)
    TString fLevel0;	// level0 name (ex. detector: ZDC, TPC...)
    TString fLevel1;	// level1 name (ex. DB type, Calib, Align)
    TString fLevel2;	// level2 name (ex. DetSpecType, pedestals, gain...)

    Bool_t fIsValid;	// validity flag
    Bool_t fIsWildcard;	// wildcard flag

    ClassDef(AliCDBPath, 1); 
};

#endif
 AliCDBPath.h:1
 AliCDBPath.h:2
 AliCDBPath.h:3
 AliCDBPath.h:4
 AliCDBPath.h:5
 AliCDBPath.h:6
 AliCDBPath.h:7
 AliCDBPath.h:8
 AliCDBPath.h:9
 AliCDBPath.h:10
 AliCDBPath.h:11
 AliCDBPath.h:12
 AliCDBPath.h:13
 AliCDBPath.h:14
 AliCDBPath.h:15
 AliCDBPath.h:16
 AliCDBPath.h:17
 AliCDBPath.h:18
 AliCDBPath.h:19
 AliCDBPath.h:20
 AliCDBPath.h:21
 AliCDBPath.h:22
 AliCDBPath.h:23
 AliCDBPath.h:24
 AliCDBPath.h:25
 AliCDBPath.h:26
 AliCDBPath.h:27
 AliCDBPath.h:28
 AliCDBPath.h:29
 AliCDBPath.h:30
 AliCDBPath.h:31
 AliCDBPath.h:32
 AliCDBPath.h:33
 AliCDBPath.h:34
 AliCDBPath.h:35
 AliCDBPath.h:36
 AliCDBPath.h:37
 AliCDBPath.h:38
 AliCDBPath.h:39
 AliCDBPath.h:40
 AliCDBPath.h:41
 AliCDBPath.h:42
 AliCDBPath.h:43
 AliCDBPath.h:44
 AliCDBPath.h:45
 AliCDBPath.h:46
 AliCDBPath.h:47
 AliCDBPath.h:48
 AliCDBPath.h:49
 AliCDBPath.h:50
 AliCDBPath.h:51
 AliCDBPath.h:52
 AliCDBPath.h:53
 AliCDBPath.h:54
 AliCDBPath.h:55
 AliCDBPath.h:56
 AliCDBPath.h:57
 AliCDBPath.h:58
 AliCDBPath.h:59
 AliCDBPath.h:60
 AliCDBPath.h:61
 AliCDBPath.h:62
 AliCDBPath.h:63
 AliCDBPath.h:64
 AliCDBPath.h:65
 AliCDBPath.h:66
 AliCDBPath.h:67
 AliCDBPath.h:68
 AliCDBPath.h:69
 AliCDBPath.h:70
 AliCDBPath.h:71
 AliCDBPath.h:72