21#ifdef HAS_RNTUPLE_SUPPORT
22#include "ROOT/RNTupleModel.hxx"
23#include "ROOT/RNTupleWriter.hxx"
24#include "ROOT/RField.hxx"
32#ifdef __USE_DATABASE__
89 UInt_t* buffer, UInt_t num_words)
override;
125 void Scale(Double_t factor)
override {
return;};
145#ifdef HAS_RNTUPLE_SUPPORT
146 using VQwSubsystem::ConstructNTupleAndVector;
147 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString &prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
148 void FillNTupleVector(std::vector<Double_t>& values)
const override;
151#ifdef __USE_DATABASE__
152 void FillDB(QwParityDB *db, TString type)
override;
153 void FillErrDB(QwParityDB *db, TString datatype)
override;
304 return (0x6996 >> v) & 1;
Word-level data manipulation and bit operations.
Virtual base class for parity analysis subsystems.
Command-line and configuration file options processor.
Configuration file parser with flexible tokenization and search capabilities.
A helper class to manage a vector of branch entries for ROOT trees.
Base class for subsystems implementing container-delegation pattern.
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
static void DefineOptions()
Define options function (note: no virtual static functions in C++)
VQwSubsystem(const TString &name)
Constructor with name.
virtual void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values)=0
Construct the branch and tree vector.
void FillTreeVector(QwRootTreeBranchVector &values) const override
Fill the tree vector.
Bool_t CheckForBurpFail(const VQwSubsystem *ev_error) override
Report the number of events failed due to HW and event cut failures.
void SetHelicityBitPattern(TString hex)
void SetHelicityDelay(Int_t delay)
UInt_t GetRandomSeedDelayed()
static const std::vector< UInt_t > kDefaultHelicityBitPattern
void DeaccumulateRunningSum(VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF) override
remove one entry from the running sums for devices
Int_t GetMinPatternPhase()
std::vector< std::pair< Int_t, Int_t > > fWordsPerSubbank
void CheckPatternNum(VQwSubsystem *value)
static const Bool_t kDEBUG
std::vector< QwWord > fWord
Int_t GetMaxPatternPhase()
Bool_t CollectRandBits24()
UInt_t BuildHelicityBitPattern(Int_t patternsize)
VQwSubsystem & operator=(VQwSubsystem *value) override
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
Int_t ProcessConfigurationBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
Int_t fActualPatternPolarity
True polarity of the current pattern.
UInt_t GetRandomSeed(UShort_t *first24randbits)
QwHelicityBase()
Private default constructor (not implemented, will throw linker error on use)
Bool_t IsGoodPatternNumber()
Bool_t fSuppressMPSErrorMsgs
Bool_t IsHelicityIgnored()
Int_t fPatternPhaseOffset
UInt_t GetEventcutErrorFlag() override
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Int_t GetHelicityActual()
unsigned int parity(unsigned int v)
UInt_t GetRandbit24(UInt_t &ranseed)
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
VQwSubsystem & operator+=(VQwSubsystem *value) override
Long_t GetPatternNumber()
virtual UInt_t GetRandbit(UInt_t &ranseed)
UInt_t kEventTypeHelMinus
Int_t fNumMissedEventBlocks
void CalculateRunningAverage() override
Calculate the average for all good events.
Int_t fPreviousPatternPolarity
True polarity of the previous pattern.
Int_t LoadInputParameters(TString pedestalfile) override
Mandatory parameter file definition.
void FillHistograms() override
Fill the histograms for this subsystem.
void IncrementErrorCounters() override
Increment the error counters.
virtual Bool_t CollectRandBits()
std::vector< UInt_t > fHelicityBitPattern
void Scale(Double_t factor) override
void UpdateErrorFlag(const VQwSubsystem *ev_error) override
update the error flag in the subsystem level from the top level routines related to stability checks....
void PrintErrorCounters() const override
virtual void ClearEventData() override
Bool_t IsGoodPhaseNumber()
Int_t GetHelicityReported()
UInt_t GetRandbit30(UInt_t &ranseed)
void SetEventPatternPhase(Int_t event, Int_t pattern, Int_t phase)
UInt_t GetRandomSeedActual()
Int_t fHelicityDecodingMode
Bool_t MatchActualHelicity(Int_t actual)
virtual Bool_t IsGoodHelicity()
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
Construct the branch and tree vector.
size_t fTreeArrayNumEntries
Int_t LoadChannelMap(TString mapfile) override
Mandatory map file definition.
virtual VQwSubsystem & operator-=(VQwSubsystem *value) override
Int_t LoadEventCuts(TString filename) override
Optional event cut file.
static const Int_t kUndefinedHelicity
Int_t fDelayedPatternPolarity
Reported polarity of the current pattern.
Int_t fPatternPhaseNumberOld
Int_t fPatternPhaseNumber
void ConstructBranch(TTree *tree, TString &prefix) override
Construct the branch and tree vector.
Int_t fPatternNumberFirst
void SetFirstBits(UInt_t nbits, UInt_t firstbits)
void SetHistoTreeSave(const TString &prefix)
void ProcessOptions(QwOptions &options) override
Process the command line options.
Int_t ProcessEvBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words)
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware v...
Bool_t Compare(VQwSubsystem *source)
void ClearErrorCounters()
Bool_t ApplySingleEventCuts() override
Apply the single event cuts.
Int_t GetHelicityDelayed()
void MergeCounters(VQwSubsystem *value)
Bool_t IsGoodEventNumber()
Bool_t CollectRandBits30()
void AccumulateRunningSum(VQwSubsystem *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
Update the running sums for devices.
void Ratio(VQwSubsystem *numer, VQwSubsystem *denom) override
virtual ~QwHelicityBase() override
Virtual destructor.
VQwSubsystemParity()
Private default constructor (not implemented, will throw linker error on use)
virtual void FillDB(QwParityDB *, TString)
Fill the database.
virtual void FillErrDB(QwParityDB *, TString)