8#include <dqm/analysis/HistDelta.h>
9#include <dqm/core/DQMHistAnalysis.h>
43 if (currentHist ==
nullptr)
return;
47 m_lastHist = std::unique_ptr<TH1> ((TH1*)(currentHist->Clone()));
48 m_lastHist->SetName(TString(currentHist->GetName()) +
"_last");
53 bool need_update =
false;
77 auto delta = (TH1*)currentHist->Clone();
78 delta->SetName(TString(delta->GetName()) +
"_delta");
109 if (onlyIfUpdated && !
m_updated)
return nullptr;
static int getEventProcessed(void)
Get the number of processed events.
void update(const TH1 *hist)
Check if update of delta histogram is necessary.
EDeltaType m_type
type of delta algo
void set(EDeltaType t, int p, unsigned int a)
Parameter setter.
void reset(void)
Reset histogram and deltas, not the parameters.
std::unique_ptr< TH1 > m_lastHist
Pointer to last histogram state for check.
TH1 * getDelta(unsigned int n=0, bool onlyIfUpdated=true) const
Get Delta Histogram.
std::vector< std::unique_ptr< TH1 > > m_deltaHists
vector of histograms (max m_amountDeltas)
int m_lastValue
last value for comparison, depending on type
unsigned int m_amountDeltas
amount of past histograms, at least 1
int m_parameter
parameter depending on algo, e.g.
HistDelta(EDeltaType t=c_Disabled, int p=0, unsigned int a=0)
Constructor.
EDeltaType
enum definition for delta algo Disabled: nothing Entries: use nr histogram entries Underflow: use ent...
bool m_updated
if any delta was updated in this event
Abstract base class for different kinds of events.