LDMX Software
Public Member Functions | Public Attributes | List of all members
hcal::HcalAlignPolarfires::PolarfireQueueEntry Struct Reference

Public Member Functions

 PolarfireQueueEntry (const framework::Event &event, const std::string &input_name, const std::string &input_pass, std::pair< int, int > &spill_counter)
 
bool same_event (const PolarfireQueueEntry &rhs)
 
bool earlier_event (const PolarfireQueueEntry &rhs)
 

Public Attributes

int spill
 the i'th spill
 
int ticks
 ticks since spill
 
ldmx::HgcrocDigiCollection digis
 

Detailed Description

Definition at line 27 of file HcalAlignPolarfires.h.

Constructor & Destructor Documentation

◆ PolarfireQueueEntry()

hcal::HcalAlignPolarfires::PolarfireQueueEntry::PolarfireQueueEntry ( const framework::Event event,
const std::string &  input_name,
const std::string &  input_pass,
std::pair< int, int > &  spill_counter 
)

Definition at line 5 of file HcalAlignPolarfires.cxx.

7 {
8 int spilln = event.getObject<int>(input_name + "Spill", input_pass);
9 if (spilln != spill_counter.second) {
10 spill_counter.first++;
11 spill_counter.second = spilln;
12 }
13 spill = spill_counter.first;
14 ticks = event.getObject<int>(input_name + "Ticks", input_pass);
15 digis = event.getObject<ldmx::HgcrocDigiCollection>(input_name, input_pass);
16}
Represents a collection of the digi hits readout by an HGCROC.

Member Function Documentation

◆ earlier_event()

bool hcal::HcalAlignPolarfires::PolarfireQueueEntry::earlier_event ( const PolarfireQueueEntry rhs)
inline

Definition at line 40 of file HcalAlignPolarfires.h.

40 {
41 if (spill == rhs.spill) return ticks < rhs.ticks;
42 return spill < rhs.spill;
43 }

◆ same_event()

bool hcal::HcalAlignPolarfires::PolarfireQueueEntry::same_event ( const PolarfireQueueEntry rhs)
inline

Definition at line 37 of file HcalAlignPolarfires.h.

37 {
38 return (spill == rhs.spill and abs(ticks - rhs.ticks) < max_tick_diff_);
39 }
static int max_tick_diff_
number of 5MHz ticks difference to consider polarfires aligned

Member Data Documentation

◆ digis

ldmx::HgcrocDigiCollection hcal::HcalAlignPolarfires::PolarfireQueueEntry::digis

Definition at line 32 of file HcalAlignPolarfires.h.

◆ spill

int hcal::HcalAlignPolarfires::PolarfireQueueEntry::spill

the i'th spill

Definition at line 29 of file HcalAlignPolarfires.h.

◆ ticks

int hcal::HcalAlignPolarfires::PolarfireQueueEntry::ticks

ticks since spill

Definition at line 31 of file HcalAlignPolarfires.h.


The documentation for this struct was generated from the following files: