ebook img

Writing a task in AliPhysics Some basic c++, ALICE tasks, tips and conventions PDF

163 Pages·2017·7.82 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Writing a task in AliPhysics Some basic c++, ALICE tasks, tips and conventions

Writing a task in AliPhysics Some basic c++, ALICE tasks, tips and conventions Redmer Alexander Bertens University of Knoxville, Tennessee RedmerAlexanderBertens-Nov22017-slide1of93 Writingatask What’s the aim? At the end of this session, you’ll understand what happens in your task (what is a ClassDef(), what //-> means, etc...) As we’ll go along, we’ll explore (very) basic but also a bit more advanced concepts The full source code is attached to the agenda, I’ll just show snippets I’ll assume that AliPHYSICS is running on your machine Before starting What are we gonna do today? Basic goal: showing you how to write and run a minimal task to do analysis No physics here - just getting it up and running RedmerAlexanderBertens-Nov22017-slide2of93 Writingatask Before starting What are we gonna do today? Basic goal: showing you how to write and run a minimal task to do analysis No physics here - just getting it up and running What’s the aim? At the end of this session, you’ll understand what happens in your task (what is a ClassDef(), what //-> means, etc...) As we’ll go along, we’ll explore (very) basic but also a bit more advanced concepts The full source code is attached to the agenda, I’ll just show snippets I’ll assume that AliPHYSICS is running on your machine RedmerAlexanderBertens-Nov22017-slide2of93 Writingatask you can find this talk (and full tutorial) as well as previous ones at the analysis tutorial webpage - including recordings of the sessions RedmerAlexanderBertens-Nov22017-slide3of93 Writingatask spot the differences . . . RedmerAlexanderBertens-Nov22017-slide4of93 Writingatask Overview: - some words on classes - writing your task - running it (local, grid, trains) - workflow and troubleshooting - ROOT’s //! and streamers - coding conventions - pointers and memory management ... most likely we’ll have time for 50% of the slides ... RedmerAlexanderBertens-Nov22017-slide5of93 Writingatask RedmerAlexanderBertens-Nov22017-slide6of93 Writingatask A bit abstract, but not so difficult when you see it 1 class Rectangle 2 { 3 private: 4 int width, height; 5 public: 6 Rectangle(int,int); 7 int GetArea() {return height * width;} 8 } Classes Code in ROOT / AliROOT / AliPhysics has the form of classes, generally one class per file Our analysis task will also be a c++ class A class contains both variables and functions (called ‘methods’) as members Often the member variables must be accessed through the methods RedmerAlexanderBertens-Nov22017-slide7of93 Writingatask Classes Code in ROOT / AliROOT / AliPhysics has the form of classes, generally one class per file Our analysis task will also be a c++ class A class contains both variables and functions (called ‘methods’) as members Often the member variables must be accessed through the methods A bit abstract, but not so difficult when you see it 1 class Rectangle 2 { 3 private: 4 int width, height; 5 public: 6 Rectangle(int,int); 7 int GetArea() {return height * width;} 8 } RedmerAlexanderBertens-Nov22017-slide7of93 Writingatask This avoids having to repeat common code for all classes but can sometimes make understanding the code a bit tricky Classes and inheritance Classes are nice, because they can be derived from one-another CRectangle is derived from base class CPolyogon, and inherits its members RedmerAlexanderBertens-Nov22017-slide8of93 Writingatask

Description:
Redmer Alexander Bertens - Nov 2 2017 - slide 1 of 93. Writing a task analysis tutorial webpage - including recordings of the sessions. Redmer
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.