23#ifndef RestCore_TRestDataQualityProcess
24#define RestCore_TRestDataQualityProcess
26#include "TRestDataQualityRules.h"
27#include "TRestEventProcess.h"
39 std::vector<TRestDataQualityRules>
fRules;
52 Bool_t EvaluateMetadataRule(TString value, TVector2 range);
55 void EnableBit(UInt_t& number, Int_t bitPosition) { number |= (1u << bitPosition); }
58 void DisableBit(UInt_t& number, Int_t bitPosition) { number &= ~(1u << bitPosition); };
60 Bool_t isBitEnabled(UInt_t number, Int_t bitPosition) {
return number & (1u << bitPosition); }
69 void LoadConfig(
const std::string& configFilename,
const std::string& name =
"");
A process to define and store quality numbers.
~TRestDataQualityProcess()
Default destructor.
void EnableBit(UInt_t &number, Int_t bitPosition)
It sets to 1 the bit of number at position bitPosition
std::vector< UInt_t > fQualityNumber
A std::vector of custom quality numbers.
RESTValue GetOutputEvent() const override
Get pointer to output event. Must be implemented in the derived class.
std::vector< TString > fQualityTag
A std::vector of tag names for each quality number.
void EndProcess() override
Function to use when all events have been processed.
void InitFromConfigFile() override
Function reading input parameters from the RML TRestDataQualityProcess section.
void PrintMetadata() override
It prints out the process parameters stored in the metadata structure.
const char * GetProcessName() const override
Returns the name of this process.
TRestDataQualityProcess()
Default constructor.
void InitProcess() override
Function to use in initialization of process members before starting to process the event.
void LoadDefaultConfig()
Function to load the default config in absence of RML input.
void Initialize() override
Function to initialize input/output event members and define the section name and library version.
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
The main processing event function.
void DisableBit(UInt_t &number, Int_t bitPosition)
It sets to 0 the bit of number at position bitPosition
std::vector< TRestDataQualityRules > fRules
A std::vector with the rule definitions for each quality number.
void LoadConfig(const std::string &configFilename, const std::string &name="")
Function to load the configuration from an external configuration file.
TRestEventProcess * Maker()
Returns a new instance of this class.
RESTValue GetInputEvent() const override
Get pointer to input event. Must be implemented in the derived class.
A base class for any REST event process.
A base class for any REST event.