CMS Framework Software bus model One executable cms
CMS Framework • “Software bus” model – One executable, “cms. Run, with many plug-in modules • Controlled by a configuration file – Controls which data to use, which modules to run, in which order, and which parameters to use for each module – All parameters are recorded the output provenance • Configuration originally in a custom language – Parsed with flex/bison
Transition From Custom Language • Made a Python parser to translate configurations into Python structures – Implemented with pyparsing, plus 2000 lines of new code – Used first by production system to edit configs in python, then dump them back to old language • Interfaced to C++ using boost: : python • Translated all ~6000 config files in the release – – Scripts automatically parse, translate, commit, and tag Couldn’t preserve statement order Made second-pass script to translate comments over. Scripts detected when users modified old configs without fixing python configs
Modules and Parameters • Some modules operate on Event data – EDProducer, EDFilter, EDAnalyzer • Some modules do time-dependent conditions – ESProducer, ESSource • Many types of parameters – int 32, uint 32, int 64, double, bool, string, Input. Tag, Event. ID, File. In. Path, … – plus vectors of all of the above, e. g, vint 32 – Can be stored hierarchically in PSet, VPSet
Sequences • Modules can be grouped into Sequences. • Executions Paths can be made of modules and Sequences, and can be stopped by EDFilters • Operators can define relationship of modules and sequences in a path – Inverting (“~”) or ignoring (“-”) a filter – Defining whether or not an element depends on the previous element (“+” or “*”)
New Python Config import FWCore. Parameter. Set. Config as cms process = cms. Process(“foo”) process. jet. Analyzer = cms. EDAnalyzer(“My. Jet. Analyzer”) from Jets. Reco. Jet. Filter_cfi import jet. Filter process. jet 50 Filter = jet. Filter. clone() process. jet 50 Filter. min. Pt = 50. process. jet 100 Filter = jet. Filter. clone() process. jet 100 Filter. min. Pt = 100. process. jet 50 to 100 Filter = cms. Sequence(process. jet 50 Filter + ~process. jet 100 Filter) process. jet 50 to 100 = cms. Path(process. jet 50 to 100 Filter * process. jet. Analyzer)
Old Custom Language process foo = { module jet. Analyzer = My. Jet. Analyzer {} module jet 50 Filter = jet. Filter from “Jets/Reco/data/Jet. Filter. cfi” replace jet 50 Filter. min. Pt = 50. module jet 100 Filter = jet. Filter from “Jets/Reco/data/Jet. Filter. cfi” replace jet 100 Filter. min. Pt = 100. sequence jet 50 to 100 Filter = {jet. Filter 50&!jet. Filter 100} path jet 50 to 100 = {jet 50 to 100 Filter, jet. Analyzer} }
- Slides: 6