Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is useful to force the system to load a specific configuration by run number if the actual event data does not have the same run number (or for run 0 events from simulation).

Typically, the The conditions system will be initialized for you automatically or configured using switches to the various HPS Java command line tools (exact syntax depends on the tool).

...

Accessing Conditions from a Driver

Typically, conditions Conditions information is accessed in the beginning of the job through the Driver class's detectorChanged method.

Code Block
languagejava
themeMidnight
public void detectorChanged(Detector detector) {
    DatabaseConditionsManager conditionsManager = DatabaseConditionsManager.getInstance();
    EcalChannelCollection channels = 
            conditionsManager.getCachedConditions(EcalChannelCollection.class, "ecal_channels").getCachedData();
    System.out.println("got " + channels.size() + " ECal channels");
}

Typically, all All conditions collections required by a Driver should be loaded in this method to avoid incurring a performance overhead by reading the conditions on every event.

...