41 if(modtype !=
"WORD") {
47 QwVerbose <<
"Registering " << modtype <<
" " << name
51 <<
" at mod " << modnum <<
", chan " << channum
53 fWords.emplace_back(
QwWord{subbank, 0, modtype, name,
"", -1} );
87 return q1.fValue == q2.fValue;
107 return q1.fValue == q2.fValue;
123 UInt_t words_read = 0;
127 if (subbank >= 0 && num_words > 0) {
129 for(std::size_t i = 0; i <
fWords.size(); i++)
130 fWords[i].fValue = buffer[i];
131 words_read = num_words;
213 if (TRegexp(
"diff_").Index(prefix,&len) == 0
214 || TRegexp(
"asym[1-9]+_").Index(prefix,&len) == 0
215 || TRegexp(
"yield_").Index(prefix,&len) == 0)
217 else if (TRegexp(
"asym").Index(prefix,&len) == 0)
227 for (
size_t i=0; i<
fWords.size(); i++) {
228 TString basename =
fWords[i].fWordName;
240 for (
auto& word :
fWords){
241 values.
SetValue(index++, word.fValue);
246#ifdef HAS_RNTUPLE_SUPPORT
247void QwScanData::ConstructNTupleAndVector(std::unique_ptr<ROOT::RNTupleModel>& model, TString& prefix, std::vector<Double_t>& values, std::vector<std::shared_ptr<Double_t>>& fieldPtrs)
252 for (
auto const& word :
fWords) {
253 TString basename = word.fWordName;
254 values.push_back(0.0);
255 fieldPtrs.push_back(model->MakeField<Double_t>(basename.Data()));
260void QwScanData::FillNTupleVector(std::vector<Double_t>& values)
const
264 for (
auto& word :
fWords){
265 values[index++] = word.fValue;
286 QwWarning <<
"ScanData Word already Set! " <<
'\n';
ROOT file and tree management wrapper classes.
#define QwVerbose
Predefined log drain for verbose messages.
#define QwError
Predefined log drain for errors.
#define QwWarning
Predefined log drain for warnings.
static std::ostream & endl(std::ostream &)
End of the line.
Configuration file parser with flexible tokenization and search capabilities.
T GetTypedNextToken()
Get next token into specific type.
void TrimWhitespace(TString::EStripType head_tail=TString::kBoth)
void SetCommentChars(const std::string value)
Set various sets of special characters.
void TrimComment(const char commentchar)
const std::pair< TString, TString > GetParamFileNameContents()
A helper class to manage a vector of branch entries for ROOT trees.
size_type size() const noexcept
std::string LeafList(size_type start_index=0) const
void push_back(const std::string &name, const char type='D')
void SetValue(size_type index, Double_t val)
Word-level data manipulation and bit operations.
BankID_t fCurrentBank_ID
Bank ID (and Marker word) that is currently being processed;.
Int_t GetSubbankIndex() const
Bool_t Compare(VQwSubsystem *source)
virtual VQwSubsystem & operator=(VQwSubsystem *value)
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
void RegisterRocBankMarker(QwParameterFile &mapstr)
virtual void ClearEventData()=0
std::map< TString, TString > fDetectorMaps
Map of file name to full path or content.
VQwSubsystem(const TString &name)
Constructor with name.
ROCID_t fCurrentROC_ID
ROC ID that is currently being processed.
void PrintErrorCounters() const override
void ProcessEvent() override
void Ratio(VQwSubsystem *numer, VQwSubsystem *denom) override
void IncrementErrorCounters() override
Increment the error counters.
VQwSubsystem & operator+=(VQwSubsystem *value) override
void Scale(Double_t factor) override
void CalculateRunningAverage() override
Calculate the average for all good events.
void SetSaveType(TString const &prefix)
VQwSubsystem & operator=(VQwSubsystem *value) override
Assignment Note: Must be called at the beginning of all subsystems routine call to operator=(VQwSubsy...
UInt_t GetEventcutErrorFlag() override
Return the error flag to the top level routines related to stability checks and ErrorFlag updates.
void ConstructBranchAndVector(TTree *tree, TString &prefix, QwRootTreeBranchVector &values) override
Construct the branch and tree vector.
Int_t LoadChannelMap(TString mapfile) override
Mandatory map file definition.
Bool_t ApplySingleEventCuts() override
Apply the single event cuts.
void FillTreeVector(QwRootTreeBranchVector &values) const override
Fill the tree vector.
void AccumulateRunningSum(VQwSubsystem *value, Int_t count=0, Int_t ErrorMask=0xFFFFFFF) override
Update the running sums for devices.
std::vector< QwWord > fWords
void SetCleanDataIndex(Int_t index)
CleanDataIndex fCleanDataIndex
bool SetCleanData(CleanDataVal clean_flag)
void DeaccumulateRunningSum(VQwSubsystem *value, Int_t ErrorMask=0xFFFFFFF) override
remove one entry from the running sums for devices
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 ClearEventData() override
bool CheckCleanDataIndex() const
VQwSubsystem & operator-=(VQwSubsystem *value) override
Bool_t CheckForBurpFail(const VQwSubsystem *subsys) override
Report the number of events failed due to HW and event cut failures.
QwScanData(TString const &name)
static char const *const fCleanWordName
bool operator==(CleanDataIndex const &other) const
VQwSubsystemParity()
Private default constructor (not implemented, will throw linker error on use)
virtual UInt_t UpdateErrorFlag()
Uses the error flags of contained data elements to update Returns the error flag to the top level rou...