4.1.4 Config Editor

Detailed Review status

Introduction

The ConfigEditor is a tool for browsing and editing of Python configuration files in CMSSW. It allows

  • Browsing:
    • Visualise the complete structure of a Config File and all included config files (via import)
    • Inspect the parameters of modules
    • Track which modules use input from which other modules
    • Track in which file certain modules can be found
    • Open the definition of certain modules in the user's favourite editor

  • Editing:
    • Create user configuration files which start from some standard configuration (e.g. PAT) and contain all changes to it.
    • Modify parameters of modules
    • Apply tools (e.g. PAT tools)

The Manual of the ConfigEditor can be found at SWGuideConfigEditor#Manual. If you have problems using the ConfigEditor, please also look at: SWGuideConfigEditor#Troubleshooting. Note that the ConfigEditor is not designed to debug Python related errors in Python config files. Therefore have a look at SWGuidePythonTips, or at SWGuideAboutPythonConfigFile. Feel free to contact AndreasHinzmann for feedback and suggestions!

Getting started

Set up CMSSW and run ConfigEditor

  • CMSSW >=4_1_X:
    setenv SCRAM_ARCH slc5_amd64_gcc434
    cmsrel CMSSW_4_1_6
    cd CMSSW_4_1_6/src
    cmsenv
    edmConfigEditor

  • If you are running remotely (via ssh -Y):
    edmConfigEditorSSH

Older releases:

  • CMSSW >=3_8_2:
    cmsrel CMSSW_3_8_2
    cd CMSSW_3_8_2/src
    cmsenv
    edmConfigEditor
  • CMSSW >=3_5_4
    cmsrel CMSSW_3_5_4
    cd CMSSW_3_5_4/src
    cmsenv
    edmConfigEditor
    If you have freeze problems using edmConfigEditor over ssh, use this recipe:
    addpkg FWCore/GuiBrowsers V00-00-38
    scram b
  • CMSSW 3_1_1 - 3_5_3 PAT tools are not yet supported. All other functionality is in place.
    cmsrel CMSSW_3_1_1
    cd CMSSW_3_1_1/src
    cmsenv
    addpkg FWCore/GuiBrowsers V00-00-38
    scram b
    edmConfigEditor
  • CMSSW 2_1_X - 3_1_1 Only browsing functionality in place. No editing of configuration possible. The name of the tool is edmConfigBrowser.
  • Set up CMSSW(>=2_1_X) environment:
    cmsrel CMSSW_2_1_17
    cd CMSSW_2_1_17/src
    cmsenv
  • Download latest version (0.3.2) of ConfigBrowser from AFS (tgz-file, 20 MB):
    cp /afs/cern.ch/user/h/hinzmann/www/web/ConfigBrowser.tgz .
    or from website http://cern.ch/test-configbrowser/ConfigBrowser.tgz.
  • Extract (total size 54 MB) and run ConfigBrowser:
    tar -xzf ConfigBrowser.tgz
    cd ConfigBrowser
    ./edmConfigBrowser

Browsing configuration files

  • Browse an example file:
    • Check out an example from PAT:
      git cms-addpkg PhysicsTools/PatAlgos
    • Open the configuration file via menu File -> Open... or via commandline:
      edmConfigEditor PhysicsTools/PatAlgos/test/patTuple_standard_cfg.py
      browsing.png

    • Select an object in the Tree View -> The content is displayed in the Connection Structure
    • Select an object in the Connection Struture -> All parameters are displayed in the Property View
    • Double-click an object in the Connection Struture -> The object with all its dependecies is displayed in the Connection Structure

  • Inspect configuration files using your favorite editor
    • Select your favorite editor in the menu Config -> Choose editor... (e.g. type emacs)
    • Select an object and open the config file in which the selected object is defined via menu Config -> Open editor...
      Warning, important If you edit configuration files, you modify the default settings in your project CMSSW area! You should be aware of what you are doing. If you want to create user defined configuration follow the instructions in the next section.

Creating user configuration files

  • Create a new user configuration
    • Click menu File - New configuration file
    • Select a standard configuration file that you would like to start from via menu Config - Import configuration
      PhysicsTools/PatAlgos/test/patTuple_standard_cfg.py
      Warning, important You cannot create configuration files from scratch. You need to start from a configuration file containing a process (e.g. process=cms.Process("PAT")) and a path (e.g. process.p=cms.Path(...)).

      editing.png

  • Apply changes to the standard configuration and save them into the user configuration
    • Edit parameters of selected modules using the Property View. Your changes will appear in the user configuration code generated by ConfigEditor.
    • You can apply tools (e.g. PAT tools) via menu Config - Apply tool . Select a tool, choose its parameters and press apply.
    • Save user configuration via menu File - Save as...

Tutorials

Browsing PAT with ConfigEditor (2010)

Writing PAT user configuration with ConfigEditor (2010)

Review status

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng browsing.png r1 manage 79.1 K 2010-03-04 - 18:08 AndreasHinzmann Screenshot of the main-window of Config Editor browsing a PAT configuration
PNGpng editing.png r1 manage 76.8 K 2010-03-04 - 18:08 AndreasHinzmann Screenshot of the main-window of Config Editor creating a user PAT configuration
Edit | Attach | Watch | Print version | History: r19 < r18 < r17 < r16 < r15 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r19 - 2014-07-08 - XuanChen


ESSENTIALS

ADVANCED TOPICS


 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback