15 #include <sys/types.h> 24 #include "TTimeStamp.h" 37 #include "art_root_io/TFileService.h" 38 #include "art_root_io/TFileDirectory.h" 75 fSelectedEvents = tfs->make<TH1D>(
"fSelectedEvents",
"Number of Selected Events", 3, 0, 3);
76 fTotalEvents = tfs->make<TH1D>(
"fTotalEvents",
"Total Events", 3, 0, 3);
82 fTimeRanges = p.
get<std::vector <std::pair<UInt_t,UInt_t >>>(
"TimeRanges");
97 MF_LOG_INFO(
"BeamEvent") <<
"Getting Raw Decoder Info" <<
"\n";
103 MF_LOG_INFO(
"BeamEvent") <<
"High: " << RDTS.GetTimeStamp_High() <<
"\n";
104 MF_LOG_INFO(
"BeamEvent") <<
"Low: " << RDTS.GetTimeStamp_Low() <<
"\n";
106 uint64_t high = RDTS.GetTimeStamp_High();
107 uint64_t low = RDTS.GetTimeStamp_Low();
110 uint64_t joined = (high | low);
112 MF_LOG_INFO(
"BeamEvent") <<
"Raw Decoder Timestamp: " << joined <<
"\n";
120 long long RDTSTickSec = (
RDTSTime * 2) / (
int)(TMath::Power(10,8));
121 RDTSTickSec = RDTSTickSec * (
int)(TMath::Power(10,8)) / 2;
147 const std::string myname =
"ProtoDUNEUnstableHVFilter::filter: ";
167 std::cout <<
"Warning: please provide time in POSIX foramt, event time " 168 <<
"filter returning false." <<
std::endl;
176 std::cout <<
"Warning: Lower limit bigger than lower limit " 177 <<
"filter returning false." <<
std::endl;
199 TTimeStamp * ttsLow(
nullptr);
204 TTimeStamp * ttsHigh(
nullptr);
215 if (evtTTS -> GetSec() > ttsLow -> GetSec() &&
216 evtTTS -> GetSec() < ttsHigh -> GetSec()) { keep=
false; }
220 if (
fDebug ) std::cout << myname << (keep ?
"Keep" :
"Reject") <<
"ing event." <<
std::endl;
ProtoDUNEUnstableHVFilter(fhicl::ParameterSet const &)
Handle< PROD > getHandle(SelectorBase const &) const
std::vector< std::pair< UInt_t, UInt_t > > fTimeRanges
art::Handle< std::vector< raw::RDTimeStamp > > RDTimeStampHandle
bool isValid() const noexcept
virtual ~ProtoDUNEUnstableHVFilter()
#define DEFINE_ART_MODULE(klass)
T get(std::string const &key) const
#define MF_LOG_INFO(category)
bool filter(art::Event &evt)
EDFilter(fhicl::ParameterSet const &pset)
const char * AsString(Resonance_t res)
resonance id -> string
void reconfigure(fhicl::ParameterSet const &p)
uint64_t GetRawDecoderInfo(art::Event &e)
QTextStream & endl(QTextStream &s)