Testing an ESProducer

To test to see if an ESProducer does anything, one needs to get the data supplied by that ESProducer from the Record to which it was placed. Such a get is best done from an EDAnalyzer since an analyzer can be placed on a path and therefore will be run once events are processed.

This is a very standard activity so we have some testing modules pre-made that can help you do the work.

EventSetupRecordDataGetter

This module can be configured to get any data from any EventSetup Record.

Parameters used by module

name type description
verbose untracked bool when true it prints a statement for each successful get. Default is false.
toGet VPSet holds records and data to get

Parameters expected in toGet parameter

name type description
record string name of the record holding the data
data vstring names of the data to get from the record

EmptySource (formerly named EmptyInputService)

This module creates empty events. This is useful when you want to trigger the EventSetupRecordDataGetter and not actually do anything with the Event. (In CMSSW_0_1_0 and previous releases, this module was called EmptyInputService)

Parameters used by module

name typeSorted ascending description
maxEvents untracked int32 maximum number of events to generate. Defaults to infinity (-1).
firstRun untracked uint32 first run number to generate. Defaults to 1. ( added pre8 )
numberEventsInRun untracked uint32 number of events to generate per run. Defaults to maxEvents. ( added pre8 )
firstTime untracked uint32 first time value to use (in ns). Defaults to 1 ns. ( added pre8 )
timeBetweenEvents untracked uint32 number of ns between Events. Defaults to 5000000 ns (200 Hz). ( added pre8 )

EmptyESSource

This module creates empty EventSetup Records using the IOVs provided. This module is only useful for testing if the ESProducer being tested does not get any data from the Record (or that data for the Record is being 'faked up' by another ESProducer).

Parameters used by module

name type description
recordName string name of the Record which should be created
firstValid vuint32 a list of the run numbers (or time) for the start of each IOV transition. Set to '1' if you want valid for all time
iovIsRunNotTime bool 'true' means 'firstValid' has run numbers, 'false' means it is time

-- Main.chrjones - 29 Jul 2005


This topic: CMSPublic > CMSCommunicationsGroup > CMSCommunicationsProjects > WebHome > SWGuide > SWGuideFrameWork > SWGuideEventSetupHowTos > SWGuideHowToTestAnESProducer
Topic revision: r5 - 2007-01-30 - CMSUserSupport
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 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