LDMX Software
CaloTrigPrim.h
1#ifndef RECON_EVENT_CALOTRIGPRIM_H_
2#define RECON_EVENT_CALOTRIGPRIM_H_
3
4// ldmx-sw
5#include <stdint.h> //uint32_t
6
7// ROOT
8#include "TObject.h" //For ClassDef
9
10namespace ldmx {
11
12// Forward declaration needed by typedef
13class CaloTrigPrim;
14
18typedef std::vector<CaloTrigPrim> CaloTrigPrimCollection;
19
25 public:
32 CaloTrigPrim() = default;
33
43 CaloTrigPrim(uint32_t tid, uint32_t tp = 0);
44
52 virtual ~CaloTrigPrim() = default;
53
61 bool operator<(const CaloTrigPrim &c) { return tid_ < c.tid_; }
62
67 uint32_t getId() const { return tid_; }
68
73 void setPrimitive(uint32_t tp) { tp_ = tp; }
74
79 uint32_t getPrimitive() const { return tp_; }
80
91 friend std::ostream &operator<<(std::ostream &s, const CaloTrigPrim &c);
92
103 friend std::ostream &operator<<(std::ostream &s,
104 const CaloTrigPrimCollection &c);
105
106 private:
108 uint32_t tid_{0};
110 uint32_t tp_{0};
113};
114} // namespace ldmx
115
116#endif // RECON_EVENT_CALOTRIGPRIM_H_
Contains the trigger output for generic calo objects.
friend std::ostream & operator<<(std::ostream &s, const CaloTrigPrim &c)
Stream the input CaloTP.
uint32_t getId() const
Get the id of the CaloTP.
ClassDef(CaloTrigPrim, 2)
ROOT Dictionary class definition macro.
bool operator<(const CaloTrigPrim &c)
Sort the collection of CaloTPs by the raw ID.
CaloTrigPrim()=default
Default Constructor.
virtual ~CaloTrigPrim()=default
Destructor.
uint32_t getPrimitive() const
Get the trigger primitive value for the given channel.
uint32_t tp_
the integer trigger primitive value for this channel
uint32_t tid_
the raw ID for this trigger channel
void setPrimitive(uint32_t tp)
Set the trigger primitive value for the given channel @params[in] tp the value of the trigger primiti...