23 #ifndef RestCore_TRestDataQualityRules
24 #define RestCore_TRestDataQualityRules
45 Bool_t EvaluateMetadataRule(TString value, TVector2 range);
48 void AddRule(TString type, TString value, TVector2 range, Int_t bit) {
62 inline Int_t GetNumberOfRules()
const {
return fTypes.size(); }
64 std::vector<TString> GetTypes() {
return fTypes; }
66 std::vector<TString> GetValues() {
return fValues; }
68 std::vector<TVector2> GetRanges() {
return fRanges; }
70 std::vector<Int_t> GetBits() {
return fBits; }
72 TString GetType(
unsigned int n) {
79 TString GetValue(
unsigned int n) {
86 TVector2 GetRange(
unsigned int n) {
return (n <
fRanges.size()) ?
fRanges[n] : TVector2(0, 0); }
88 Int_t GetBit(
unsigned int n) {
89 if (
fBits.size() <= n)
A class to define the properties of a rule inside TRestDataQualityRules.
std::vector< TString > fValues
The value of the rule. I.e. observable name, metadata member, ...
std::vector< TString > fTypes
The rule type. I.e. obsAverage, metadata, ...
std::vector< TVector2 > fRanges
The range where it should be found the value of the rule to enable the corresponding bit.
TRestDataQualityRules()
Default constructor.
std::vector< Int_t > fBits
The bit position for the corresponding rule.
~TRestDataQualityRules()
Default destructor.