6 #include <revt/REvent.h>
8 #include <revt/EventTrigger.h>
9 #include <revt/Header.h>
10 #include <revt/Station.h>
12 #include <det/Detector.h>
13 #include <rdet/RDetector.h>
15 #include <utl/ErrorLogger.h>
16 #include <utl/AugerException.h>
20 #include <utl/LameShadowPtr_imp.h>
30 for (
const auto s : fStations)
36 REvent::operator=(
const REvent& rEvent)
38 if (
this != &rEvent) {
39 for (
const auto s : fStations)
44 fStations.insert(make_pair(sIt->GetId(),
new Station(*sIt)));
57 REvent::GetStation(
const int id)
60 const auto sIt = fStations.find(
id);
61 if (sIt != fStations.end() && !sIt->second->IsExcluded())
64 std::ostringstream err;
65 err <<
"Station " <<
id <<
" not present";
72 REvent::GetStationByName(
const string& name)
75 const auto& radioDet = Detector::GetInstance().GetRDetector();
77 for (
auto rdIt = radioDet.StationsBegin(); rdIt != radioDet.StationsEnd(); ++rdIt) {
78 if (rdIt->GetName() == name) {
85 err <<
" Could not find station " << name;
89 return GetStation(stid);
94 REvent::MakeStation(
const int id)
100 if (HasStation(
id)) {
101 std::ostringstream warn;
102 warn <<
"Station " <<
id <<
" already present";
106 fStations.insert(make_pair(
id,
new Station(
id)));
111 REvent::MakeStation(
const string& stationName)
113 const auto& radioDet = Detector::GetInstance().GetRDetector();
115 for (
auto rdIt = radioDet.StationsBegin(); rdIt != radioDet.StationsEnd(); ++rdIt) {
116 if (rdIt->GetName() == stationName) {
117 stid = rdIt->GetId();
123 err <<
"Cannot find station with name " << stationName;
132 REvent::HasStation(
const int id)
135 const auto sIt = fStations.find(
id);
136 return sIt != fStations.end() && !sIt->second->IsExcluded();
141 REvent::HasStation(
const string& name)
144 const auto& radioDet = Detector::GetInstance().GetRDetector();
146 for (
auto rdIt = radioDet.StationsBegin(); rdIt != radioDet.StationsEnd(); ++rdIt) {
147 if (rdIt->GetName() == name) {
148 stid = rdIt->GetId();
154 err <<
"Cannot find station with name " << name;
158 return HasStation(stid);
167 delete it.base()->second;
168 fStations.erase(it.base());
174 REvent::MakeTrigger()
177 ERROR(
"Trigger Object already present - Not replacing");
Interface class to access the Event Trigger (T3)
bool fChannelResponseApplied
#define LAMESHADOWPTR_INST(_T_...)
Interface class to access to the Radio part of an event.
utl::LameShadowPtr< EventTrigger > fTrigger
AllStationIterator AllStationsEnd()
double fAERARootIoEventId
Base class for exceptions trying to access non-existing components.
boost::transform_iterator< InternalStationFunctor, InternalStationIterator, revt::Station & > AllStationIterator
AllStationIterator AllStationsBegin()
std::string fAERARootIoSourceFileName
class to hold data at the radio Station level.
#define WARNING(message)
Macro for logging warning messages.
int GetId() const
Get the station Id.
#define ERROR(message)
Macro for logging error messages.