9 #ifndef TemplateTrigger_CXX 10 #define TemplateTrigger_CXX 44 std::cout <<
"\n------In my trigger class------\nThe fcl params have been set to :" 46 <<
"\n fRawDigLabel: " << fRawDigLabel
47 <<
"\n fOpWaveLabel: " << fOpWaveLabel
48 <<
"\n-------------------------------\n" 61 std::cout <<
" I have just got into my template trigger for event " <<
event.event() <<
", fMakeTrig is " <<
fMakeTrig <<
", and fNumber is now " <<
fNumber <<
std::endl;
64 auto digits =
event.getValidHandle<std::vector<raw::RawDigit> >(
fRawDigLabel);
65 if ( digits.failedToGet() )
69 auto waveforms =
event.getValidHandle<std::vector<raw::OpDetWaveform> >(
fOpWaveLabel);
70 if ( waveforms.failedToGet() )
74 std::cout <<
" The size of digits is " << digits->size() <<
", and the size of wave is " << waveforms->size() <<
std::endl;
77 if (event.
event() < 3) {
99 for (
unsigned int Dig=0; Dig < rawTPC.size(); ++Dig) {
101 int Chan = rawTPC[Dig].Channel();
103 std::cout <<
" Looking at Dig " << Dig <<
" of " << rawTPC.size() <<
", it has " << ThisDig.
Samples() <<
" samples on Channel " << ThisDig.
Channel() <<
" ("<<Chan<<
")" 104 <<
", and " << ThisDig.
NADC() <<
" ADCs with a pedestal of " << ThisDig.
GetPedestal()
106 for (
unsigned int ADCLoop=0; ADCLoop < ThisDig.
NADC(); ++ADCLoop) {
108 std::cout <<
" Looking at ADC " << ADCLoop <<
" of " << ThisDig.
NADC() <<
", it was " << ThisDig.
ADC(ADCLoop) <<
std::endl;
122 std::cout <<
" I have just got into my template TPC trigger , fMakeTrig is " <<
fMakeTrig <<
", and (size) fNumber is now " <<
fNumber <<
std::endl;
146 for (
unsigned int Wave=0; Wave < rawPD.size(); ++Wave) {
149 std::cout <<
" Looking at Wave " << Wave <<
" of " << rawPD.size() <<
", it was on channel " << ThisWaveform.
ChannelNumber() <<
", at time " << ThisWaveform.
TimeStamp()
150 <<
", there are " << ThisWaveform.
Waveform().size() <<
" ADCs in this waveform " <<
std::endl;
151 std::vector< short > WaveformVec = ThisWaveform.
Waveform();
152 for (
unsigned int WaveformLoop=0; WaveformLoop < WaveformVec.size(); ++WaveformLoop) {
153 if (WaveformLoop < 5) {
154 std::cout <<
" Element " << WaveformLoop <<
" of " << WaveformVec.size() <<
" has ADC value " << WaveformVec.at(WaveformLoop) <<
std::endl;
179 std::cout <<
" The size of the RawDigits is " << rawTPC.size() <<
", and the size of the OpDetWaveforms is " << rawPD.size() <<
std::endl;
195 std::cout <<
" Looking at TriggerOnTriggers...I currently have " << triggerVec.size() <<
" triggers." <<
std::endl;
196 for (
unsigned int TrigVecLoop=0; TrigVecLoop < triggerVec.size(); ++TrigVecLoop) {
200 std::cout <<
" Looking at Trigger " << TrigVecLoop <<
", TrigDecision " << triggerVec[TrigVecLoop].TrigDecision() <<
", TrigType " << triggerVec[TrigVecLoop].TrigType()
201 <<
", TrigSubtype " << triggerVec[TrigVecLoop].TrigSubType()
float GetPedestal() const
EventNumber_t event() const
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
Collection of charge vs time digitized from a single readout channel.
bool TriggerOnTPC(std::vector< raw::RawDigit > rawTPC)
short ADC(int i) const
ADC vector element number i; no decompression is applied.
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
ChannelID_t Channel() const
DAQ channel this raw data was read from.
SigType_t SignalType(geo::PlaneID const &pid) const
Returns the type of signal on the channels of specified TPC plane.
art framework interface to geometry description
bool fTrigDecision
did the trigger algorithm decide to keep this event?
unsigned int fNumber
Some random number to change.
Signal from induction planes.
T get(std::string const &key) const
size_t NADC() const
Number of elements in the compressed ADC sample vector.
Definition of data types for geometry description.
bool fMakeTrig
Boolean which is passed as to whether to even attempt this trigger.
bool TriggerOnTPC_PD(std::vector< raw::RawDigit > rawTPC, std::vector< raw::OpDetWaveform > rawPD)
bool TriggerOnPD(std::vector< raw::OpDetWaveform > rawPD)
QTextStream & endl(QTextStream &s)
Event finding and building.
Signal from collection planes.
void Configure(fhicl::ParameterSet const &pset)
bool TriggerOnWholeEvent(art::Event &event)