T3.cc
Go to the documentation of this file.
1 #include <utl/AugerException.h>
2 #include <utl/ErrorLogger.h>
3 #include <sevt/T3.h>
4 #include <sstream>
5 
6 using namespace utl;
7 using namespace std;
8 
9 
10 namespace sevt {
11 
12  void
13  T3::AddStation(const int id, const TimeInterval& offset, const TimeInterval& window)
14  {
15  const T3Station s = { id, offset, window };
16  auto it = fParticipants.find(id);
17  if (it == fParticipants.end())
18  fParticipants.insert(make_pair(id, s));
19  else {
20  const auto& st = it->second;
21  if (st.fOffset != offset || st.fWindow != window) {
22  ostringstream err;
23  err << "conflicting reinsertion of station with id = " << id << ": "
24  "offset " << offset << " (" << st.fOffset << "), "
25  "window " << window << " (" << st.fWindow << ')';
26  ERROR(err);
27  throw utl::DoesNotComputeException(err.str());
28  }
29  }
30  }
31 
32 }
constexpr double s
Definition: AugerUnits.h:163
Base class for inconsistency/illogicality exceptions.
Class to hold the trigger information for one station in a T3 (based on the t3stat class)...
Definition: T3.h:46
A TimeInterval is used to represent time elapsed between two events.
Definition: TimeInterval.h:43
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165

, generated on Tue Sep 26 2023.