19 #include "RtypesCore.h" 21 #include "TTimeStamp.h" 62 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time " 63 <<
"filter returning false." << std::endl;
67 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time " 68 <<
"filter returning false." << std::endl;
72 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time " 73 <<
"filter returning false." << std::endl;
79 std::cout <<
"Warning: please provide time in format HHMMSS, event time " 80 <<
"filter returning false." << std::endl;
84 std::cout <<
"Warning: please provide time in format HHMMSS, event time " 85 <<
"filter returning false." << std::endl;
89 std::cout <<
"Warning: please provide time in format HHMMSS, event time " 90 <<
"filter returning false." << std::endl;
97 if (evtTime.
timeHigh() == 0) { evtTTS =
new TTimeStamp(evtTime.
timeLow()); }
102 std::cout <<
"Event time: " << evtTTS->AsString() << std::endl;
105 TTimeStamp* ttsLow(
nullptr);
110 std::cout <<
"Warning: No start time given for event time filter, " 111 <<
"assuming 00:00:00" << std::endl;
116 TTimeStamp* ttsHigh(
nullptr);
120 std::cout <<
"Warning: No end time given for event time filter, assuming " 121 <<
"23:59:59" << std::endl;
127 if (ttsLow ==
nullptr && ttsHigh ==
nullptr) {
128 std::cout <<
"Warning: No date range requested for event time filter, " 129 <<
"returning false." << std::endl;
132 else if (ttsLow ==
nullptr) {
133 std::cout <<
"Warning: No lower limit requested for event time filter, " 134 <<
"taking all events before " << ttsHigh->AsString() << std::endl;
135 if (evtTTS->GetSec() < ttsHigh->GetSec()) {
return true; }
140 else if (ttsHigh ==
nullptr) {
141 std::cout <<
"Warning: No lower limit requested for event time filter, " 142 <<
"taking all events after " << ttsLow->AsString() << std::endl;
143 if (evtTTS->GetSec() > ttsLow->GetSec()) {
return true; }
149 if (evtTTS->GetSec() > ttsLow->GetSec() && evtTTS->GetSec() < ttsHigh->GetSec()) {
constexpr std::uint32_t timeLow() const
constexpr std::uint32_t timeHigh() const
bool filter(art::Event &evt)
#define DEFINE_ART_MODULE(klass)
EventTimeFilter(fhicl::ParameterSet const &)
EDFilter(fhicl::ParameterSet const &pset)