2 #include <utl/ErrorLogger.h>
3 #include <utl/TabularStream.h>
4 #include <utl/TimeStamp.h>
6 #include <evt/ShowerSimData.h>
8 #include <sevt/SEvent.h>
11 #include <det/Detector.h>
12 #include <sdet/SDetector.h>
13 #include <sdet/Station.h>
23 namespace DummyCentralTriggerNS {
28 INFO(
"DummyCentralTrigger::Init()");
38 INFO(
"DummyCentralTrigger::Run()");
42 auto& sEvent =
event.GetSEvent();
46 const auto& simShower =
event.GetSimShower();
49 const auto& trigTime = simShower.GetTimeStamp();
54 info <<
"Dummy T3 trigger, "
55 "reference time " << trigTime <<
" "
56 "(" << trigTime.GetGPSSecond() <<
" s, " << int(trigTime.GetGPSNanoSecond()/1e3) <<
" us)" <<
'\n';
60 <<
"station" <<
endc <<
"offset" <<
endc <<
"energy" <<
endr
62 const auto& sDetector = det::Detector::GetInstance().GetSDetector();
63 for (
const auto&
s : sDetector.StationsRange()) {
64 tab <<
s.GetId() <<
' ' <<
endc
65 <<
' ' << fDefaultOffset <<
' ' <<
endc
66 <<
" !w" << fDefaultWindow <<
endr;
67 simT3.
AddStation(
s.GetId(), fDefaultOffset, fDefaultWindow);
73 if (!sEvent.HasSimData())
75 sEvent.GetSimData().AddT3(simT3);
82 DummyCentralTrigger::Finish()
84 INFO(
"DummyCentralTrigger::Finish()");
void SetAlgorithm(const std::string &algo)
Set the trigger algorithm.
This class contains the basic information to build a surface event.
void SetTime(const utl::TimeStamp &stamp)
Set the trigger time stamp.
bool HasSimShower() const
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
#define DEBUGLOG(message)
Macro for logging debugging messages.
class to format data in tabular form
A TimeInterval is used to represent time elapsed between two events.
ResultFlag
Flag returned by module methods to the RunController.
constexpr double microsecond
void AddStation(const int id, const utl::TimeInterval &offset, const utl::TimeInterval &window)
Add a station to request data, specifying offset and window size.