ActivityTrigger.h
Go to the documentation of this file.
1 // ActivityTrigger.h
2 //
3 // Karl Warburton
4 // May 2017
5 //
6 // A activity trigger class for the DAQ trigger framework.
7 //
8 
9 #ifndef ActivityTrigger_H
10 #define ActivityTrigger_H
11 
12 // Framework includes
13 #include "lardataobj/RawData/raw.h"
16 
17 // Framework includes for the triggering framework.
20 
21 // C++ includes
22 #include <vector>
23 #include <iostream>
24 #include <string>
25 
26 namespace triggersim {
27  class ActivityTrigger;
28 }
29 
31  public:
32 
33  // The constructor for the ActivityTrigger class.
35 
36  // Destructor...
38 
39  // Pass all of the fcl parameters to the class.
40  void Configure( fhicl::ParameterSet const& pset );
41 
42  // The following is a list of example basic triggering functions which you may want to start from...
43 
44  // An example function for how you could trigger using information from the whole art event.
45  // Using this trigger means that you have the whole set of information which you would have
46  // in the art module which you called it from. However, this is useful to separate the
47  // triggering algorithm from the rest of your code.
49 
50  // An example function for how you could trigger using information from the TPC Raw Digits.
51  // Using this trigger means that you ony have access to the Raw Digits.
52  // You can find the info on these here: http://nusoft.fnal.gov/larsoft/doxsvn/html/classraw_1_1RawDigit.html
53  bool TriggerOnTPC(std::vector< raw::RawDigit> rawTPC);
54 
55  // An example function for how you could trigger using information from the Photon detector OpDetWaveforms
56  // Using this trigger means that you ony have access to the OpDetWaveforms
57  // You can find the info on these here: http://nusoft.fnal.gov/larsoft/doxsvn/html/classraw_1_1OpDetWaveform.html
58  bool TriggerOnPD( std::vector< raw::OpDetWaveform > rawPD );
59 
60  // An example function for how to trigger using both RawDigits and OpDetWaveforms.
61  // Using this trigger will mean that you have access to both RawDigits and OpDetWaveforms.
62  // The methods to access stuff from these can be found in the documentation of the above functions...
63  bool TriggerOnTPC_PD( std::vector< raw::RawDigit> rawTPC, std::vector< raw::OpDetWaveform> rawPD);
64 
65  // An example function for how to trigger using the output of other triggers.
66  // Using this trigger means that you only have access to what is stored in the triggersim::BasicTrigger data product.
67  // The methods to access stuff from these can be found in: dunecore/DAQTriggerSim/TriggerDataProducts/BasicTrigger.h
68  bool TriggerOnTriggers( std::vector<triggersim::BasicTrigger> triggerVec);
69 
70  private:
71 
72  // Parameters:
73  bool fMakeTrig; ///< Boolean which is passed as to whether to even attempt this trigger
74  bool fTrigDecision; ///< did the trigger algorithm decide to keep this event?
75  unsigned int fNumber; ///< Some random number to change.
76 
80 
81 };
82 
83 #endif
bool TriggerOnTPC(std::vector< raw::RawDigit > rawTPC)
std::string string
Definition: nybbler.cc:12
void Configure(fhicl::ParameterSet const &pset)
unsigned int fNumber
Some random number to change.
bool TriggerOnPD(std::vector< raw::OpDetWaveform > rawPD)
bool TriggerOnTPC_PD(std::vector< raw::RawDigit > rawTPC, std::vector< raw::OpDetWaveform > rawPD)
bool fMakeTrig
Boolean which is passed as to whether to even attempt this trigger.
bool TriggerOnWholeEvent(art::Event &event)
bool fTrigDecision
did the trigger algorithm decide to keep this event?
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
Event finding and building.