-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathIdPath.h
More file actions
93 lines (68 loc) · 2.12 KB
/
IdPath.h
File metadata and controls
93 lines (68 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#ifndef ALICEO2_CDB_PATH_H_
#define ALICEO2_CDB_PATH_H_
// Path string identifying the object: //
// "level0/level1/level2" //
// (example: "ZDC/Calib/Pedestals") //
#include <TObject.h> // for TObject
#include <TString.h> // for TString
#include "Rtypes.h" // for Bool_t, IdPath::Class, ClassDef, etc
namespace o2
{
namespace ccdb
{
class IdPath : public TObject
{
public:
IdPath();
IdPath(const IdPath& other);
IdPath(const char* level0, const char* level1, const char* level2);
IdPath(const char* path);
IdPath(const TString& path);
~IdPath() override;
const TString& getPathString() const
{
return mPath;
}
void setPath(const char* path)
{
mPath = path;
InitPath();
}
const char* getLevel(Int_t i) const;
Bool_t isValid() const
{
return mValid;
}
Bool_t isWildcard() const
{
return mWildcard;
}
Bool_t doesLevel0Contain(const TString& str) const;
Bool_t doesLevel1Contain(const TString& str) const;
Bool_t doesLevel2Contain(const TString& str) const;
Bool_t isSupersetOf(const IdPath& other) const;
private:
Bool_t isWord(const TString& str);
void InitPath();
void init();
TString mPath; // detector pathname (Detector/DBType/SpecType)
TString mLevel0; // level0 name (ex. detector: ZDC, TPC...)
TString mLevel1; // level1 name (ex. DB type, Calib, Align)
TString mLevel2; // level2 name (ex. DetSpecType, pedestals, gain...)
Bool_t mValid; // validity flag
Bool_t mWildcard; // wildcard flag
ClassDefOverride(IdPath, 1);
};
} // namespace ccdb
} // namespace o2
#endif