Belle II Software development
eclDigit.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 <ecl/dataobjects/ECLDigit.h>
9
10#include <gtest/gtest.h>
11
12using namespace std;
13
14namespace Belle2 {
21 class ECLDigitTest : public ::testing::Test {
22 };
23
25 TEST_F(ECLDigitTest, Constructors)
26 {
27 ECLDigit myECLDigit;
28 EXPECT_EQ(myECLDigit.getCellId(), 0);
29 EXPECT_EQ(myECLDigit.getAmp(), 0);
30 EXPECT_EQ(myECLDigit.getTimeFit(), 0);
31 EXPECT_EQ(myECLDigit.getQuality(), 0);
32 } // Testcases for Constructors
33
35 TEST_F(ECLDigitTest, SettersAndGetters)
36 {
37 const int cellId = 1;
38 const int amp = 1;
39 const int timeFit = 1;
40 const int quality = 1;
41
42 ECLDigit myECLDigit;
43 myECLDigit.setCellId(cellId);
44 myECLDigit.setAmp(amp);
45 myECLDigit.setTimeFit(timeFit);
46 myECLDigit.setQuality(quality);
47 EXPECT_EQ(myECLDigit.getCellId(), cellId);
48 EXPECT_EQ(myECLDigit.getAmp(), amp);
49 EXPECT_EQ(myECLDigit.getTimeFit(), timeFit);
50 EXPECT_EQ(myECLDigit.getQuality(), quality);
51 } // Testcases for Setters and Getters
52
54} // namespace
Set up a few arrays and objects in the datastore.
Definition: eclDigit.cc:21
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition: ECLDigit.h:24
int getAmp() const
Get Fitting Amplitude.
Definition: ECLDigit.h:70
int getQuality() const
Get Fitting Quality.
Definition: ECLDigit.h:80
int getCellId() const
Get Cell ID.
Definition: ECLDigit.h:64
void setAmp(int Amp)
Set Fitting Amplitude.
Definition: ECLDigit.h:44
void setTimeFit(int TimeFit)
Set Fitting Time.
Definition: ECLDigit.h:49
void setCellId(int CellId)
Set Cell ID.
Definition: ECLDigit.h:40
void setQuality(int Quality)
Set Fitting Quality.
Definition: ECLDigit.h:54
int getTimeFit() const
Get Fitting Time.
Definition: ECLDigit.h:75
Abstract base class for different kinds of events.
STL namespace.