35 ProtoDUNETriggerFilter::ProtoDUNETriggerFilter::ProtoDUNETriggerFilter(
fhicl::ParameterSet const & pset)
39 const std::string myname =
"ProtoDUNETriggerFilter::ctor: ";
41 std::vector<unsigned int> defaulttriglist;
42 defaulttriglist.push_back(0xc);
44 std::vector<unsigned int> emptylist;
53 cout << myname <<
" TimingFlagSelectList: [";
56 if ( first ) first =
false;
61 cout << myname <<
" TimingFlagDeselectList: [";
64 if ( first ) first =
false;
69 cout << myname <<
" TimingLabel: " << fTimingLabel <<
endl;
70 cout << myname <<
" TimingInstance: " << fTimingInstance <<
endl;
71 cout << myname <<
" TriggerLabel: " << fTriggerLabel <<
endl;
72 cout << myname <<
" TriggerInstance: " << fTriggerInstance <<
endl;
79 const std::string myname =
"ProtoDUNETriggerFilter::filter: ";
86 if ( keep && checkTriggerFlag ) {
89 auto htims = evt.
getHandle<std::vector<raw::RDTimeStamp>>(itag1);
93 if ( ! htims.isValid() ) {
94 std::cout << myname <<
"WARNING: Timing clocks product not found." <<
std::endl;
95 if (
fLogLevel >=2 ) stinfo =
"Timing clocks product not found.";
96 }
else if ( htims->size() != 1 ) {
97 std::cout << myname <<
"WARNING: Unexpected timing clocks size: " << htims->size() <<
std::endl;
98 if (
fLogLevel >=2 ) stinfo =
"Unexpected timing clocks size.";
99 for (
unsigned int itim=0; itim<htims->size() && itim<50; ++itim ) {
100 std::cout << myname <<
" " << htims->at(itim).GetTimeStamp() <<
std::endl;
106 unsigned int trigFlag = tim.
GetFlags();
114 if ( flg == trigFlag) keep =
true;
121 if ( flg == trigFlag ) keep =
false;
127 if (
fLogLevel >=2 ) std::cout << myname << (keep ?
"Keep" :
"Reject") <<
"ing event " << evt.
event()
128 <<
". " << stinfo <<
endl;
EventNumber_t event() const
uint16_t GetFlags() const
Handle< PROD > getHandle(SelectorBase const &) const
std::vector< unsigned int > fTimingFlagSelectList
std::string fTriggerLabel
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
std::string fTriggerInstance
ProtoDUNETriggerFilter(fhicl::ParameterSet const &pset)
virtual ~ProtoDUNETriggerFilter()
std::vector< unsigned int > fTimingFlagDeselectList
EDFilter(fhicl::ParameterSet const &pset)
virtual bool filter(art::Event &e)
std::string to_string(ModuleType const mt)
std::string fTimingInstance
QTextStream & endl(QTextStream &s)