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
84 void Print() const;
85
96 friend std::ostream &operator<<(std::ostream &s, const CaloTrigPrim &c);
97
108 friend std::ostream &operator<<(std::ostream &s,
109 const CaloTrigPrimCollection &c);
110
111 private:
113 uint32_t tid_{0};
115 uint32_t tp_{0};
118};
119} // namespace ldmx
120
121#endif // RECON_EVENT_CALOTRIGPRIM_H_
Contains the trigger output for generic calo objects.
CaloTrigPrim(uint32_t tid, uint32_t tp=0)
Preferred Constructor.
friend std::ostream & operator<<(std::ostream &s, const CaloTrigPrim &c)
Stream the input CaloTP.
uint32_t getId() const
Get the id of the CaloTP.
void Print() const
Print a description of this object.
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.
ClassDef(CaloTrigPrim, 1)
ROOT Dictionary class definition macro.
friend std::ostream & operator<<(std::ostream &s, const CaloTrigPrimCollection &c)
Stream the input tp collection.
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...