54 if(moduleType ==
"nem")
58 throw FormatException(
"LoaderAntennaProfile loader expects 1 argument");
69 while(posEnd != std::string::npos)
71 posEnd = args[0].find_first_of(
",",posStart);
73 params.push_back(args[0].substr(posStart, posEnd - posStart));
75 posStart = posEnd + 1;
79 double dAntennaAzimuthDegrees{};
80 double dAntennaElevationDegrees{};
84 for(
size_t i = 0; i < params.size(); i++)
107 std::stringstream sstream;
108 sstream<<
"EELEventGenerator: Parameter conversion error. "<<exp.
what()<<std::ends;
114 dAntennaAzimuthDegrees,
115 dAntennaElevationDegrees};
119 std::pair<AntennaProfileEntryMap::iterator,bool> ret =
120 antennaProfileEntryMap_.insert(std::make_pair(moduleId,antennaProfile));
124 ret.first->second = antennaProfile;
128 ret = antennaProfileEntryDeltaMap_.insert(std::make_pair(moduleId,antennaProfile));
132 ret.first->second = antennaProfile;
142 AntennaProfileEntryMap * pCache = 0;
146 pCache = &antennaProfileEntryDeltaMap_;
150 pCache = &antennaProfileEntryMap_;
155 for(
const auto & entry : *pCache)
157 profiles.push_back(entry.second);
160 if(!profiles.empty())
162 eventInfoList.push_back({0,
168 antennaProfileEntryDeltaMap_.clear();
170 return eventInfoList;
std::vector< std::string > InputArguments
#define DECLARE_EEL_LOADER_PLUGIN(X)
Parameter conversion exception class.
std::uint16_t toUINT16(std::uint16_t u16Min=std::numeric_limits< std::uint16_t >::min(), std::uint16_t u16Max=std::numeric_limits< std::uint16_t >::max()) const
double toDouble(double dMin=std::numeric_limits< double >::lowest(), double dMax=std::numeric_limits< double >::max()) const
const char * what() const
std::uint16_t AntennaProfileId
EventInfoList getEvents(EventPublishMode mode) override
void load(const ModuleType &modelType, const ModuleId &moduleId, const EventType &eventType, const InputArguments &args) override
std::list< EventInfo > EventInfoList
Holds NEM Id, antenna profile Id, azimuth and elevation.
Parameter conversion class with range checks.
std::list< AntennaProfile > AntennaProfiles