Belle II Software  release-08-01-10
HistObject.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include "dqm/analysis/HistObject.h"
9 
10 using namespace Belle2;
11 
12 bool HistObject::update(TH1* hist)
13 {
14  if (hist) {
15  // usual check for nullptr
16  m_updated |= hist->GetEntries() != m_entries;
17  m_entries = hist->GetEntries();
18  }
19  m_hist = hist; // even if it is nullptr
20  return m_updated;
21 }
22 
24 {
25  m_hist = nullptr;
26  m_updated = false;
27 }
double m_entries
entries in previous/current for update check
Definition: HistObject.h:25
TH1 * m_hist
Pointer to histogram.
Definition: HistObject.h:23
bool update(TH1 *hist)
Check if update of histogram is necessary.
Definition: HistObject.cc:12
void resetBeforeEvent(void)
Reset histogram and update flag, not the entries.
Definition: HistObject.cc:23
bool m_updated
flag if update since last event
Definition: HistObject.h:24
Abstract base class for different kinds of events.