 |
Belle II Software
release-05-01-25
|
20 #include <background/modules/BeamBkgHitRateMonitor/HitRateBase.h>
21 #include <klm/dataobjects/KLMDigit.h>
22 #include <klm/dataobjects/KLMElementNumbers.h>
23 #include <klm/dataobjects/KLMModuleArrayIndex.h>
24 #include <framework/database/DBObjPtr.h>
25 #include <framework/datastore/StoreArray.h>
26 #include <klm/dbobjects/KLMChannelStatus.h>
34 namespace Background {
39 class KLMHitRateCounter:
public HitRateBase {
88 virtual void clear()
override;
94 virtual void accumulate(
unsigned timeStamp)
override;
100 virtual void normalize(
unsigned timeStamp)
override;
108 std::map<unsigned, TreeStruct>
m_buffer;
bool valid
Whether the rates are valid.
StoreArray< KLMDigit > m_digits
KLM digits.
TreeStruct m_rates
Tree data.
virtual void initialize(TTree *tree) override
Class initializer.
float moduleRates[KLMElementNumbers::getTotalModuleNumber()]
Hit rates in each module.
static constexpr int getTotalModuleNumber()
Get total number of modules.
virtual void normalize(unsigned timeStamp) override
Normalize accumulated hits (i.e.
Class for accessing objects in the database.
const KLMElementNumbers * m_ElementNumbers
KLM element numbers.
int numEvents
Number of accumulated events.
Abstract base class for different kinds of events.
virtual void accumulate(unsigned timeStamp) override
Accumulate hits.
KLMHitRateCounter()
Constructor.
DBObjPtr< KLMChannelStatus > m_ChannelStatus
KLM channel status.
float averageRate
Total detector average hit rate.
void normalize()
Normalize accumulated hits to single event.
virtual void clear() override
Clear time-stamp buffer to prepare for 'accumulate'.
const KLMModuleArrayIndex * m_ModuleArrayIndex
KLM module array index.
Accessor to arrays stored in the data store.
std::map< unsigned, TreeStruct > m_buffer
Buffer.