fr.cnes.sirius.patrius.events.multi
Class MultiCodedEventsLogger

java.lang.Object
  extended by fr.cnes.sirius.patrius.events.multi.MultiCodedEventsLogger

public class MultiCodedEventsLogger
extends Object

This class is copied from CodedEventsLogger and adapted to multi propagation.

This class logs coded events during multi propagation. It is based on the MultiEventsLogger class in Patrius.

This class works by wrapping user-provided MultiCodingEventDetector before they are registered to the multi propagator. The wrapper monitors the calls to eventOccurred and store the corresponding events as MultiCodedEventsLogger.MultiLoggedCodedEvent instances. After propagation is complete, the user can retrieve all the events that have occurred at once by calling methods getCodedEventsList() or getLoggedCodedEventSet().

Since:
3.0
Version:
$Id: MultiCodedEventsLogger.java 17586 2017-05-10 13:29:16Z bignon $
Author:
maggioranic
See Also:
MultiEventsLogger, MultiCodingEventDetector
Concurrency :
not thread-safe
Concurrency comment :
no thread-sharing use case was identified for this class, so thread safety is not required.

Nested Class Summary
static class MultiCodedEventsLogger.MultiLoggedCodedEvent
          This class is used to store the coded event with contextual information.
 
Constructor Summary
MultiCodedEventsLogger()
          Default constructor.
 
Method Summary
 Map<MultiCodingEventDetector,CodedEventsList> buildCodedEventListMap()
          Builds a map of CodedEventsList, one list per MultiCodingEventDetector instance.
 Map<MultiCodingEventDetector,PhenomenaList> buildPhenomenaListMap(AbsoluteDateInterval definitionInterval, Map<String,SpacecraftState> duringState)
          Builds a map of PhenomenaList, one list per MultiCodingEventDetector instance.
 CodedEventsList getCodedEventsList()
          Gets the CodedEventsList.
 SortedSet<MultiCodedEventsLogger.MultiLoggedCodedEvent> getLoggedCodedEventSet()
          Returns an unmodifiable view on the set of MultiCodedEventsLogger.MultiLoggedCodedEvent, sorted by date.
 MultiEventDetector monitorDetector(MultiCodingEventDetector detector)
          Takes a MultiCodingEventDetector instance and returns an MultiEventDetector instance that will trigger this MultiCodedEventsLogger every time eventOccurred is called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiCodedEventsLogger

public MultiCodedEventsLogger()
Default constructor.

Method Detail

monitorDetector

public MultiEventDetector monitorDetector(MultiCodingEventDetector detector)
Takes a MultiCodingEventDetector instance and returns an MultiEventDetector instance that will trigger this MultiCodedEventsLogger every time eventOccurred is called. The returned MultiEventDetector is meant to be provided to a propagator.

Parameters:
detector - the wrapped MultiCodingEventDetector
Returns:
a wrapper for the parameter, as an MultiEventDetector.

getCodedEventsList

public CodedEventsList getCodedEventsList()
Gets the CodedEventsList. This method can be called after propagation to get the list of detected events.

Returns:
the CodedEventsList.

getLoggedCodedEventSet

public SortedSet<MultiCodedEventsLogger.MultiLoggedCodedEvent> getLoggedCodedEventSet()
Returns an unmodifiable view on the set of MultiCodedEventsLogger.MultiLoggedCodedEvent, sorted by date.

Returns:
the set.

buildCodedEventListMap

public Map<MultiCodingEventDetector,CodedEventsList> buildCodedEventListMap()
Builds a map of CodedEventsList, one list per MultiCodingEventDetector instance.

The map may be empty if no MultiCodingEventDetector was added to the logger.

Returns:
the map. May be empty, if no MultiCodingEventDetector was added.

buildPhenomenaListMap

public Map<MultiCodingEventDetector,PhenomenaList> buildPhenomenaListMap(AbsoluteDateInterval definitionInterval,
                                                                         Map<String,SpacecraftState> duringState)
                                                                  throws OrekitException
Builds a map of PhenomenaList, one list per MultiCodingEventDetector instance.

The map may be empty if no MultiCodingEventDetector was added to the logger.

Parameters:
definitionInterval - an AbsoluteDateInterval. May be null; if not, is used to position uncertain boundaries on a Phenomenon.
duringState - a map of SpacecraftState. May be null; if not, is used to compute a Phenomenon when no event has occurred.
Returns:
the map. May be empty, if no MultiCodingEventDetector handling phenomena was added.
Throws:
OrekitException - if a problem occurs when g is called with the duringState parameter.


Copyright © 2017 CNES. All Rights Reserved.