87 produces< std::vector<triggersim::BasicTrigger> >();
105 std::cout <<
"\n------In my trigger module------\nThe fcl params have been set to :" 107 <<
"\n fRawDigitLabel: " << fRawDigitLabel
108 <<
"\n fOpDetWaveLabel: " << fOpDetWaveLabel
109 <<
"\n-------------------------------\n" 117 std::unique_ptr< std::vector<triggersim::BasicTrigger> > triggers(
new std::vector<triggersim::BasicTrigger>);
120 auto rawdigits =
event.getValidHandle<std::vector<raw::RawDigit> >(
fRawDigitLabel);
121 if ( rawdigits.failedToGet() )
124 std::cout <<
"Let's get some rawdigit stuff...Size " << rawdigits->size() <<
" rawdigits[0]->samples() " << (*rawdigits)[0].Samples() <<
std::endl;
127 auto waveforms =
event.getValidHandle<std::vector<raw::OpDetWaveform> >(
fOpDetWaveLabel);
128 if ( rawdigits.failedToGet() )
138 if (particle->
Process() !=
"primary")
continue;
139 std::cout <<
"-- Particle with TrackID " << particle->
TrackId() <<
", which was a " << particle->
PdgCode() <<
" was a primary and had initial energy " << particle->
E()
147 std::cout <<
"\nLet's trigger on the whole event...." <<
std::endl;
154 triggers->push_back( my_ev_trig );
156 std::cout <<
"I have now left my trigger, it's decision was " << EvTrigDec <<
".\n" <<
std::endl;
161 std::cout <<
"\nLet's trigger on the TPC info...." <<
std::endl;
168 triggers->push_back( my_tpc_trig );
170 std::cout <<
"I have now left my trigger, it's decision was " << TPCTrigDec <<
".\n" <<
std::endl;
175 std::cout <<
"\nLet's trigger on the OpDetWaveform info...." <<
std::endl;
182 triggers->push_back( my_pd_trig );
184 std::cout <<
"I have now left my trigger, it's decision was " << PDTrigDec <<
".\n" <<
std::endl;
190 std::cout <<
"\nLet's trigger on the TPC and OpDetWaveform info...." <<
std::endl;
197 triggers->push_back( my_tpc_pd_trig );
199 std::cout <<
"I have now left my trigger, it's decision was " << TPC_PD_TrigDec <<
".\n" <<
std::endl;
205 std::cout <<
"\nLet's trigger on the triggers I've just made...." <<
std::endl;
212 triggers->push_back( my_trig_trig );
214 std::cout <<
"I have now left my trigger, it's decision was " << Trig_TrigDec <<
".\n" <<
std::endl;
double E(const int i=0) const
unsigned int NumberTrajectoryPoints() const
std::string fRawDigitLabel
bool TriggerOnTPC(std::vector< raw::RawDigit > rawTPC)
void produce(art::Event &event) override
art::ServiceHandle< cheat::ParticleInventoryService > pi_serv
EDProducer(fhicl::ParameterSet const &pset)
bool TriggerOnTriggers(std::vector< triggersim::BasicTrigger > triggerVec)
void reconfigure(fhicl::ParameterSet const &pset)
std::string Process() const
int NumberDaughters() const
TemplateTriggerProd & operator=(TemplateTriggerProd const &)=delete
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
const sim::ParticleList & ParticleList() const
bool TriggerOnTPC_PD(std::vector< raw::RawDigit > rawTPC, std::vector< raw::OpDetWaveform > rawPD)
bool TriggerOnPD(std::vector< raw::OpDetWaveform > rawPD)
TemplateTriggerProd(fhicl::ParameterSet const &pset)
QTextStream & endl(QTextStream &s)
Event finding and building.
const unsigned int kNuBeam
std::string fOpDetWaveLabel
void Configure(fhicl::ParameterSet const &pset)
bool TriggerOnWholeEvent(art::Event &event)