Definition at line 32 of file EventTimeFilter_module.cc.
filter::EventTimeFilter::EventTimeFilter |
( |
fhicl::ParameterSet const & |
pset | ) |
|
|
explicit |
bool filter::EventTimeFilter::filter |
( |
art::Event & |
evt | ) |
|
Definition at line 60 of file EventTimeFilter_module.cc.
64 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time "
65 <<
"filter returning false." << std::endl;
69 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time "
70 <<
"filter returning false." << std::endl;
74 std::cout <<
"Warning: please provide date in format YYYYMMDD, event time "
75 <<
"filter returning false." << std::endl;
81 std::cout <<
"Warning: please provide time in format HHMMSS, event time "
82 <<
"filter returning false." << std::endl;
86 std::cout <<
"Warning: please provide time in format HHMMSS, event time "
87 <<
"filter returning false." << std::endl;
91 std::cout <<
"Warning: please provide time in format HHMMSS, event time "
92 <<
"filter returning false." << std::endl;
97 art::Timestamp evtTime =
evt.time();
99 if (evtTime.timeHigh() == 0) { evtTTS =
new TTimeStamp(evtTime.timeLow()); }
100 else { evtTTS =
new TTimeStamp(evtTime.timeHigh(), evtTime.timeLow()); }
102 std::cout <<
"Event time: " << evtTTS -> AsString() << std::endl;
105 TTimeStamp * ttsLow(
nullptr);
112 std::cout <<
"Warning: No start time given for event time filter, "
113 <<
"assuming 00:00:00" << std::endl;
118 TTimeStamp * ttsHigh(
nullptr);
124 std::cout <<
"Warning: No end time given for event time filter, assuming "
125 <<
"23:59:59" << std::endl;
131 if (ttsLow ==
nullptr && ttsHigh ==
nullptr) {
132 std::cout <<
"Warning: No date range requested for event time filter, "
133 <<
"returning false." << std::endl;
136 else if (ttsLow ==
nullptr) {
137 std::cout <<
"Warning: No lower limit requested for event time filter, "
138 <<
"taking all events before " << ttsHigh -> AsString()
140 if (evtTTS -> GetSec() < ttsHigh -> GetSec()) {
return true; }
141 else {
return false;}
143 else if (ttsHigh ==
nullptr) {
144 std::cout <<
"Warning: No lower limit requested for event time filter, "
145 <<
"taking all events after " << ttsLow -> AsString()
147 if (evtTTS -> GetSec() > ttsLow -> GetSec()) {
return true; }
148 else {
return false;}
151 if (evtTTS -> GetSec() > ttsLow -> GetSec() &&
152 evtTTS -> GetSec() < ttsHigh -> GetSec()) {
return true; }
153 else {
return false; }
BEGIN_PROLOG could also be cout
UInt_t filter::EventTimeFilter::fDateRangeHigh |
|
private |
UInt_t filter::EventTimeFilter::fDateRangeLow |
|
private |
UInt_t filter::EventTimeFilter::fTimeRangeHigh |
|
private |
UInt_t filter::EventTimeFilter::fTimeRangeLow |
|
private |
The documentation for this class was generated from the following file: