BaseTriggerService.h
Go to the documentation of this file.
1 // BaseTriggerService.h
2 //
3 // Michael Baird
4 // Feb. 2016
5 //
6 // Base trigger service class for other trigger services to inherit from.
7 
8 #ifndef BaseTriggerService_H
9 #define BaseTriggerService_H
10 
11 #include <memory>
15 
16 //jpd -- needed to allow for triggering on triggers
18 //#ifndef __CLING__
20 //#endif
21 
22 namespace fhicl {
23  class ParameterSet;
24 }
25 
26 namespace art {
27  class ActivityRegistry;
28  class Event;
29 }
30 
31 
33 
34 public:
35 
36  // Destructor:
37  virtual ~BaseTriggerService() = default;
38 
39  // Make your trigger decision.
40  // Can be overridden by the inherited class.
41  //
42  // params:
43  // evt - The ART event, to be sliced and diced as the trigger algorithm
44  // sees fit...
45  virtual bool Trigger(const art::Event&)
46  { return false; }
47 
48  // Make your trigger decision based on TPC info only.
49  // Can be overridden by the inherited class.
50  //
51  // params:
52  // rawTPC - A vector of raw digits, to be sliced and diced as the trigger algorithm
53  // sees fit...
54  virtual bool TPCTrigger(const std::vector<raw::RawDigit>&)
55  { return false; }
56 
57  // Make your trigger decision based on optical (PD) info only.
58  // Can be overridden by the inherited class.
59  //
60  // params:
61  // rawPD - A vector of optical waveforms, to be sliced and diced as the trigger algorithm
62  // sees fit...
63  virtual bool PDTrigger(const std::vector<raw::OpDetWaveform>&)
64  { return false; }
65 
66  // Make your trigger decision based on a mixture of TPC and PD info.
67  // Can be overridden by the inherited class.
68  //
69  // params:
70  // rawTPC - A vector of raw digits, to be sliced and diced as the trigger algorithm
71  // sees fit...
72  // rawPD - A vector of optical waveforms, to be sliced and diced as the trigger algorithm
73  // sees fit...
74  virtual bool TPCPDTrigger(const std::vector<raw::RawDigit>&,
75  const std::vector<raw::OpDetWaveform>&)
76  { return false; }
77 
78 
79  // Make your trigger decision based on a vector of BasicTrigger objects
80  // The idea is that this method triggers on more basic triggers that were run earlier in the chain
81  // Should be overridden by the inherited class
82  //
83  // params:
84  // triggerVec - A vector of BasicTrigger data products, which will have been produced by a lower
85  // level trigger.
86  virtual bool Trigger(const std::vector<triggersim::BasicTrigger>&)
87  { return false; }
88 
89  virtual std::string GetName() = 0;
90 
91 };
92 
93 #ifndef __CLING__
96 #endif
97 
98 #endif
virtual bool Trigger(const art::Event &)
virtual bool TPCTrigger(const std::vector< raw::RawDigit > &)
std::string string
Definition: nybbler.cc:12
Definition: types.h:32
virtual bool PDTrigger(const std::vector< raw::OpDetWaveform > &)
virtual bool TPCPDTrigger(const std::vector< raw::RawDigit > &, const std::vector< raw::OpDetWaveform > &)
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)
virtual bool Trigger(const std::vector< triggersim::BasicTrigger > &)