30 #include "lbne-raw-data/Overlays/SSPFragment.hh" 31 #include "lbne-raw-data/Overlays/anlTypes.hh" 32 #include "artdaq-core/Data/Fragment.hh" 47 #include "art_root_io/TFileService.h" 48 #include "art_root_io/TFileDirectory.h" 124 mf::LogDebug(
"SSPTriggerAna") <<
"====================================" <<
"\n" 125 <<
"Parameter Set" <<
"\n" 126 <<
"====================================" <<
"\n" 129 <<
"====================================" <<
"\n";
138 fTriggerRateHist = tfs->make<TH1D>(
"triggerratehist",
";Trigger Rate vs OpChannel;Rate (Hz)",116,-10,106);
139 fTriggerRateHistHeaders = tfs->make<TH1D>(
"triggerratehist_headers",
";Trigger Rate vs OpChannel;Rate (Hz)",116,-10,106);
140 fTriggerRateHistWaveforms = tfs->make<TH1D>(
"triggerratehist_waveforms",
";Trigger Rate vs OpChannel;Rate (Hz)",116,-10,106);
191 double freq = ((double)itr->second) / deltaTus * 1e6;
196 double freq = ((double)itr->second) / deltaTus * 1e6;
201 double freq = ((double)itr->second) / deltaTus * 1e6;
229 try { rawFragments->size(); }
231 mf::LogWarning(
"SSPTriggerAna") <<
"WARNING: Raw SSP data not found in event " << evt.
event();
238 <<
", SubRun: " << evt.
subRun()
239 <<
", Event: " << evt.
event()
247 unsigned int numFragments = rawFragments->size();
249 for (
size_t idx = 0; idx < numFragments; ++idx) {
250 const auto& frag((*rawFragments)[idx]);
251 lbne::SSPFragment sspf(frag);
255 const unsigned int* dataPointer = sspf.dataBegin();
258 for (
unsigned int triggersProcessed = 0;
259 (nTriggers==0 || triggersProcessed < nTriggers) && dataPointer < sspf.dataEnd();
260 ++triggersProcessed) {
265 unsigned short OpChannel = -1;
266 unsigned long FirstSample = 0;
284 if (FirstSample < 1e16) {
MaybeLogger_< ELseverityLevel::ELsev_info, true > LogVerbatim
EventNumber_t event() const
SSPTriggerAna & operator=(SSPTriggerAna const &)=delete
std::map< int, long int > triggerCountWaveforms
void beginRun(art::Run const &run) override
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::map< int, long int > triggerCountHeaders
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
EDAnalyzer(fhicl::ParameterSet const &pset)
std::string fRawDataLabel
unsigned long int firstTime
Q_EXPORT QTSManip setprecision(int p)
TH1D * fTriggerRateHistHeaders
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
std::string fOutputDataLabel
Collect all the RawData header files together.
T get(std::string const &key) const
SSPTriggerAna(fhicl::ParameterSet const &pset)
std::map< int, long int > triggerCount
SSPReformatterAlgs sspReform
unsigned long int lastTime
void endRun(art::Run const &run) override
SubRunNumber_t subRun() const
static int max(int a, int b)
Q_EXPORT QTSManip setw(int w)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
void analyze(art::Event const &evt) override
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
void reconfigure(fhicl::ParameterSet const &pset)
auto const & get(AssnsNode< L, R, D > const &r)
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
TH1D * fTriggerRateHistWaveforms