Belle II Software  release-08-01-10
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"
12 
13 //#include <framework/datastore/RelationVector.h>
14 
15 //using namespace std;
16 using namespace Belle2;
17 
18 void TRGTOPWaveFormTimeStamp::setTimeStamp(int timeStamp) { m_timeStamp = timeStamp ; }
19 void TRGTOPWaveFormTimeStamp::setSlot(int slot) { m_slot = slot ; }
20 
21 bool TRGTOPWaveFormTimeStamp::isEmptyClockCycle() const
22 {
23  if (m_timeStamp == 65535) return true;
24  return false;
25 }
26 
27 bool TRGTOPWaveFormTimeStamp::isValid() const
28 {
29  if (isEmptyClockCycle()) return false;
30  if (m_timeStamp > 46080 || m_timeStamp < 0) return false;
31  return true;
32 }
33 
34 //void TRGTOPWaveFormTimeStamp::set(int ) { m_ = ; }
35 
36 // no longer needed (in ROOT v6)
37 //ClassImp(TRGTOPWaveFormTimeStamp)
38 
39 
40 
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.