Belle II Software  release-08-01-10
ECLCrystalLocalRunCalib.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 // ECL
9 #include <ecl/dbobjects/ECLCrystalLocalRunCalib.h>
10 using namespace Belle2;
11 // Constructor.
14  c_isNegAmpl(isNegAmpl),
15  m_exp(0), m_run(0),
16  m_numberOfEvents(0)
17 {
18 }
19 // Destructor.
21 {
22 }
23 // Set total number of events.
24 void ECLCrystalLocalRunCalib::setNumberOfEvents(const int& numberOfEvents)
25 {
26  m_numberOfEvents = numberOfEvents;
27 }
28 // Set numbers of accepted events for each cell id.
30  const std::vector<int>& numberOfAcceptedEvents)
31 {
32  m_numberOfAcceptedEvs = numberOfAcceptedEvents;
33 }
34 // Get total number of events.
36 {
37  return m_numberOfEvents;
38 }
39 // Get numbers of accepted events.
41 {
42  return m_numberOfAcceptedEvs;
43 }
44 // Set experiment and run numbers.
45 void
46 ECLCrystalLocalRunCalib::setExpRun(const int& exp, const int& run)
47 {
48  m_exp = exp;
49  m_run = run;
50 }
51 // Get experiment number.
53 {
54  return m_exp;
55 }
56 // Get run number.
58 {
59  return m_run;
60 }
61 // Check presence of negative amplitudes.
63 {
64  return c_isNegAmpl;
65 }
General DB object to store one calibration number per ECL crystal.
ECLCrystalLocalRunCalib(bool isNegAmpl=false)
Constructor.
std::vector< int > m_numberOfAcceptedEvs
Numbers of accepted events for each cell id.
const std::vector< int > & getNumbersOfAcceptedEvents() const
Get numbers of accepted events for each cell id.
void setNumberOfEvents(const int &numberOfEvents)
Set total number of events.
bool c_isNegAmpl
In the case of time payload c_isNegAmpl is always false.
int getNumberOfEvents() const
Get number of events.
void setExpRun(const int &exp, const int &run)
Set experiment number and run number.
int m_numberOfEvents
Total number of events.
int getExp() const
Get experiment number.
void setNumbersOfAcceptedEvents(const std::vector< int > &numberOfAcceptedEvents)
Set number of accepted events for each cell id.
bool isNegAmpl() const
In case if the amplitude payload: check is there are negative amplitudes.
Abstract base class for different kinds of events.