Belle II Software development
RawFTSWFormat.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#ifndef RAWFTSWFORMAT_H
10#define RAWFTSWFORMAT_H
11#include <rawdata/dataobjects/RawDataBlockFormat.h>
12
13namespace Belle2 {
25 public:
26
30 //RawFTSWFormat(int* bufin, int nwords);
32 virtual ~RawFTSWFormat();
33
34 /* //! Get # of words in this buffer */
35 /* int GetNwords(int n); */
36
38 virtual int GetNwordsHeader(int n) = 0;
39
41 virtual unsigned int GetFTSWNodeID(int n) = 0;
42
44 virtual unsigned int GetEveNo(int n) = 0;
45
47 virtual unsigned int GetTTCtimeTRGType(int n) = 0;
48
50 virtual unsigned int GetTTUtime(int n) = 0;
51
53 virtual int GetTTCtime(int n) = 0;
54
56 virtual int GetTRGType(int n) = 0;
57
59 virtual void GetTTTimeVal(int n, struct timeval* tv) = 0;
60
62 virtual void GetTTTimeSpec(int n, struct timespec* ts) = 0;
63
65 virtual unsigned long long int GetTTTimeNs(int n) = 0;
66
68 virtual unsigned int GetMagicTrailer(int n) = 0;
69
71 virtual void GetPCTimeVal(int n, struct timeval* tv);
72
73
74
76 virtual void CheckData(int n,
77 unsigned int prev_evenum, unsigned int* cur_evenum,
78 unsigned int prev_exprunsubrun_no, unsigned int* cur_exprunsubrun_no) = 0;
79
81 virtual unsigned int GetExpRunSubrun(int n) = 0;
82
84 virtual int GetRunNo(int n) = 0;
85
87 virtual int GetSubRunNo(int n) = 0;
88
90 virtual int GetRunNoSubRunNo(int n) = 0;
91
93 virtual int GetExpNo(int n) = 0;
94
96 virtual int Get15bitTLUTag(int n);
97
99 virtual int GetIsHER(int n);
100
102 virtual unsigned int GetTimeSinceLastInjection(int n);
103
105 virtual unsigned int GetTimeSincePrevTrigger(int n);
106
108 virtual unsigned int GetBunchNumber(int n);
109
111 virtual unsigned int GetFrameCount(int n);
112
113 protected :
114
115 };
116
118}
119
120#endif
The RawDataBlockFormat class Format information for rawdata handling.
The Raw FTSW class.
Definition: RawFTSWFormat.h:24
virtual int GetIsHER(int n)
HER injection = 1 or LER injection = 0.
virtual unsigned int GetEveNo(int n)=0
Get event #.
virtual void GetPCTimeVal(int n, struct timeval *tv)
Get stored information of getimeofday in a PC.
virtual unsigned int GetFrameCount(int n)
Get a frame count.
virtual unsigned int GetTimeSinceLastInjection(int n)
Get time since the last injection.
RawFTSWFormat()
Default constructor.
virtual int GetTRGType(int n)=0
Get trgtype.
virtual int GetExpNo(int n)=0
Get Exp #.
virtual int GetRunNoSubRunNo(int n)=0
get a word cotaining run # and subrun #
virtual unsigned int GetMagicTrailer(int n)=0
Get magic number for data corruption check.
virtual unsigned long long int GetTTTimeNs(int n)=0
Get time in ns since epoch from ctime and utime.
virtual void CheckData(int n, unsigned int prev_evenum, unsigned int *cur_evenum, unsigned int prev_exprunsubrun_no, unsigned int *cur_exprunsubrun_no)=0
check the data contents
virtual int Get15bitTLUTag(int n)
DESY test only (ver.1)
virtual unsigned int GetExpRunSubrun(int n)=0
Exp# (10bit) run# (14bit) restart # (8bit)
virtual void GetTTTimeSpec(int n, struct timespec *ts)=0
Get timespec from ctime and utime.
virtual int GetTTCtime(int n)=0
Get ctime of the trigger.
virtual ~RawFTSWFormat()
Constructor using existing pointer to raw data buffer.
virtual unsigned int GetTTUtime(int n)=0
get unixtime of the trigger
virtual unsigned int GetTimeSincePrevTrigger(int n)
Get time since the previous trigger.
virtual void GetTTTimeVal(int n, struct timeval *tv)=0
Get timeval from ctime and utime.
virtual unsigned int GetFTSWNodeID(int n)=0
Get Node # ( should be "TTD " )
virtual unsigned int GetTTCtimeTRGType(int n)=0
Get a word containing ctime and trigger type info.
virtual int GetSubRunNo(int n)=0
Get subrun #.
virtual unsigned int GetBunchNumber(int n)
Get a bunch number.
virtual int GetNwordsHeader(int n)=0
Get # of words of header.
virtual int GetRunNo(int n)=0
Get run #.
Abstract base class for different kinds of events.