General Purpose ROOT Utilities Victor Perevoztchikov, BNL.

Slides:



Advertisements
Similar presentations
MPI Message Passing Interface Portable Parallel Programs.
Advertisements

Why ROOT?. ROOT ROOT: is an object_oriented frame work aimed at solving the data analysis challenges of high energy physics Object _oriented: by encapsulation,
This Time Pointers (declaration and operations) Passing Pointers to Functions Const Pointers Bubble Sort Using Pass-by-Reference Pointer Arithmetic Arrays.
File Management Chapter 12. File Management File management system is considered part of the operating system Input to applications is by means of a file.
O. Stézowski IPN Lyon AGATA Week September 2003 Legnaro Data Analysis – Team #3 ROOT as a framework for AGATA.
CS 4800 By Brandon Andrews.  Specifications  Goals  Applications  Design Steps  Testing.
Computer Science 1620 Other Data Types. Quick Review: checklist for performing user input: 1) Be sure variable is declared 2) Prompt the user for input.
Jan 28, 2003CS475: Internetworking with UNIX TCP/IP1 XDR, RPC, NFS Internetworking with UNIX TCP/IP Winter
Guide To UNIX Using Linux Third Edition
Chapter 3 Software Two major types of software
CS364 CH08 Operating System Support TECH Computer Science Operating System Overview Scheduling Memory Management Pentium II and PowerPC Memory Management.
From C++ to C#. Web programming The course is on web programming using ASP.Net and C# The course is on web programming using ASP.Net and C# ASP.Net is.
POSIX: Files Introduction to Operating Systems: Discussion 1 Read Solaris System Interface Guide: Ch. 5.1 Basic File I/O.
Sept 11, 2003ROOT Day1, Suzanne Panacek39 ROOT An object oriented HEP analysis framework. Day 1.
STAR C OMPUTING Maker and I/O Model in STAR Victor Perevoztchikov.
Data Objects (revisited) Recall that values are stored in data objects, and that each data object holds one value of a particular type. Data objects may.
M.Frank CERN/LHCb - Persistency Workshop, Dec.2004 Agenda: 2 separate talks! Don’t mangle together what does not belong together 1.Schema Evolution Tests.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
Object Oriented Programming Philosophy. Part 1 -- Basic Understanding & Encapsulation.
Files and Streams. Java I/O File I/O I/O streams provide data input/output solutions to the programs. A stream can represent many different kinds of sources.
Oracle Data Integrator Procedures, Advanced Workflows.
IPC Working Group 30 - Updates on IT support for the IPC Geneva November 6, 2013 Patrick Fiévet Head of IT Systems Section.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
UNIX Files File organization and a few primitives.
CSC 221: Recursion. Recursion: Definition Function that solves a problem by relying on itself to compute the correct solution for a smaller version of.
GAM 200 Club. How to Game Engine GAM 200 Club Zachary Nawar.
STAR STAR VMC tracker V. Perevoztchikov Brookhaven National Laboratory,USA.
Session 7 Methods Strings Constructors this Inheritance.
1 Review. 2 Creating a Runnable Program  What is the function of the compiler?  What is the function of the linker?  Java doesn't have a linker. If.
STAR Event data storage and management in STAR V. Perevoztchikov Brookhaven National Laboratory,USA.
HTLM Forms CS3505. Form Handling in Browser html User Files out form WEbBROWSErWEbBROWSEr User read response submit Get URL?input html Get file html script.
Introduction to Java Chapter 7 - Classes & Object-oriented Programming1 Chapter 7 Classes and Object-Oriented Programming.
Operating Systems Process Creation
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
AliRoot survey P.Hristov 11/06/2013. Offline framework  AliRoot in development since 1998  Directly based on ROOT  Used since the detector TDR’s for.
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Salman Marvasti Sharif University of Technology Winter 2015.
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
STAR Schema Evolution Implementation in ROOT I/O V. Perevoztchikov Brookhaven National Laboratory,USA.
Managing C++ CHRIS DAHLBERG MID-TIER DEVELOPER SCOTTRADE.
STAR STAR MC Filter V. Perevoztchikov Brookhaven National Laboratory,USA.
Statistical feature extraction, calibration and numerical debugging Marian Ivanov.
9/28/2005Philippe Canal, ROOT Workshop TTree / SQL Philippe Canal (FNAL) 2005 Root Workshop.
Online Monitoring System at KLOE Alessandra Doria INFN - Napoli for the KLOE collaboration CHEP 2000 Padova, 7-11 February 2000 NAPOLI.
More about Java Classes Writing your own Java Classes More about constructors and creating objects.
Classes, Interfaces and Packages
FILE MANAGEMENT SYSTEM Group Members RAMOLY Nathan HEMMI Florent AZANGUE Roméo CHOUIKH Jaouher JRIDI Bayrem NINTIDEM Estelle Olivia Supervisor M. TIMSIT.
CINT & Reflex – The Future CINT’s Future Layout Reflex API Work In Progress: Use Reflex to store dictionary data Smaller memory footprint First step to.
Announcements Assignment 1 due Wednesday at 11:59PM Quiz 1 on Thursday 1.
ROOT Workshop M.Frank LHCb/CERN Improvements in the I/O Area (*)  General I/O related improvements  Tree related issues  Plans (*) I present.
S.Linev: Go4 - J.Adamczewski, H.G.Essel, S.Linev ROOT 2005 New development in Go4.
STAR Persistent Pointers in the STAR Micro-DST V. Perevoztchikov Brookhaven National Laboratory,USA.
StEvent I/O Model And Writing a Maker Or How to Add a New Detector Akio Ogawa BNL 2003 Nov Dubna.
STAR SVT Self Alignment V. Perevoztchikov Brookhaven National Laboratory,USA.
STAR Simulation. Status and plans V. Perevoztchikov Brookhaven National Laboratory,USA.
Go4 Workshop J.Adamczewski-Musch, S.Linev Go4 advanced features.
9 Associators How to relate objects to each other Create relations Save relations Use relations: Associators.
Ch. 31 Q and A IS 333 Spring 2016 Victor Norman. SNMP, MIBs, and ASN.1 SNMP defines the protocol used to send requests and get responses. MIBs are like.
Joe Foster 1 This talk extends the one I gave in 2006 called Visualizing Data with ROOT. –
2001 ROOT Workshop The Summary. Content Most Requested Request already satisfied Build and Distribution Web Page Information and Documentation.
University of Central Florida COP 3330 Object Oriented Programming
Chapter 3 Software Interfaces.
UNIX PROCESSES.
INTRODUCTION TO UNIX: The Shell Command Interface
This pointer, Dynamic memory allocation, Constructors and Destructor
Lecture 4: Process Memory Layout
Automated support of STL containers
FOR statement a compact notation for a WHILE e.g. sumgrades = 0;
SPL – PS1 Introduction to C++.
CSE 303 Concepts and Tools for Software Development
Presentation transcript:

General Purpose ROOT Utilities Victor Perevoztchikov, BNL

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework List of Utilities Set of ROOT classes was developed in STAR experiment. These classes are experiment independent and, we hope, could be used useful in other experiments too. The names of classes are self described:  TUnixTime;  TDirIter;  TMemStat;  THelixTrack;  TTreeIter;  TJobOption.

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TUnixTime & TMemStat  TUnixTime: small simple class, allows simple conversion from/to local unix time to gmt(Greenwich time) and vice versa. User interface is very simple and clear:  SetUTime(UInt_t utime) // Set Unix time;  SetLTime(Int_t idate, Int_t itime); // Set local time:  SetGTime(Int_t idate, Int_t itime); //Set global time:  GetLTime(Int_t &idate, Int_t &itime) //Get local time;  GetGTime(Int_t &idate, Int_t &itime) //Get global time; Internally class contains standard Unix time (time_t).  TMemStat: memory statistics. Similar to ROOT TBenchmark, but for memory. Useful for leak search. Functionality:  Get the current heap memory size;  Print size and difference from the previous call;  Print summary statistics;  Get current program size;  There is a conversion service between these two, provided by user;  Relationship between the objects (pointers) is supposed to be done by conversion service and usually not discussed;  Schema evolution is also not discussed too much.

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TDirIter It is iterator over Unix directories. Initialized by user request in wild card or regular expression form. Allows wild card not only for files but for directories too. Example: TDirIter iter(“/afs/dir1/dir*123/*any/myfile.*.root”); char *file =0; While(char *file = iter.NextFile()) { printf(“file=%s\n”,file); } It is useful when user needs to process a lot of files from different directories with some wild card or regular expression selections for files and for directories too.

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework ThelixTrack This class represents helix space line, i.e track in constant magnetic field. GEANT3 representation of helix used, no singularity at curvature~=0. Initialization by 1 st space point,moving direction,curvature and field direction. By default field direction along Z. Functionality:  Step from the beginning to the given distance along the helix. End space point and direction is returned;  Step along the helix to the point nearest to the given one.  Step along the helix up to crossing the surface 1 st or 2 nd order;  Creation of helix as a fit to the given set of space points

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TTreeIter TTreeIter is an additional user interface. There are three TTree interfaces in ROOT: GetEntry, Draw and MakeClass:  GetEntry is very general but low level interface;  Draw is very convenient but limited to one line expression;  MakeClass is very general but not too much flexible:  Special code must be generated;  If TTree is changed, user must regenerate MakeClass code;  User must activate used branches manually. Activation of all branches leads to performance degradation; TTreeIter is the further development of MakeClass approach. But:  No code is generated;  TTree changing does not affect the user code;  Needed branches are activated automatically, like it was in PAW;

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TTreeIter Example TTreeIter iter; iter.AddFile("path1/raw*/minibias*event*.root"); iter.AddFile("path2/mc*/central*event*.root"); // init of user variables const int &ntrk = iter("fTracks"); const Float_t *&pz = iter("fTracks.fPz"); // Now the user variables ntrk and pz are initialized and needed branches // automatically activated. These variables are referenced to internal // hidden buffers, which will be automatically updated during iteration. TH1F *hz = new TH1F("Z","Z distribution",50,-5.,+5.); // Now iterations while (iter.Next()) { for (int itr=0;itr Fill( pz[itr]); } }

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TJobOption Each experiment usually develops own application to define job option for production. In fortran era was often used FFREAD package. Now it is outdated. To make such application is not simple at all. But now, using power of ROOT/CINT, such application could be very simple and very powerful. TJobOption is such class. Example of input job option file: namespace RawData { int trigger = 12345; char *mode = “TPC_ONLY”; } namespace V0Cuts { double deltaMass = 0.01; VCut *cut = new VCut(11,12,13,14); } The complication of the input language is limited only by CINT; GetEntry is very general but low level interface;  Draw is very convenient but limited to one line expression;  MakeClass is very general but not too much flexible:  Special code must be generated;  If TTree is changed, user must regenerate MakeClass code;  User must activate used branches manually. Activation of all branches leads to performance degradation; TTreeIter is the further development of MakeClass approach. But:  No code is generated;  TTree changing does not affect the user code;  Needed branches are activated automatically, like it was in PAW;

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework TJobOption (Continue) Now how to get values: TJobOption::ReadFile(“MyJobOpt.jopt”); TJobOption::ReadFile(“HisJobOpt.jopt”); …. // for RawData namespace TJobOption *raw = new TJobOption(“RawData”); int trig = raw->GetI(“trigger”,-1) // 2 nd argument is default char *mode = raw->GetS(“mode”,”ALL”); // for “V0Cuts” namespace TJobOption v0c (“V0Cuts”); double dm = v0c.GetD(“deltaMass”,0.1); VCut *cut = (Vcut*) v0c.GetV(“cut”,0);

Victor Perevoztchikov, BNL/CERN ROOT foreign class I/O in the LCG framework Conclusions  Five experiment independent and ROOT oriented classes were developed and tested;  All ROOT users invited to try them. All feedback is very appreciated;  How to get them?  Send to  Try AFS: /afs/rhic/star/packages/.DEV/StRoot/StarRoot.