All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultiChannelOpticalTriggerGate.h
Go to the documentation of this file.
1 /**
2  * @file sbnobj/ICARUS/PMT/Trigger/Data/MultiChannelOpticalTriggerGate.h
3  * @brief Logical multi-level gate associated to one or more channels.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date April 1, 2019
6  * @see `sbnobj/ICARUS/PMT/Trigger/Data/MultiChannelOpticalTriggerGate.cxx`
7  *
8  */
9 
10 #ifndef SBNOBJ_ICARUS_PMT_TRIGGER_DATA_MULTICHANNELOPTICALTRIGGERGATE_H
11 #define SBNOBJ_ICARUS_PMT_TRIGGER_DATA_MULTICHANNELOPTICALTRIGGERGATE_H
12 
13 
14 // ICARUS libraries
16 #include "sbnobj/ICARUS/PMT/Trigger/Data/SingleChannelOpticalTriggerGate.h" // raw::Channel_t TODO should be moved to OpDetWaveforms
17 
18 // LArSoft libraries
20 
21 // C/C++ standard libraries
22 #include <utility> // std::move()
23 #include <iosfwd> // std::ostream
24 
25 
26 namespace icarus::trigger {
27 
28  class SingleChannelOpticalTriggerGate; // external
29 
30  // ---------------------------------------------------------------------------
31  //
32  // declarations
33  //
34 
35  class MultiChannelOpticalTriggerGate;
36 
37  MultiChannelOpticalTriggerGate sumTriggerGates
38  (std::vector<SingleChannelOpticalTriggerGate> const& gates);
39 
40 
41  // ---------------------------------------------------------------------------
42 
43 } // namespace icarus::trigger
44 
45 
46 //------------------------------------------------------------------------------
47 /**
48  * @brief Logical multi-level gate associated to one or more channels.
49  *
50  * This object is a trigger gate associated with one or more readout channels.
51  * The object contains a single trigger gate, representing the combination of
52  * all involved channels.
53  */
56 {
57 
58  public:
59 
61 
63  : OpticalTriggerGate(gate) {}
65  : OpticalTriggerGate(std::move(gate)) {}
66 
69  { OpticalTriggerGate::operator=(gate); return *this; }
71  { OpticalTriggerGate::operator=(std::move(gate)); return *this; }
72 
73  /// Do not support single-channel interface.
74  ChannelID_t channel() const = delete;
75 
76 }; // class icarus::trigger::MultiChannelOpticalTriggerGate
77 
78 
79 #endif // SBNOBJ_ICARUS_PMT_TRIGGER_DATA_MULTICHANNELOPTICALTRIGGERGATE_H
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
MultiChannelOpticalTriggerGate sumTriggerGates(std::vector< SingleChannelOpticalTriggerGate > const &gates)
MultiChannelOpticalTriggerGate & operator=(OpticalTriggerGate const &gate)
A trigger gate data object for optical detector electronics.
OpticalTriggerGate & operator=(OpticalTriggerGate const &)=default
ChannelID_t channel() const =delete
Do not support single-channel interface.
Logical multi-level gate associated to one or more waveforms.
Logical multi-level gate associated to one or more channels.
GateData_t::ChannelID_t ChannelID_t
Type of channel identifier.
friend std::ostream & operator(std::ostream &, triggergatedata_t const &)
OpticalTriggerGate()=default
Constructor: a closed gate with no associated waveform (add() them).
Logical multi-level gate associated to a optical detector channel.