Belle II Software  release-06-01-15
binnedEventT0.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 <framework/dataobjects/BinnedEventT0.h>
9 #include <gtest/gtest.h>
10 
11 using namespace Belle2;
12 
13 namespace {
14 
16  TEST(BinnedEventT0, Basic)
17  {
18  BinnedEventT0 t0;
19 
20  ASSERT_FALSE(t0.hasBinnedEventT0(Const::SVD));
21  ASSERT_EQ(t0.getBinnedEventT0(Const::SVD), 0);
22 
23  t0.addBinnedEventT0(-10, Const::SVD);
24  ASSERT_TRUE(t0.hasBinnedEventT0(Const::SVD));
25  ASSERT_FALSE(t0.hasBinnedEventT0(Const::CDC));
26  ASSERT_EQ(t0.getBinnedEventT0(Const::SVD), -10);
27  ASSERT_EQ(t0.getBinnedEventT0(Const::CDC), 0);
28 
29  t0.clear();
30  ASSERT_FALSE(t0.hasBinnedEventT0(Const::SVD));
31  ASSERT_EQ(t0.getBinnedEventT0(Const::SVD), 0);
32  }
33 }
Database object for storing a binned EventT0 coming from the trigger.
Definition: BinnedEventT0.h:33
TEST(TestgetDetectorRegion, TestgetDetectorRegion)
Test Constructors.
Abstract base class for different kinds of events.