|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.orekit.propagation.events.EventsLogger
public class EventsLogger
This class logs events detectors events during propagation.
As events detectors
are triggered during
orbit propagation, an event specific eventOccurred
method is called. This class can be used to add a global logging
feature registering all events with their corresponding states in
a chronological sequence (or reverse-chronological if propagation
occurs backward).
This class works by wrapping user-provided events detectors
before they are registered to the propagator. The
wrapper monitor the calls to eventOccurred
and store the corresponding events as EventsLogger.LoggedEvent
instances.
After propagation is complete, the user can retrieve all the events
that have occured at once by calling method getLoggedEvents()
.
Nested Class Summary | |
---|---|
static class |
EventsLogger.LoggedEvent
Class for logged events entries. |
Constructor Summary | |
---|---|
EventsLogger()
Simple constructor. |
Method Summary | |
---|---|
void |
clearLoggedEvents()
Clear the logged events. |
List<EventsLogger.LoggedEvent> |
getLoggedEvents()
Get an immutable copy of the logged events. |
EventDetector |
monitorDetector(EventDetector monitoredDetector)
Monitor an event detector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventsLogger()
Build an empty logger for events detectors.
Method Detail |
---|
public EventDetector monitorDetector(EventDetector monitoredDetector)
In order to monitor an event detector, it must be wrapped thanks to this method as follows:
Propagator propagator = new XyzPropagator(...); EventsLogger logger = new EventsLogger(); EventDetector detector = new UvwDetector(...); propagator.addEventDetector(logger.monitorDetector(detector));
Note that the event detector returned by the getEventDetector
method in
LoggedEvent
instances returned by getLoggedEvents()
are the monitoredDetector
instances
themselves, not the wrapping detector returned by this method.
monitoredDetector
- event detector to monitor
public void clearLoggedEvents()
public List<EventsLogger.LoggedEvent> getLoggedEvents()
The copy is independent of the logger. It is preserved
event if the clearLoggedEvents
method
is called and the logger reused in another propagation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |