ATLAS Offline Software
TRIGGERidentity.h
Go to the documentation of this file.
1 /* // -*- C++ -*- */
2 
3 /*
4  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef TRIGGERIDENTITY_H
8 #define TRIGGERIDENTITY_H
9 
10 #include <iostream>
11 #include <sstream>
12 typedef std::ostringstream osstream;
13 
14 #define NTYPE 3
15 #define NTHRESHOLD 3
16 
17 enum TrigType { None, Low, High };
19 
21 private:
22  static const char s_type_tag[NTYPE][8];
23  static const char s_threshold_tag[NTHRESHOLD][7];
24  static const float s_pt_value[NTYPE][NTHRESHOLD];
25 
26 private:
29  bool m_overlap;
30 
31 public:
35 
37  bool operator==(const TRIGGERidentity&) const;
38  bool operator!=(const TRIGGERidentity&) const;
39  bool operator<(const TRIGGERidentity&) const;
40 
41  operator bool();
42  bool operator!();
43 
44  TrigType type(void) const { return m_type; }
45  Threshold threshold(void) const { return m_threshold; }
46  bool overlap(void) const { return m_overlap; }
47  float pt(void) const { return s_pt_value[m_type][m_threshold]; }
48 
49  bool searchForHigh(void) const;
50  bool highest(TrigType) const;
51 
52  void Print(std::ostream&, bool) const;
53 };
54 
55 template <class X> X& operator<<(X& stream, const TRIGGERidentity& data) {
57 
58  data.Print(display, false);
59  stream << display.str();
60  return stream;
61 }
62 
63 #endif
TrigType
TrigType
Definition: TRIGGERidentity.h:17
ThirdTh
@ ThirdTh
Definition: TRIGGERidentity.h:18
TRIGGERidentity::m_threshold
Threshold m_threshold
Definition: TRIGGERidentity.h:28
TRIGGERidentity::operator!
bool operator!()
Definition: TRIGGERidentity.cxx:59
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
TRIGGERidentity
Definition: TRIGGERidentity.h:20
TRIGGERidentity::pt
float pt(void) const
Definition: TRIGGERidentity.h:47
NTYPE
#define NTYPE
Definition: TRIGGERidentity.h:14
TRIGGERidentity::s_pt_value
static const float s_pt_value[NTYPE][NTHRESHOLD]
Definition: TRIGGERidentity.h:24
None
@ None
Definition: TRIGGERidentity.h:17
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
SecondTh
@ SecondTh
Definition: TRIGGERidentity.h:18
TRIGGERidentity::operator!=
bool operator!=(const TRIGGERidentity &) const
Definition: TRIGGERidentity.cxx:39
osstream
std::ostringstream osstream
Definition: TRIGGERidentity.h:12
TRIGGERidentity::Print
void Print(std::ostream &, bool) const
Definition: TRIGGERidentity.cxx:79
TRIGGERidentity::TRIGGERidentity
TRIGGERidentity()
Definition: TRIGGERidentity.cxx:17
operator<<
X & operator<<(X &stream, const TRIGGERidentity &data)
Definition: TRIGGERidentity.h:55
TRIGGERidentity::m_type
TrigType m_type
Definition: TRIGGERidentity.h:27
pyroot.display
display
Definition: pyroot.py:44
TRIGGERidentity::m_overlap
bool m_overlap
Definition: TRIGGERidentity.h:29
TRIGGERidentity::overlap
bool overlap(void) const
Definition: TRIGGERidentity.h:46
Low
@ Low
Definition: TRIGGERidentity.h:17
TRIGGERidentity::s_type_tag
static const char s_type_tag[NTYPE][8]
Definition: TRIGGERidentity.h:22
TRIGGERidentity::s_threshold_tag
static const char s_threshold_tag[NTHRESHOLD][7]
Definition: TRIGGERidentity.h:23
NTHRESHOLD
#define NTHRESHOLD
Definition: TRIGGERidentity.h:15
TRIGGERidentity::highest
bool highest(TrigType) const
Definition: TRIGGERidentity.cxx:61
Threshold
Threshold
Definition: TRIGGERidentity.h:18
High
@ High
Definition: TRIGGERidentity.h:17
TRIGGERidentity::searchForHigh
bool searchForHigh(void) const
Definition: TRIGGERidentity.cxx:71
TRIGGERidentity::operator=
TRIGGERidentity & operator=(const TRIGGERidentity &)
Definition: TRIGGERidentity.cxx:23
TRIGGERidentity::operator==
bool operator==(const TRIGGERidentity &) const
Definition: TRIGGERidentity.cxx:32
TRIGGERidentity::threshold
Threshold threshold(void) const
Definition: TRIGGERidentity.h:45
TRIGGERidentity::type
TrigType type(void) const
Definition: TRIGGERidentity.h:44
xAOD::bool
setBGCode setTAP setLVL2ErrorBits bool
Definition: TrigDecision_v1.cxx:60
FirstTh
@ FirstTh
Definition: TRIGGERidentity.h:18
TRIGGERidentity::operator<
bool operator<(const TRIGGERidentity &) const
Definition: TRIGGERidentity.cxx:41