152 const std::map<std::string, std::vector<MSMeanData*> >&
getMeanData()
const {
197 typedef std::map< IntervalsKey, DetectorFileVec >
Intervals;
202 std::map<SumoXMLTag, NamedObjectCont< MSDetectorFileOutput*> >
myDetectors;
SumoXMLTag
Numbers representing SUMO-XML - element names.
Detectors container; responsible for string and output generation.
void writeOutput(SUMOTime step, bool closing)
Writes the output to be generated within the given time step.
MSDetectorControl(const MSDetectorControl &)
Invalidated copy constructor.
std::pair< SUMOTime, SUMOTime > IntervalsKey
Definition of the interval key (interval, begin)
std::map< IntervalsKey, DetectorFileVec > Intervals
Association of intervals to DetectorFilePair containers.
const NamedObjectCont< MSDetectorFileOutput * > & getTypedDetectors(SumoXMLTag type) const
Returns the list of detectors of the given type.
std::map< IntervalsKey, SUMOTime > myLastCalls
The map that holds the last call for each sample interval.
Intervals myIntervals
Map that hold DetectorFileVec for given intervals.
const std::map< std::string, std::vector< MSMeanData * > > & getMeanData() const
void clearState(SUMOTime step)
Remove all vehicles before quick-loading state.
~MSDetectorControl()
Destructor.
MSDetectorControl & operator=(const MSDetectorControl &)
Invalidated assignment operator.
void updateDetectors(const SUMOTime step)
Computes detector values.
void add(SumoXMLTag type, MSDetectorFileOutput *d, const std::string &device, SUMOTime interval, SUMOTime begin=-1)
Adds a detector/output combination into the containers.
std::vector< DetectorFilePair > DetectorFileVec
Container holding DetectorFilePair (with the same interval).
std::map< std::string, std::vector< MSMeanData * > > myMeanData
List of meanData detectors.
void close(SUMOTime step)
Closes the detector outputs.
const std::vector< SumoXMLTag > getAvailableTypes() const
Returns the list of available detector types.
MSDetectorControl()
Constructor.
std::pair< MSDetectorFileOutput *, OutputDevice * > DetectorFilePair
A pair of a Detector with it's associated file-stream.
NamedObjectCont< MSDetectorFileOutput * > myEmptyContainer
An empty container to return in getTypedDetectors() if no detectors of the asked type exist.
std::map< SumoXMLTag, NamedObjectCont< MSDetectorFileOutput * > > myDetectors
The detectors map, first by detector type, then using NamedObjectCont (.
void addDetectorAndInterval(MSDetectorFileOutput *det, OutputDevice *device, SUMOTime interval, SUMOTime begin=-1)
Adds one of the detectors as a new MSDetectorFileOutput.
Base of value-generating classes (detectors)
Data collector for edges/lanes.
A map of named object pointers.
Static storage of an output device and its base (abstract) implementation.