EUDAQ
 All Classes Namespaces Files Functions Variables Pages
MetaData.hh
1 
2 #ifndef EUDAQ_INCLUDED_MetaData
3 #define EUDAQ_INCLUDED_MetaData
4 
5 #include <string>
6 #include "eudaq/Platform.hh"
7 #include "eudaq/Serializable.hh"
8 #include "eudaq/BufferSerializer.hh"
9 #include "eudaq/SmartEnum.hh"
10 
11 namespace eudaq {
12 
13  class Deserializer;
14 
15  class DLLEXPORT MetaData : public Serializable {
16  public:
17  DECLARE_ENUM_CLASS(Type, TRIGGER_COUNTER, TRIGGER_TIMESTAMP);
18 
19  MetaData(){};
21 
22  static int GetType(uint64_t meta_data);
23  static void SetType(uint64_t &meta_data, int type);
24  static bool IsTLUBitSet(uint64_t meta_data);
25  static uint64_t GetCounter(uint64_t meta_data);
26  static void SetCounter(uint64_t &meta_data, uint64_t data);
27 
28  void add(bool tlu, int type, uint64_t data);
29  std::vector<uint64_t> &getArray() { return m_metaData; };
30 
31  virtual void Serialize(Serializer &) const;
32 
33  protected:
34  std::vector<uint64_t> m_metaData;
35  };
36 }
37 
38 #endif // EUDAQ_INCLUDED_MetaData
Definition: Serializer.hh:156
Definition: MetaData.hh:15
Definition: Serializable.hh:13
Definition: Serializer.hh:19