O2O for L1 Trigger
CMSSW module layout (CondTools/L1Trigger/plugins
)
Communicating online keys to CMSSW
L1TriggerKeyDummyProd
(ESProducer for
L1TriggerKeyRcd
)
- Get key values and
record@type
names from .cfg file
- Instantiate a
L1TriggerKey
object and put in EventSetup
L1TriggerKeyListDummyProd
(ESProducer for
L1TriggerKeyListRcd
)
- Instantiate an empty
L1TriggerKeyList
and put in EventSetup
L1SubsystemKeysOnlineProd
(ESProducer for
L1TriggerKeyRcd
with label "SubsystemKeysOnly")
- Get TSC key via ParameterSet
- Get
L1TriggerKeyList
from EventSetup
- Check if
L1TriggerKeyList
contains TSC key
- If yes, then throw
DataAlreadyPresentException
- If no,
- Get corresponding subsystem keys from OMDS
- Instantiate a
L1TriggerKey
object and put in EventSetup
- Optional: set a parameter to ignore
L1TriggerKeyList
and force creation of L1TriggerKey
. This supports the (hopefully rare) use case of running the emulator directly off OMDS. This option is also used when one wishes to overwrite an existing key.
L1ObjectKeysOnlineProdBase
(ESProducer for
L1TriggerKeyRcd
with a user-defined subsystem label; abstract base class for subsystem ESProducers that determine object keys for a given subsystem key)
- Get
L1TriggerKey
with label "SubsystemKeysOnly" from EventSetup
- If
DataAlreadyPresentException
caught, then rethrow --- all configuration data is already in ORCON
- Otherwise,
- Copy "SubsystemKeysOnly"
L1TriggerKey
to a new L1TriggerKey
- Call
fillObjectKeys()
, implemented by each subsystem, to fill corresponding object keys from OMDS
- Put new
L1TriggerKey
in EventSetup with user-defined subsystem label
L1TriggerKeyOnlineProd
(ESProducer for
L1TriggerKeyRcd
)
- Get list of subsystem labels from ParameterSet --- manipulating this list allows for run-time decisions about which payloads to write
- Instantiate new
L1TriggerKey
to hold complete list of object keys for all subsystems (for a given TSC key)
- For each label, get corresponding
L1TriggerKey
from EventSetup
- If
DataAlreadyPresentException
caught, then rethrow --- all configuration data is already in ORCON
- Otherwise, merge objects keys into master list
- Put new
L1TriggerKey
in EventSetup
Putting configuration objects into EventSetup
Dummy ESProducers for configuration object records in
L1TriggerConfig
L1ConfigOnlineProdBase
(ESProducer for configuration object records; templated abstract base class for subsystem ESProducers that construct configuration objects from data stored in OMDS; one ESProducer per object)
- Get
L1TriggerKey
from EventSetup
- If
DataAlreadyPresentException
caught, then do nothing --- all configuration objects are already in ORCON
- Otherwise, get
L1TriggerKeyList
from EventSetup, check if L1TriggerKeyList
has object key
- If yes, then throw
DataAlreadyPresentException
--- configuration object is already in ORCON
- If no, call
makeObject()
, implemented by each subsystem
- Get data from OMDS via SQL queries
- Construct C++ object and put in EventSetup
- At this point, EventSetup contains only objects that need a new entry in
L1TriggerKeyList
(i.e., need to be written to ORCON)
- Optional: set a parameter to ignore
L1TriggerKeyList
and force creation of configuration objects. This supports the (hopefully rare) use case of running the emulator directly off OMDS. This option is also used when one wishes to overwrite an existing key.
Writing configuration objects from EventSetup to ORCON with empty IOVs
L1CondDBPayloadWriter
(EDAnalyzer to be used with
EmptySource
for highest possible run number (4294967295) so that the latest version of
L1TriggerKeyList
is picked up)
- Get
L1TriggerKey
from EventSetup
- If
DataAlreadyPresentException
caught, then do nothing --- all configuration data is already in ORCON
- Otherwise,
- Write
L1TriggerKey
to ORCON with no IOV if TSC key is non-null (optional)
- Get
L1TriggerKeyList
from EventSetup
- Add
L1TriggerKey
token to L1TriggerKeyList
- Print error message if TSC key already in list (should only happen with dummy configurations)
- For each
record@type
with non-null object key (optional),
- Get configuration object from EventSetup
- If
DataAlreadyPresentException
caught, then do nothing --- configuration object is already in ORCON
- Otherwise,
- Write configuration object to ORCON with no IOV
- Add configuration object payload token to
L1TriggerKeyList
- Print error message if subsystem key already in list (should only happen with dummy configurations)
- If
L1TriggerKeyList
has been updated,
- Get previous run number from
EmptySource
- Write
L1TriggerKeyList
to ORCON. The IOV for L1TriggerKeyList
is meaningless. So, the first time L1CondDBPayloadWriter
is run for a given IOV tag, the IOV since-time is assigned to be 1. On each subsequent running of L1CondDBPayloadWriter
, the IOV since-time is incremented by one. Thus, there is a pool of run numbers that can be used for this IOV that goes from 1 up to the current run number.
Options to write
only L1TriggerKey
or configuration data allow payload objects to be written one at a time, instead of all at once.
L1TriggerKeyList
will always be updated, if necessary, with the IOV advancing each time as described above.
There is also an option to overwrite any existing keys in
L1TriggerKeyList
, in case a previous payload object needs to be corrected. This option should be used with
L1SubsystemKeysOnlineProd
and
L1ConfigOnlineProdBase
set to force generation of its objects; otherwise, the new objects will not be created because the key already exists. If possible, the previous payload object should first be removed by hand from ORCON (using the commandline tools).
Setting IOVs for configuration objects in ORCON
L1CondDBIOVWriter
(EDAnalyzer to be used with
EmptySource
for next run number)
- Get new run number from
EmptySource
- Get current
L1TriggerKeyList
from EventSetup (ORCON)
- Get TSC key for the next run from parameter
- If TSC key is not empty,
- Use TSC key and
L1TriggerKeyList
to find next run's L1TriggerKey
token
- Update IOV sequence for this token with since-time = new run
- Read
L1TriggerKey
directly from ORCON using token
- Otherwise, get
L1TriggerKey
from EventSetup (for use with Run Settings, where there is no corresponding L1TriggerKey
in ORCON)
- For each
record@type
in L1TriggerKey
with non-null object key,
- Use
L1TriggerKeyList
to find configuration object payload token
- Update IOV sequence this
record@type
with since-time = new run
- Optional: ignore
L1TriggerKey
, useful for setting IOVs for objects not tied to the TSC key. In this case, the records and objects to be updated are given in the toPut
parameter, and the "TSC key" is used as the (common) object key. The IOV for L1TriggerKey
is not updated.
Workflows (CondTools/L1Trigger/test
)
Initialize DB with empty
L1TriggerKeyList
(once for each IOV tag):
init_cfg.py
- Sources: EmptySource with arbitrary run number
- ESProducers:
L1TriggerKeyDummyProd
and L1TriggerKeyListDummyProd
- Path:
{L1CondDBPayloadWriter}
Dummy configuration (two jobs):
- Pre-configure job (well before start of run):
L1ConfigWritePayloadDummy_cfg.py
- Sources: EmptySource and EmptyESSource (run number = 4294967295)
- ESProducers:
L1TriggerKeyDummyProd
, L1TriggerKeyListDummyProd
, L1TriggerConfig
ESProducers
- Path:
{L1CondDBPayloadWriter}
- Configure job (initiated by CMS.RunControl):
L1ConfigWriteIOVDummy_cfg.py
- Sources: EmptySource (for next run number) and
PoolDBESSource
- Path:
{L1CondDBIOVWriter}
OMDS configuration during data-taking (two jobs):
- Pre-configure job (well before start of run):
L1ConfigWritePayloadOnline_cfg.py
- Sources:
EmptySource
(run number = 4294967295), PoolDBESSource
- ESProducers:
L1SubsystemKeysOnlineProd
, subclasses of L1ObjectKeysOnlineProdBase
, L1TriggerKeyOnlineProd
, subclasses of L1ConfigOnlineProdBase
- Path:
{L1CondDBPayloadWriter}
- Configure job (initiated by CMS.RunControl):
L1ConfigWriteIOVOnline_cfg.py
- Sources:
EmptySource
(for next run number) and PoolDBESSource
- Path:
{L1CondDBIOVWriter}
Dummy Run Settings configuration (for objects decoupled from TSC key) (two jobs):
- Pre-configure job (well before start of run):
L1ConfigWriteSinglePayload_cfg.py
- Sources: Sources:
EmptySource
(run number = 4294967295), PoolDBESSource
- ESProducers:
L1TriggerKeyDummyProd
(to specify record, object, and key), subclass of L1ConfigOnlineProdBase
- Path:
{L1CondDBPayloadWriter}
, with writing of L1TriggerKey
disabled
- Configure job (initiated by CMS.RunControl):
L1ConfigWriteSingleIOV_cfg.py
- Sources:
EmptySource
(for next run number) and PoolDBESSource
- Path
{L1CondDBIOVWriter}
, with use of L1TriggerKey
disabled
OMDS Run Settings configuration (for objects decoupled from TSC key) during data-taking (two jobs):
- Pre-configure job (well before start of run):
L1ConfigWriteSinglePayload_cfg.py
- Sources: Sources:
EmptySource
(run number = 4294967295), PoolDBESSource
- ESProducers:
L1TriggerKeyDummyProd
(to supply dummy "SubsystemKeysOnly" L1TriggerKey
), subclass of L1ObjectKeysOnlineProdBase
, subclass of L1ConfigOnlineProdBase
- Path:
{L1CondDBPayloadWriter}
, with writing of L1TriggerKey
disabled
- Configure job (initiated by CMS.RunControl):
L1ConfigWriteSingleIOV_cfg.py
- Sources:
EmptySource
(for next run number) and PoolDBESSource
- ESProducers:
L1TriggerKeyDummyProd
(to supply dummy "SubsystemKeysOnly" L1TriggerKey
), subclass of L1ObjectKeysOnlineProdBase
- Path
{L1CondDBIOVWriter}
, with use of L1TriggerKey
enabled but empty TSC key
Other tools (CondTools/L1Trigger/{interface,src}
)
DataManager
: base class for establishing database connections (either online or offline)
DataWriter
: subclass of
DataManager
with functions for writing payload data and IOVs. Use of
WriterProxy
allows list of data classes to be writen to be determined at run-time, not compile time.
DataReader
: subclass of
DataManager
with functions for reading payload data and IOVs. Use of
DataProxy
allows list of data classes to be read to be determined at run-time, not compile time.
OMDSReader
: subclass of
DataManager
with utility functions for constructing SQL queries for OMDS.
DataAlreadyPresentException
: subclass of
cond::Exception
, used to signal that requested configuration data has already been written to ORCON.
Code Development
For instructions for developing subsystem code to read OMDS, see
SWGuideL1ConfigOnlineProd.
--
WernerSun - 28 Feb 2008