ATLAS Offline Software
gTETOB.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef L1TopoEvent_gTETOB
4 #define L1TopoEvent_gTETOB
5 
6 #include <iostream>
7 
8 #include "L1TopoEvent/BaseTOB.h"
9 #include "L1TopoEvent/Heap.h"
10 
11 namespace TCS {
12 
13  class gTETOB : public BaseTOB {
14  public:
15 
16  // default constructor
17  gTETOB();
18 
19  // constructor with initial values
20  // input TOB type can be gTE
21  gTETOB(unsigned int sumEt, inputTOBType_t tobType = NONE);
22 
23  // copy constructor
24  gTETOB(const gTETOB & gte);
25 
26  // destructor
27  virtual ~gTETOB();
28 
29  // accessors
30  unsigned int sumEt() const { return m_sumEt; }
31 
32  double sumEtDouble() const { return m_sumEtDouble; }
33 
34  // setters
35  void setSumEt(unsigned int sumEt) { m_sumEt = sumEt; }
36 
38 
39  // memory management
40  static gTETOB* createOnHeap(const gTETOB& gte);
41  static void clearHeap();
42  static const Heap<TCS::gTETOB>& heap() { return fg_heap; }
43 
44  virtual void print(std::ostream &o) const;
45 
47 
48  inputTOBType_t tobType() const { return m_tobType; }
49 
50  private:
51 
52  unsigned int m_sumEt {0};
53 
54  double m_sumEtDouble {0};
55 
57 
58  static thread_local Heap<TCS::gTETOB> fg_heap;
59  };
60 }
61 
62 #endif
Heap.h
TCS::gTETOB::heap
static const Heap< TCS::gTETOB > & heap()
Definition: gTETOB.h:42
TCS::gTETOB::gTETOB
gTETOB(const gTETOB &gte)
BaseTOB.h
TCS::gTETOB::sumEt
unsigned int sumEt() const
Definition: gTETOB.h:30
TCS::gTETOB
Definition: gTETOB.h:13
TCS::Heap< TCS::gTETOB >
TCS::gTETOB::gTETOB
gTETOB()
Definition: gTETOB.cxx:8
TCS::gTETOB::~gTETOB
virtual ~gTETOB()
TCS::BaseTOB
Definition: BaseTOB.h:12
TCS::gTETOB::setSumEtDouble
void setSumEtDouble(double sumEt)
Definition: gTETOB.h:37
TCS::gTETOB::sumEtDouble
double sumEtDouble() const
Definition: gTETOB.h:32
TCS::gTETOB::tobType
inputTOBType_t tobType() const
Definition: gTETOB.h:48
TCS::gTETOB::setSumEt
void setSumEt(unsigned int sumEt)
Definition: gTETOB.h:35
TCS::inputTOBType_t
inputTOBType_t
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::gTETOB::fg_heap
static thread_local Heap< TCS::gTETOB > fg_heap
Definition: gTETOB.h:58
TCS::gTETOB::print
virtual void print(std::ostream &o) const
Definition: gTETOB.cxx:35
TCS
Definition: Global/GlobalSimulation/src/IO/Decision.h:18
TCS::NONE
@ NONE
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/Types.h:10
TCS::gTETOB::createOnHeap
static gTETOB * createOnHeap(const gTETOB &gte)
Definition: gTETOB.cxx:26
TCS::gTETOB::setTobType
void setTobType(inputTOBType_t tobType)
Definition: gTETOB.h:46
TCS::gTETOB::m_tobType
inputTOBType_t m_tobType
Definition: gTETOB.h:56
TCS::gTETOB::m_sumEt
unsigned int m_sumEt
Definition: gTETOB.h:52
TCS::gTETOB::m_sumEtDouble
double m_sumEtDouble
Definition: gTETOB.h:54
TCS::gTETOB::clearHeap
static void clearHeap()
Definition: gTETOB.cxx:31