You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

HPS uses a database conditions backend which is accessible through the DatabaseConditionsManager.

Basic Usage

Initialization

The conditions system is initialized using the ConditionsManager's setDetector method which takes the name of a detector and a run number.

DatabaseConditionsManager.getInstance().setDetector("RealDetectorNameHere", 1234);

HPS adds several features to the lcsim conditions system.

You can add one or more tags for filtering the conditions records.  Only those records belonging to the tag will be accessible.

DatabaseConditionsManager.getInstance().addTag("pass0");

The conditions system can be "frozen" after it is initialized, meaning that subsequent calls to set a new detector and run number will be completely ignored.

DatabaseConditionsManager.getInstance().freeze();

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).

Accessing Conditions from a Driver

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

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");
}

 

Conditions Types

Conditions Type Table

Java Object ClassJava Collection ClassDefault Database TableDescription
BeamEnergyBeamEnergyCollectionbeam_energiesnominal beam energies
EcalBadChannelEcalBadChannelCollectionecal_bad_channelsECal bad channel list
EcalCalibrationEcalCalibrationCollectionecal_calibrationsper channel ECal pedestals and noise
EcalChannelEcalChannelCollectionecal_channelsECal channel information including map of DAQ to physical channels
EcalGainEcalGainCollectionecal_gainsper channel ECal gains
EcalLedEcalLedCollectionecal_ledsper crystal LED configuration
EcalLedCalibrationEcalLedCalibrationCollectionecal_led_calibrationsper crystal LED calibration information (from calibration run)
EcalPulseWidthEcalPulseWidthCollectionecal_pulse_widthsECal signal pulse width (currently unused in recon)
EcalTimeShiftEcalTimeShiftCollectionecal_time_shiftsECal signal time shift (currently unused in recon)
SvtAlignmentConstantSvtAlignmentConstantCollectionsvt_alignment_constants

SVT alignment constants in Millepede format

may be disabled using -DdisableSvtAlignmentConstants

SvtBadChannelSvtBadChannelCollectionsvt_bad_channelsSVT bad channel list
SvtBiasConstantSvtBiasConstantCollectionsvt_bias_constantsSVT bias setting for a time range
SvtCalibrationSvtCalibrationCollectionsvt_calibrationsper channel SVT noise and pedestal measurements
SvtChannelSvtChannelCollectionsvt_channelsSVT channel information
SvtDaqMappingSvtDaqMappingCollectionsvt_daq_mapSVT mapping of DAQ to physical channels
SvtGainSvtGainCollectionsvt_gainsper channel SVT gains
SvtMotorPositionSvtMotorPositionCollectionsvt_motor_positionsSVT motor position in mm
SvtShapeFitParametersSvtShapeFitParametersCollectionsvt_shape_fit_parametersSVT parameters for the signal fit

SvtT0Shift

SvtT0ShiftCollection

svt_t0_shifts

SVT T0 (first sample) shifts

SvtTimingConstants

SvtTimingConstantsCollection

svt_timing_constantsSVT timing configuration constants including offset and phase

TestRunSvtChannel

TestRunSvtChannelCollection

test_run_svt_channelstest run SVT channel information

TestRunSvtDaqMapping

TestRunSvtDaqMappingCollection

test_run_svt_daq_maptest run SVT DAQ mapping

TestRunSvtT0Shift

TestRunSvtT0ShiftCollection

test_run_svt_t0_shiftstest run SVT T0 shift

 

Database Schema

Configuration

Setting Detector and Run

Conditions Tags

Freezing the Conditions System

Conditions Collections

Getting a Collection

Selecting by Collection ID

 

  • No labels