Belle II Software  release-08-01-10
TOPTriggerDigit.h
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 #pragma once
10 
11 #include <framework/datastore/RelationsObject.h>
12 #include <vector>
13 
14 namespace Belle2 {
24  public:
25 
30  {}
31 
38  TOPTriggerDigit(int moduleID, unsigned channel, unsigned scrodID):
39  m_moduleID(moduleID), m_channel(channel), m_scrodID(scrodID)
40  {}
41 
47  void appendTimeStamp(short timeStamp) {m_timeStamps.push_back(timeStamp);}
48 
53  int getModuleID() const { return m_moduleID; }
54 
59  unsigned getChannel() const { return m_channel; }
60 
65  unsigned getASICChannel() const {return m_channel & 0x07;}
66 
71  unsigned getASICNumber() const {return (m_channel >> 3) & 0x03;}
72 
77  unsigned getCarrierNumber() const {return (m_channel >> 5) & 0x03;}
78 
83  unsigned getBoardstackNumber() const {return (m_channel >> 7) & 0x03;}
84 
89  unsigned getScrodID() const { return m_scrodID; }
90 
95  const std::vector<short>& getTimeStamps() const {return m_timeStamps;}
96 
97  private:
98 
99  int m_moduleID = 0;
100  unsigned m_channel = 0;
101  unsigned m_scrodID = 0;
102  std::vector<short> m_timeStamps;
106  };
107 
109 }
Defines interface for accessing relations of objects in StoreArray.
Class to store trigger time stamps.
unsigned getASICNumber() const
Returns ASIC number.
void appendTimeStamp(short timeStamp)
Append time stamp.
unsigned getCarrierNumber() const
Returns carrier board number.
ClassDef(TOPTriggerDigit, 1)
ClassDef.
unsigned m_scrodID
SCROD ID.
unsigned m_channel
hardware channel number
TOPTriggerDigit(int moduleID, unsigned channel, unsigned scrodID)
Useful constructor.
int getModuleID() const
Returns module ID.
unsigned getASICChannel() const
Returns ASIC channel number.
const std::vector< short > & getTimeStamps() const
Returns time stamps (339MHz clock ticks since the most recent frame9 marker)
std::vector< short > m_timeStamps
time stamps
unsigned getChannel() const
Returns hardware channel number.
unsigned getBoardstackNumber() const
Returns boardstack number.
unsigned getScrodID() const
Returns SCROD ID.
TOPTriggerDigit()
Default constructor.
Abstract base class for different kinds of events.