public class ConfigurationManager extends Object
ConfigurationManager
provides static access to
the DAQ configuration that can be parsed from EVIO files. It works
in conjunction with the DAQConfigDriver
, which obtains
the configuration parser object when available and passes it to this
manager, and EvioDAQParser
, which parses the EVIO data.DAQConfigDriver
,
EvioDAQParser
Modifier and Type | Field and Description |
---|---|
private static List<ActionListener> |
AL_LIST |
private static DAQConfig |
DAQ_CONFIG |
private static ActionEvent |
EVENT |
private static boolean |
INITIALIZED |
Constructor and Description |
---|
ConfigurationManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addActionListener(ActionListener listener)
Adds a listener to track when updates occur in the DAQ settings.
|
static List<ActionListener> |
getActionListeners()
Gets the list of all listeners attached to the manager.
|
static DAQConfig |
getInstance()
Gets an instance of the DAQ configuration settings object if it
exists.
|
static boolean |
isInitialized()
Indicates whether a DAQ configuration has been received yet.
|
static void |
removeActionListener(ActionListener listener)
Removes an listener so that it will no longer receive updates
when the DAQ configuration changes.
|
static void |
updateConfiguration(EvioDAQParser parser)
Updates the DAQ configuration with the given EVIO parser.
|
private static void |
updateListeners()
Sends an update event to all associated listeners.
|
private static final DAQConfig DAQ_CONFIG
private static boolean INITIALIZED
private static final List<ActionListener> AL_LIST
private static final ActionEvent EVENT
public static final DAQConfig getInstance()
null
instead.DAQConfig
object or null
.public static final void addActionListener(ActionListener listener)
listener
- - The listener.public static final List<ActionListener> getActionListeners()
List
collection containing the
ActionListener
objects attached to the manager.public static final boolean isInitialized()
false
, then calls to getInstance
will return null
.true
if a DAQ configuration has
been read and false
otherwise.public static final void removeActionListener(ActionListener listener)
listener
- - The listener to remove.public static final void updateConfiguration(EvioDAQParser parser)
parser
- - The updated DAQ information.private static final void updateListeners()
Copyright © 2019. All rights reserved.