3 #include <fwk/CentralConfig.h>
5 #include <det/Detector.h>
7 #include <fdet/FDetector.h>
10 #include <sdet/SDetector.h>
11 #include <sdet/Station.h>
13 #include <evt/Header.h>
14 #include <evt/Event.h>
16 #include <sevt/SEvent.h>
17 #include <sevt/Header.h>
18 #include <sevt/EventTrigger.h>
20 #include <mdet/MDetector.h>
21 #include <mdet/Counter.h>
22 #include <mevt/MEvent.h>
23 #include <mevt/Header.h>
26 #include <fevt/FEvent.h>
28 #include <fevt/EyeHeader.h>
29 #include <fevt/FdComponentSelector.h>
31 #include <utl/ErrorLogger.h>
32 #include <utl/Reader.h>
33 #include <utl/TimeStamp.h>
34 #include <utl/TabularStream.h>
40 using namespace EventCheckerOG;
57 fHaveFDetectorConfig = (
58 det::Detector::GetInstance().GetFDetector().EyesBegin() !=
59 det::Detector::GetInstance().GetFDetector().EyesEnd()
62 if (fHaveFDetectorConfig)
63 INFO(
"FDetector configuration available");
65 INFO(
"FDetector configuration not available, related check disabled");
76 const auto& time =
event.GetHeader().GetTime();
78 if (fSkipTimeZeroEvents && !time) {
79 WARNING(
"Skipping event with zero time.");
80 ++fNEventsWithZeroTime;
86 const auto& sEvent =
event.GetSEvent();
87 for (
const auto& station : sEvent.StationsRange()) {
89 det::Detector::GetInstance().GetSDetector().GetStation(station);
91 WARNING(
"Skipping event with SDetector mismatch.");
92 ++fNEventsWithMissingStations;
99 if (event.
HasFEvent() && fHaveFDetectorConfig) {
100 const auto& fEvent =
event.GetFEvent();
104 det::Detector::GetInstance().GetFDetector().GetEye(*eIt);
107 det::Detector::GetInstance().GetFDetector().GetTelescope(*tIt);
110 WARNING(
"Skipping event with FDetector mismatch.");
111 ++fNEventsWithMissingEyes;
112 return eContinueLoop;
119 const auto& mEvent =
event.GetMEvent();
121 end = mEvent.CountersEnd(); cIt != end; ++cIt) {
123 det::Detector::GetInstance().GetMDetector().GetCounter(cIt->GetId());
125 WARNING(
"Skipping event with MDetector mismatch.");
126 ++fNEventsWithMissingCounters;
127 return eContinueLoop;
141 if (fNEventsProcessed) {
143 const int nDiscarded = fNEventsProcessed - fNEventsAccepted;
148 <<
"Events processed:" <<
endc << fNEventsProcessed <<
endc << 100 <<
endr
149 <<
"Events skiped:" <<
endc << nDiscarded <<
endc << int(nDiscarded*1000./fNEventsProcessed)/10. <<
endr
150 <<
"1980 (time-zero):" <<
endc << fNEventsWithZeroTime <<
endc << int(fNEventsWithZeroTime*1000./fNEventsProcessed)/10. <<
endr
151 <<
"SD station err:" <<
endc << fNEventsWithMissingStations <<
endc << int(fNEventsWithMissingStations*1000./fNEventsProcessed)/10. <<
endr
152 <<
"FD eye err:" <<
endc << fNEventsWithMissingEyes <<
endc << int(fNEventsWithMissingEyes*1000./fNEventsProcessed)/10.
153 <<
endr <<
"MD counter err:" <<
endc << fNEventsWithMissingCounters <<
endc << int(fNEventsWithMissingCounters*1000./fNEventsProcessed)/10.
160 INFO(
"No events processed.");
Branch GetTopBranch() const
InternalCounterCollection::ComponentConstIterator CounterConstIterator
boost::filter_iterator< ComponentSelector, ConstAllEyeIterator > ConstEyeIterator
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Interface class to access to the SD part of an event.
#define INFO(message)
Macro for logging informational messages.
Base class for exceptions trying to access non-existing components.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
class to format data in tabular form
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
ResultFlag
Flag returned by module methods to the RunController.
Detector description interface for SDetector-related data.
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
boost::filter_iterator< ComponentSelector, ConstAllTelescopeIterator > ConstTelescopeIterator