NAIA
1.1.1
include
Containers
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
15
#include "
Containers/OnDemandContainer.h
"
16
#include "
Containers/Utils.h
"
17
18
namespace
NAIA
{
27
class
HeaderData
:
public
TObject {
28
public
:
35
[[nodiscard]]
bool
CheckMask
(
Category
cat)
const
{
return
MatchAllBits
(
m_eventMask
, cat); }
36
42
void
SetMaskCategory
(
Category
cat) {
m_eventMask
|= cat; }
43
49
[[nodiscard]]
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
:
73
Category
m_eventMask
=
Category::None
;
74
75
ClassDef
(
HeaderData
, 1);
76
};
77
86
class
Header
:
public
OnDemandContainer
<Header>,
public
HeaderData
{
87
public
:
88
static
const
std::string
BranchName
;
89
90
Header
() :
HeaderData
(),
OnDemandContainer
() {}
91
};
92
}
// namespace NAIA
93
94
#endif
NAIA::HeaderData::SetMaskCategory
void SetMaskCategory(Category cat)
Set the event mask (used only internally)
Definition:
Header.h:42
NAIA::Header::BranchName
static const std::string BranchName
Definition:
Header.h:88
NAIA::HeaderData::ClassDef
ClassDef(HeaderData, 1)
NAIA
Definition:
Event.h:13
NAIA::HeaderData::m_eventMask
Category m_eventMask
Definition:
Header.h:73
NAIA::HeaderData::RunTag
unsigned int RunTag
The current run tag.
Definition:
Header.h:64
NAIA::OnDemandContainer
Mixin class to add "read-on-demand" behavior to an existing container class.
Definition:
OnDemandContainer.h:44
NAIA::HeaderData::Clear
void Clear()
Clear container content.
Definition:
Header.cpp:9
Utils.h
NAIA::HeaderData::EventNo
unsigned int EventNo
The current event number.
Definition:
Header.h:65
NAIA::HeaderData::CheckMask
bool CheckMask(Category cat) const
Check if event mask contains the given event category.
Definition:
Header.h:35
NAIA::Header::Header
Header()
Definition:
Header.h:90
NAIA::HeaderData
Container class for event Header info.
Definition:
Header.h:27
NAIA::HeaderData::Run
unsigned int Run
The current run.
Definition:
Header.h:63
NAIA::HeaderData::UTCTime
unsigned int UTCTime
UTC time (in seconds) of current event.
Definition:
Header.h:66
NAIA::HeaderData::Dump
void Dump() const
Dump on screen container content.
Definition:
Header.cpp:10
NAIA::Category::None
@ None
NAIA::Category
Category
Definition:
Utils.h:60
NAIA::HeaderData::Mask
Category Mask() const
Get the event Mask.
Definition:
Header.h:49
NAIA::Header
Accessor class for event Header info.
Definition:
Header.h:86
NAIA::MatchAllBits
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
OnDemandContainer.h
OnDemandContainer container class description.
Generated by
1.8.18