9 #ifndef ActivityTrigger_CXX 10 #define ActivityTrigger_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 activity 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 activity TPC trigger , fMakeTrig is " <<
fMakeTrig <<
", and (size) fNumber is now " <<
fNumber <<
std::endl;
144 for (
unsigned int Wave=0; Wave < rawPD.size(); ++Wave) {
147 std::cout <<
" Looking at Wave " << Wave <<
" of " << rawPD.size() <<
", it was on channel " << ThisWaveform.
ChannelNumber() <<
", at time " << ThisWaveform.
TimeStamp()
148 <<
", there are " << ThisWaveform.
Waveform().size() <<
" ADCs in this waveform " <<
std::endl;
149 std::vector< short > WaveformVec = ThisWaveform.
Waveform();
150 for (
unsigned int WaveformLoop=0; WaveformLoop < WaveformVec.size(); ++WaveformLoop) {
151 if (WaveformLoop < 5) {
152 std::cout <<
" Element " << WaveformLoop <<
" of " << WaveformVec.size() <<
" has ADC value " << WaveformVec.at(WaveformLoop) <<
std::endl;
177 std::cout <<
" The size of the RawDigits is " << rawTPC.size() <<
", and the size of the OpDetWaveforms is " << rawPD.size() <<
std::endl;
193 std::cout <<
" Looking at TriggerOnTriggers...I currently have " << triggerVec.size() <<
" triggers." <<
std::endl;
194 for (
unsigned int TrigVecLoop=0; TrigVecLoop < triggerVec.size(); ++TrigVecLoop) {
198 std::cout <<
" Looking at Trigger " << TrigVecLoop <<
", TrigDecision " << triggerVec[TrigVecLoop].TrigDecision() <<
", TrigType " << triggerVec[TrigVecLoop].TrigType()
199 <<
", 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.
void Configure(fhicl::ParameterSet const &pset)
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
Signal from induction planes.
unsigned int fNumber
Some random number to change.
T get(std::string const &key) const
size_t NADC() const
Number of elements in the compressed ADC sample vector.
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.
Definition of data types for geometry description.
bool TriggerOnWholeEvent(art::Event &event)
bool fTrigDecision
did the trigger algorithm decide to keep this event?
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
QTextStream & endl(QTextStream &s)
Event finding and building.
Signal from collection planes.