Module Writing Tutorial: Difference between revisions
No edit summary |
|||
Line 29: | Line 29: | ||
* Create an association between 2 data products | * Create an association between 2 data products | ||
== Reference Materials == | == Reference Materials == | ||
* Use this place to add inks to reference materials. | * Use this place to add inks to reference materials. |
Revision as of 00:31, 24 May 2019
Tutorial Session Goal
This tutorial will show how to write an art module for Mu2e. It will explain how to structure the code, define runtime parameters, produce histograms and/or TTrees, and consume and produce data products.
Session Prerequisites and Advance Preparation
This tutorial requires the user to:
- Perform the Tutorial on setting up the Mu2e Offline
- Perform the tutorial on running Mu2e art Framework jobs
- Install the following docker containers ()
Session Introduction
Mu2e uses the art framework to organize our event processing code. The art framework processes events through a configurable sequential set of modules, called a path. Modules expects certain inputs, and optionally produces certain outputs. Modules have a standard interface for interacting with the art framework, giving the user access to data at run/subrun/event transitions. Modules have a standard library for defining configuration parameters that can be changed at runtime.
In this tutorial you will learn how to create an art module from a basic template, and perform basic data operations in that module. You will learn how to configure your module in code and fcl, and how to produce various kinds of output.
- Compile and run HelloWorld in art
- Add a configuration parameter to the module
- Find a mu2e data product in an event
- Create and fill a histogram from a data product
- Create a subset of a data product and add it to the event
- Create a new data product, fill it, and add it to the event
- Create and use a persistent pointer (Ptr) to a data product
- Create an association between 2 data products
Reference Materials
- Use this place to add inks to reference materials.