TWiki
>
CMSPublic Web
>
SWGuide
>
SWGuideFrameWork
>
SWGuideSelectingBranchesForOutput
(2011-07-28,
WilliamTanenbaum
)
(raw view)
E
dit
A
ttach
P
DF
---+!! How to Configure Output Modules %COMPLETE3% %TOC{title="Contents:"}% ---++ Goal of this page This document describes how to configure output modules. In CMSSW_0_4_0_pre2, configuration of output modules has undergone a significant change; this document describes only the new system. ---++ Example of Configuration As are all other framework modules, output modules are configured using a =edm::ParameterSet= instance. In addition to whatever other parameters a specific output module class may require, _all_ output module classes allow the parameter *outputCommands*. This parameter is of type =vector= of =string=, and carries zero or more "commands" that determine which branches in the =Event= are to be written out by that output module. An example configuration is: <verbatim> cms.untracked.vstring( 'keep *', 'drop *_*_*_HLT', 'keep FEDRawDataCollection_*_*_*' ) </verbatim> This configuration tells the system to: 1. Write out (keep) all branches, except ... 2. Do not write out (drop) all branches from the HLT process, except ... 3. Write out all products of type !FEDRawDataCollection. Commands are applied in the order of presentation in the vector. Each command carries an _action_ (keep or drop) and a _specification_ (_e.g._ *_*_*_HLT). The specification is compared to each branch name. The specification matches the branch name if all four fields of the branch name match the corresponding fields of the specification. The four fields are separated by underscores. NOTE: implicitly the first command is always ='drop *'= . Therefore if you want to only specify =drop= commands you should use a ='keep *'= as the first command. A special case is when the entire specification is the one character "*". This is interpreted as "*_*_*_*". In all other cases, exactly 3 underscores must appear in the specification. The fields must contain only alphanumeric characters or one of two available wildcards. The wildcard "*" will match zero or more characters and these characters can be anything. The wildcard "?" will match exactly one character and that character can be anything. One restriction is that these wildcards will only match a sequence of characters contained inside one of the four fields. They can match an entire field or some smaller part of a field, but nothing larger. All 3 underscores must explicitly appear in the specification. (Prior to release 1_3_0_pre1, the ? wildcard was not available and the * wildcard would only match an entire field and nothing smaller) If no parameter named "outputCommands" is found, then a default value is used. The default value is: <verbatim> cms.untracked.vstring( 'keep *' ) </verbatim> and so by default all objects are written by a module so configured. Note: If a class has been declared non-persistent, any branch consisting of !EDProduct of that exact class will never be output. For more information, see the appropriate section in SWGuideCreatingNewProducts ---+++ Real life examples See [[http://cmslxr.fnal.gov/lxr/source/Configuration/EventContent/python/EventContentCosmics_cff.py][Configuration/EventContent/python/EventContentCosmics_cff.py]] or [[http://cmslxr.fnal.gov/lxr/source/Configuration/EventContent/python/EventContent_cff.py][EventContent/python/EventContent_cff.py]] ---++ The simple output writing algorithm. For purposes of understanding the behavior of the output, the algorithm used behaves as if it did the following: 1. All branches are assigned a 'write bit' set to =false=. 2. Each command is applied to each branch. a. if the specification in the command matches the branch name, the branch's 'write bit' is set to the value determined by the 'action' of the rule (keep sets it to =true=, drop sets it to =false=) b. if the specification in the command does not match the branch name, the 'write bit' for the branch is not changed. 3. Commands are considered in the order of their appearance in the vector, so that later commands can override the actions of earlier commands. ---++ Note on branch names Branch names have a four-part form with the format: *PT_ML_IN_PN* 1. PT is the _product type_; this is also called the "friendly class name". 1. ML is the _module label_; this is the label of the module that created the product. 1. IN is the _instance name_; this may be (and often is) a zero-length string. 1. PN is the _process name_; this is the name of the process in which this object was created. Most people will probably never see this or need to know this, but in some places the same branch name will occur with a period appended to the end. This is required for some purposes by ROOT. This period should not be used in "keep" or "drop" statements. #ReviewStatus ---++ Review Status | *Reviewer/Editor and Date (copy from screen)* | *Comments* | | Main.William Tanenbaum - 14 Jan 2007 | page last content editor | | Main.JennyWilliams - 31 Jan 2007 | editing to include in SWGuide | <!-- In the following line, be sure to put a blank space AFTER your name; otherwise the Summary doesn't come out right. --> %RESPONSIBLE% Main.WilliamTanenbaum %BR% %REVIEW% [[mailto:malik@fnal.gov][Sudhir Malik]]- 24 January 2009
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r17
<
r16
<
r15
<
r14
<
r13
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r17 - 2011-07-28
-
WilliamTanenbaum
Log In
CMSPublic
CMSPublic Web
CMSPrivate Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Offline SW Guide
Summary of Changes
Site Map
Preface
Contributors Guide
Developers Guide
Offline Workbook
Glossary/Index
User Support
Reference Manual
Main Areas
Framework and EDM
Detector Description
Event Generation
Full Simulation
Fast Simulation
Calibration and Alignment
Conditions Database
High Level Trigger
L1 Trigger
Online Selection
Reconstruction
Detector Reco Objects
Tracks
Ecal Reco
Hcal Reco
Muon System Reco
Vertex Reco
Physics Reco Objects
Muons
Electrons/Photons
Jets, missing ET
b Tagging
Particle flow
Tau-ID
Analysis/Software Tools
Physics Tools
MC Truth Tools
Visualization
Trouble Shooting
Code Performance
Port to New Release
CRAB
Analysis Examples
Higgs
SUSY/BSM
Electroweak
Top
Heavy Ions
Public webs
Public webs
ABATBEA
ACPP
ADCgroup
AEGIS
AfricaMap
AgileInfrastructure
ALICE
AliceEbyE
AliceSPD
AliceSSD
AliceTOF
AliFemto
ALPHA
Altair
ArdaGrid
ASACUSA
AthenaFCalTBAna
Atlas
AtlasLBNL
AXIALPET
CAE
CALICE
CDS
CENF
CERNSearch
CLIC
Cloud
CloudServices
CMS
Controls
CTA
CvmFS
DB
DefaultWeb
DESgroup
DPHEP
DM-LHC
DSSGroup
EGEE
EgeePtf
ELFms
EMI
ETICS
FIOgroup
FlukaTeam
Frontier
Gaudi
GeneratorServices
GuidesInfo
HardwareLabs
HCC
HEPIX
ILCBDSColl
ILCTPC
IMWG
Inspire
IPv6
IT
ItCommTeam
ITCoord
ITdeptTechForum
ITDRP
ITGT
ITSDC
LAr
LCG
LCGAAWorkbook
Leade
LHCAccess
LHCAtHome
LHCb
LHCgas
LHCONE
LHCOPN
LinuxSupport
Main
Medipix
Messaging
MPGD
NA49
NA61
NA62
NTOF
Openlab
PDBService
Persistency
PESgroup
Plugins
PSAccess
PSBUpgrade
R2Eproject
RCTF
RD42
RFCond12
RFLowLevel
ROXIE
Sandbox
SocialActivities
SPI
SRMDev
SSM
Student
SuperComputing
Support
SwfCatalogue
TMVA
TOTEM
TWiki
UNOSAT
Virtualization
VOBox
WITCH
XTCA
Cern Search
TWiki Search
Google Search
CMSPublic
All webs
Copyright &© 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