ConditionsProcessor

Provides access to conditions data in a Marlin application.

Uses LCCD ConditionsHandler. For every ConditionsHandler you have to specify a line in the steering file. Use MyMarlin -l to get examples for the steering parameters. The conditions data are added to the event as LCCollections with their name. Optionally IConditionsChangeListener subclasses, e.g. ConditionsMaps can be registered for conditions data 'name', these are updated whenever the data changes.

Parameters

Name

Data Type

Description

Syntax

DBCondHandler

StringVec

Initialization of a conditions database handler

 DBCondHandler conditionsName dbPath dbTag 

DBFileHandler

StringVec

Initialization of a conditions db file handler

 DBFileHandler conditionsName slcioFile collectionName 

DBInit

String

Initialization string for conditions database

 host:dbname:user:password 

DataFileHandler

StringVec

Initialization of a data file handler

 DataFileHandler conditionsName ? 

SimpleFileHandler

StringVec

Initialization of a simple conditions file handler

 SimpleFileHandler conditionsName slcioFile collectionName 

offcial docu

Example: How to access Slow Control Data

The AHCAL Slow Control data like temperature, High Voltage etc. for the CERN data taking period are stored in the database folder /cd_calice_v0402_cernhcal/CALDAQ_AhcSroModData . To get them, you have to run the ConditionsProcessor with the parameter

 DBCondHandler myAhcSroModDataCollectionName /cd_calice_v0402_cernhcal/CALDAQ_AhcSroModData HEAD

There are two different ways of accessing this collection in your own processor. The first is the easy and more time-consuming method: You simply call the getCollection(...)-function for each event evt you process:

 LCCollection* myAhcSroModDataCollection;
 myAhcSroModDataCollection = evt->getCollection( myAhcSroModDataCollectionName );

The second method uses a so-called Change-Listener, or a Change-Delegator (which is an implementation of the Change-Listener). A brief description of this method will follow... No matter which method you choose, the values you get in the end are the same.

The collection myAhcSroModDataCollection comprises several objects of the type AhcSlowReadoutModBlock (one for each module). The objects include some functions to extract the stored data. You can loop over all objects inside a collection via

for (int i=0; i < myAhcSroModDataCollection->getNumberOfElements(); i++){
      AhcSlowReadoutModBlock myScModBlock(ahcSroModDataCol->getElementAt(i));
      (do something with myScModBlock...)
}

MarlinProcessorConditionsProcessor (last edited 2009-06-18 16:10:48 by JörgenSamson)