20#ifdef HAS_RNTUPLE_SUPPORT
21#include "ROOT/RNTupleModel.hxx"
22#include "ROOT/RNTupleWriter.hxx"
23#include "ROOT/RField.hxx"
31#ifdef __USE_DATABASE__
90 UInt_t* buffer, UInt_t num_words)
override;
133 void Scale(Double_t factor)
override {
return;};
153#ifdef HAS_RNTUPLE_SUPPORT
154 using VQwSubsystem::ConstructNTupleAndVector;
155 void ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString &prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
override;
156 void FillNTupleVector(std::vector<Double_t>& values)
const override;
159#ifdef __USE_DATABASE__
160 void FillDB(QwParityDB *db, TString type);
161 void FillErrDB(QwParityDB *db, TString datatype);
176 return ((mask != 0)&&((ioregister & mask) == mask));
332 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.
Int_t LoadEventCuts(TString filename) override
Optional event cut file.
~QwHelicity() override
Virtual destructor.
Bool_t Compare(VQwSubsystem *source)
Int_t fNumMissedEventBlocks
void ConstructBranch(TTree *tree, TString &prefix) override
Construct the branch and tree vector.
Bool_t CheckIORegisterMask(const UInt_t &ioregister, const UInt_t &mask) const
Int_t GetMinPatternPhase()
void SetHelicityBitPattern(TString hex)
void ProcessEventInputRegisterMode()
virtual Bool_t IsGoodHelicity()
void ProcessOptions(QwOptions &options) override
Process the command line options.
unsigned int parity(unsigned int v)
void MergeCounters(VQwSubsystem *value)
Bool_t IsHelicityIgnored()
void SetFirstBits(UInt_t nbits, UInt_t firstbits)
UInt_t GetRandbit30(UInt_t &ranseed)
Int_t GetHelicityDelayed()
Int_t fPatternNumberFirst
Long_t GetPatternNumber()
Int_t fDelayedPatternPolarity
Reported polarity of the current pattern.
VQwSubsystem & operator-=(VQwSubsystem *value) override
void ClearEventData() override
Bool_t CollectRandBits30()
Int_t ProcessConfigurationBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
Int_t fPatternPhaseOffset
Bool_t IsGoodPatternNumber()
Int_t fPatternPhaseNumberOld
Bool_t IsGoodPhaseNumber()
virtual UInt_t GetRandbit(UInt_t &ranseed)
Int_t fPatternPhaseNumber
std::vector< QwWord > fWord
UInt_t GetRandomSeedDelayed()
UInt_t kEventTypeHelMinus
void FillHistograms() override
Fill the histograms for this subsystem.
VQwSubsystem & operator+=(VQwSubsystem *value) override
void SetHelicityDelay(Int_t delay)
static const Int_t kUndefinedHelicity
Int_t LoadInputParameters(TString pedestalfile) override
Mandatory parameter file definition.
void SetHistoTreeSave(const TString &prefix)
virtual Bool_t CollectRandBits()
virtual void ConstructHistograms()
Construct the histograms for this subsystem.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
Construct the branch and tree vector.
UInt_t GetEventcutErrorFlag() override
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
Int_t LoadChannelMap(TString mapfile) override
Mandatory map file definition.
void PrintErrorCounters() const override
Bool_t IsGoodEventNumber()
Int_t fPreviousPatternPolarity
True polarity of the previous pattern.
void DeaccumulateRunningSum(VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF) override
remove one entry from the running sums for devices
Int_t fHelicityDecodingMode
QwHelicity()
Private default constructor (not implemented, will throw linker error on use)
UInt_t fInputReg_HelMinus
UInt_t BuildHelicityBitPattern(Int_t patternsize)
@ kDefaultInputReg_FakeMPS
@ kDefaultInputReg_PatternSync
@ kDefaultInputReg_HelPlus
@ kDefaultInputReg_HelMinus
void CheckPatternNum(VQwSubsystem *value)
Int_t ProcessEvBuffer(const ROCID_t roc_id, const BankID_t bank_id, UInt_t *buffer, UInt_t num_words) override
TODO: The non-event-type-aware ProcessEvBuffer routine should be replaced with the event-type-aware v...
void SetEventPatternPhase(Int_t event, Int_t pattern, Int_t phase)
void FillTreeVector(QwRootTreeBranchVector &values) const override
Fill the tree vector.
void ProcessEventUserbitMode()
Process helicity information from userbit configuration data.
UInt_t GetRandomSeedActual()
void Scale(Double_t factor) override
VQwSubsystem & operator=(VQwSubsystem *value) override
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
void Ratio(VQwSubsystem *numer, VQwSubsystem *denom) override
static const std::vector< UInt_t > kDefaultHelicityBitPattern
UInt_t fInputReg_PairSync
void ClearErrorCounters()
static const Bool_t kDEBUG
Int_t GetHelicityActual()
Bool_t fSuppressMPSErrorMsgs
std::vector< UInt_t > fHelicityBitPattern
UInt_t fInputReg_PatternSync
Bool_t ApplySingleEventCuts() override
Apply the single event cuts.
Bool_t MatchActualHelicity(Int_t actual)
void ProcessEventInputMollerMode()
size_t fTreeArrayNumEntries
void ProcessEvent() override
UInt_t GetRandbit24(UInt_t &ranseed)
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 CalculateRunningAverage() override
Calculate the average for all good events.
Int_t GetMaxPatternPhase()
void AccumulateRunningSum(VQwSubsystem *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
Update the running sums for devices.
std::vector< std::pair< Int_t, Int_t > > fWordsPerSubbank
Bool_t CollectRandBits24()
Bool_t CheckForBurpFail(const VQwSubsystem *ev_error) override
Report the number of events failed due to HW and event cut failures.
void IncrementErrorCounters() override
Increment the error counters.
Int_t GetHelicityReported()
UInt_t GetRandomSeed(UShort_t *first24randbits)
void EncodeEventData(std::vector< UInt_t > &buffer) override
Int_t fActualPatternPolarity
True polarity of the current pattern.
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)