Belle II Software development
TRGTOPWaveFormTimeStamp.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
9#include "trg/top/dataobjects/TRGTOPWaveFormTimeStamp.h"
10
11#include "trg/top/dataobjects/TRGTOPWaveFormTimeStampsSlot.h"
12using namespace Belle2;
13
14void TRGTOPWaveFormTimeStamp::setTimeStamp(int timeStamp) { m_timeStamp = timeStamp ; }
15void TRGTOPWaveFormTimeStamp::setSlot(int slot) { m_slot = slot ; }
16
17bool TRGTOPWaveFormTimeStamp::isEmptyClockCycle() const
18{
19 return (m_timeStamp == 65535);
20}
21
22bool TRGTOPWaveFormTimeStamp::isValid() const
23{
24 if (isEmptyClockCycle()) return false;
25 if (m_timeStamp > 46080 || m_timeStamp < 0) return false;
26 return true;
27}
int m_timeStamp
timestamp value in 1/8 of FTSW clock cycle (conventional "2ns")
int m_slot
slot number (1 through 16)
Abstract base class for different kinds of events.