NAIA  1.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Header.h
Go to the documentation of this file.
1 
7 #ifndef NAIA_HEADER_H
8 #define NAIA_HEADER_H
9 
10 // gbatch headers
11 #ifdef ENABLE_PRODUCTION_CODE
12 #include "root.h"
13 #endif
14 
16 #include "Containers/Utils.h"
17 
18 namespace NAIA {
27 class HeaderData : public TObject {
28 public:
35  bool CheckMask(Category cat) const { return MatchAllBits(m_eventMask, cat); }
36 
42  void SetMaskCategory(Category cat) { m_eventMask |= cat; }
43 
49  Category Mask() const { return m_eventMask; }
50 
55  void Clear();
56 
61  void Dump() const;
62 
63  unsigned int Run = 0;
64  unsigned int RunTag = 0;
65  unsigned int EventNo = 0;
66  unsigned int UTCTime = 0;
67 
68 #ifdef ENABLE_PRODUCTION_CODE
69  void Fill(AMSEventR *evPtr);
70 #endif
71 
72 private:
74 
75  ClassDef(HeaderData, 1);
76 };
77 
86 class Header : public OnDemandContainer<Header>, public HeaderData {
87 public:
88  static const std::string BranchName;
89 
91 };
92 } // namespace NAIA
93 
94 #endif
void SetMaskCategory(Category cat)
Set the event mask (used only internally)
Definition: Header.h:42
unsigned int Run
The current run.
Definition: Header.h:63
Category m_eventMask
Definition: Header.h:73
OnDemandContainer container class description.
unsigned int RunTag
The current run tag.
Definition: Header.h:64
Category
Definition: Utils.h:60
ClassDef(HeaderData, 1)
void Dump() const
Dump on screen container content.
Definition: Header.cpp:10
Accessor class for event Header info.
Definition: Header.h:86
Container class for event Header info.
Definition: Header.h:27
Mixin class to add &quot;read-on-demand&quot; behavior to an existing container class.
bool CheckMask(Category cat) const
Check if event mask contains the given event category.
Definition: Header.h:35
std::enable_if< EnableBitMaskOperators< Enum >::enable, bool >::type MatchAllBits(const Enum test, const Enum ones, const Enum zeroes=static_cast< Enum >(0))
Definition: bitmask.h:89
unsigned int EventNo
The current event number.
Definition: Header.h:65
static const std::string BranchName
Definition: Header.h:88
Category Mask() const
Get the event Mask.
Definition: Header.h:49
void Clear()
Clear container content.
Definition: Header.cpp:9
unsigned int UTCTime
UTC time (in seconds) of current event.
Definition: Header.h:66