Belle II Software  release-05-01-25
ONSENBinData.h
1 #ifndef _Belle2_ONSENBinData_h
2 #define _Belle2_ONSENBinData_h
3 
4 #include "daq/storage/BinData.h"
5 
6 namespace Belle2 {
12  class ONSENBinData : public BinData {
13 
14  private:
15  struct sose_frame_t {
16  unsigned short start; /* should be 0x5800 (no error), 0xD800 (error) */
17  unsigned short trigger_lo;
18  unsigned short trigger_hi;
19  unsigned short time_tag_lo_and_type;
20  unsigned short time_tag_mid;
21  unsigned short time_tag_hi;
22  unsigned short frame_counter;
23  unsigned int crc32;
24  };
25 
26  public:
27  static const unsigned int MAX_PXD_FRAMES = 256;
28  static const unsigned int MAGIC = 0xBEBAFECA;
29 
30  public:
31  ONSENBinData(void* buf);
32  ~ONSENBinData() throw();
33 
34  public:
35  unsigned int getTrigger() const;
36  unsigned int getTimetag() const;
37  unsigned int getTriggerType() const;
38  unsigned int getEventNumber() const;
39  unsigned int getFrameNumber() const;
40  unsigned int getFrameByteSize() const;
41  unsigned int getONSENMagic() const;
42 
43  private:
44  unsigned int* m_magic;
45  unsigned int* m_framenr;
46  unsigned int* m_length_of_frame;
47  mutable sose_frame_t* m_start_frame;
48 
49  };
50 
52 }
53 
54 #endif
Belle2::ONSENBinData::sose_frame_t
Definition: ONSENBinData.h:15
Belle2::ONSENBinData
Definition: ONSENBinData.h:12
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BinData
Definition: BinData.h:26