public abstract class ConditionsManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ConditionsManager.ConditionsNotFoundException
Thrown if conditions associated with a given detector can not be found.
|
static class |
ConditionsManager.ConditionsSetNotFoundException
Thrown if specific set of conditions can not be found.
|
Modifier and Type | Field and Description |
---|---|
private static ConditionsManager |
theConditionsManager |
Constructor and Description |
---|
ConditionsManager() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addConditionsListener(ConditionsListener listener)
Add a listener to be notified about changes to ANY conditions.
|
static ConditionsManager |
defaultInstance()
Get the default (shared) condition manager implementation.
|
abstract <T> CachedConditions<T> |
getCachedConditions(Class<T> type,
String name)
Access conditions converted to a java object using a conditions
converter.
|
abstract ConditionsSet |
getConditions(String name)
Get the conditions associated with the given name.
|
abstract String |
getDetector()
Get the current detector name
|
abstract RawConditions |
getRawConditions(String name)
Get an input stream to directly read raw conditions from the database.
|
abstract int |
getRun()
Get the current run number.
|
static boolean |
isSetup()
Return true if there is a conditions manager installed.
|
abstract void |
registerConditionsConverter(ConditionsConverter conv)
Adds a conditions converter.
|
abstract void |
removeConditionsConverter(ConditionsConverter conv)
Removes a conditions converter.
|
abstract void |
removeConditionsListener(ConditionsListener listener)
Remove a global change listener.
|
static void |
setDefaultConditionsManager(ConditionsManager manager) |
abstract void |
setDetector(String name,
int run)
Normally called automatically by the framework to set the detector name
and run number,
|
abstract void |
setRun(int run)
Set the current run number.
|
private static ConditionsManager theConditionsManager
public static ConditionsManager defaultInstance()
public static void setDefaultConditionsManager(ConditionsManager manager)
public static boolean isSetup()
public abstract void setDetector(String name, int run) throws ConditionsManager.ConditionsNotFoundException
name
- The current detector name.run
- The current run number.ConditionsManager.ConditionsNotFoundException
- If the conditions associated with this detector/run number
can not be found.public abstract void setRun(int run) throws ConditionsManager.ConditionsNotFoundException
run
- The current run numberConditionsManager.ConditionsNotFoundException
- If the conditions associated with the specified run number
can not be found.public abstract String getDetector()
public abstract int getRun()
public abstract ConditionsSet getConditions(String name) throws ConditionsManager.ConditionsSetNotFoundException
name
- The name of the conditions to search for.ConditionsManager.ConditionsSetNotFoundException
- If the named conditions can not be found.public abstract <T> CachedConditions<T> getCachedConditions(Class<T> type, String name) throws ConditionsManager.ConditionsSetNotFoundException
type
- The type of conditions requested (used to select an
appropriate conditions converter).name
- The name of the conditions requested.ConditionsManager.ConditionsSetNotFoundException
- If the specified conditions can not be found.public abstract RawConditions getRawConditions(String name) throws ConditionsManager.ConditionsSetNotFoundException
name
- The name of the conditions requested.ConditionsManager.ConditionsSetNotFoundException
- If the requested conditions can not be found.public abstract void registerConditionsConverter(ConditionsConverter conv)
conv
- The converter to add.public abstract void removeConditionsConverter(ConditionsConverter conv)
conv
- The converter to remove.public abstract void addConditionsListener(ConditionsListener listener)
listener
- The listener to add.public abstract void removeConditionsListener(ConditionsListener listener)
listener
- The listener to remove.Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.