AliRoot I/O and Folder Alice Offline-Week 10-15 V 2002 Piotr Krzysztof Skowroński June 11, 2002.

Slides:



Advertisements
Similar presentations
CS 450 Module R4. R4 Overview Due on March 11 th along with R3. R4 is a small yet critical part of the MPX system. In this module, you will add the functionality.
Advertisements

Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
5/2/  Online  Offline 5/2/20072  Online  Raw data : within the DAQ monitoring framework  Reconstructed data : with the HLT monitoring framework.
Code Review Offline Week Piotr Krzysztof Skowroński 10 March 2004.
Object Oriented Programming COP3330 / CGS5409.  C++ Automatics ◦ Copy constructor () ◦ Assignment operator =  Shallow copy vs. Deep copy  DMA Review.
Andreas Morsch CERN/ALICE 3rd LHC Computing WorkshopMarseille, September 30, 1999 Base Classes for Simulation The ALICE Simulation Strategy Andreas Morsch.
 2006 Pearson Education, Inc. All rights reserved Midterm review Introduction to Classes and Objects.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
C++ data types. Structs vs. Classes C++ Classes.
Templates. Class templates – why? Writing programs we often use abstract data types such as stack, queue or tree. Implementations of these types may be.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 7: Advanced File System Management.
File System. NET+OS 6 File System Architecture Design Goals File System Layer Design Storage Services Layer Design RAM Services Layer Design Flash Services.
Chiara Zampolli in collaboration with C. Cheshkov, A. Dainese ALICE Offline Week Feb 2009C. Zampolli 1.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
STAR C OMPUTING Maker and I/O Model in STAR Victor Perevoztchikov.
Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 7: Advanced File System Management.
Alice off-line meeting Alberto Colla Cern, October 3, 2005 AliEn How-To Alice off-line meeting Cern, October 3, 2005 Alberto Colla (Alice off-line Calibration.
Olga Barannikova STAR Dubna Meeting STAR Software Basics Compiling using 'cons' STAR_LEVELS, starver and changing environment Coding Standards for.
By Noorez Kassam Welcome to JNI. Why use JNI ? 1. You already have significantly large and tricky code written in another language and you would rather.
Update on the new reconstruction software F. Noferini E. Fermi center INFN CNAF EEE Analysis Meeting - 14/09/20151.
Framework for Raw Data Thomas Kuhr Offline Week 29/06/2004.
ALICE Simulation Framework Ivana Hrivnacova 1 and Andreas Morsch 2 1 NPI ASCR, Rez, Czech Republic 2 CERN, Geneva, Switzerland For the ALICE Collaboration.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Andreas Morsch, CERN EP/AIP CHEP 2003 Simulation in ALICE Andreas Morsch For the ALICE Offline Project 2003 Conference for Computing in High Energy and.
N ATIONAL E NERGY R ESEARCH S CIENTIFIC C OMPUTING C ENTER Charles Leggett Interval of Validity Service IOVSvc ATLAS Software Week May Architecture.
ALICE Condition DataBase Magali Gruwé CERN PH/AIP Alice Offline week May 31 st 2005.
Persistent Object References in ROOT1 Persistent Object References in ROOT I/O Status & Proposal CMS-ROOT meeting CERN- November 27 Ren é Brun ftp://root.cern.ch/root/refs.ppt.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
1 ALICE OFFLINE :ORGANIZATION A user point of view Yves Schutz, SUBATECH, France (PHOS biased)
Linux+ Guide to Linux Certification, Third Edition
Debugging of # P. Hristov 04/03/2013. Introduction Difficult problem – The behavior is “random” and depends on the “history” – The debugger doesn’t.
Optimizing I/O Performance for ESD Analysis Misha Zynovyev, GSI (Darmstadt) ALICE Offline Week, October 28, 2009.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Today: –Review declaration, implementation, simple class structure. –Add an exception class and show.
THE C PROGRAMMING ENVIRONMENT. Four parts of C environment  Main menu  Editor status line and edit window  Compiler message window  “Hot Keys” quick.
Alberto Colla - CERN ALICE off-line week 1 Alberto Colla ALICE off-line week Cern, May 31, 2005 Table of contents: ● Summary of requirements ● Description.
A. Gheata, ALICE offline week March 09 Status of the analysis framework.
FILE MANAGEMENT SYSTEM Group Members RAMOLY Nathan HEMMI Florent AZANGUE Roméo CHOUIKH Jaouher JRIDI Bayrem NINTIDEM Estelle Olivia Supervisor M. TIMSIT.
03/06/08Gustavo Conesa PWG4 1/14 Particle identification and Hadron/Jet correlations analysis framework Description, Status, HOW TO use and.
October 10-12, 1 AliRoot: I/O organisation ROOT in the ALICE experiment I/O Structure Run-Time Data-Exchange.
Learners Support Publications Working with Files.
I. BelikovALICE Offline Week, CERN, 12 June ESD Classes and the Combined Reconstruction What is the ESD ? Two new classes AliESD and AliESDtrack.
StEvent I/O Model And Writing a Maker Or How to Add a New Detector Akio Ogawa BNL 2003 Nov Dubna.
Analysis train M.Gheata ALICE offline week, 17 March '09.
AliRoot Classes for access to Calibration and Alignment objects Magali Gruwé CERN PH/AIP ALICE Offline Meeting February 17 th 2005 To be presented to detector.
Axel Naumann, DØ University of Nijmegen, The Netherlands 6/20/2001 Dutch Morning Meeting 1 From n-Tuples to b-Tags ?
AliRoot survey: Reconstruction P.Hristov 11/06/2013.
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
Some topics for discussion 31/03/2016 P. Hristov 1.
AAF tips and tricks Arsen Hayrapetyan Yerevan Physics Institute, Armenia.
ALICE Offline Week – 22 Oct Visualization of embedding Matevz Tadel, CERN Adam Kisiel, Ohio State University.
HYDRA Framework. Setup of software environment Setup of software environment Using the documentation Using the documentation How to compile a program.
Monthly video-conference, 18/12/2003 P.Hristov1 Preparation for physics data challenge'04 P.Hristov Alice monthly off-line video-conference December 18,
CALIBRATION: PREPARATION FOR RUN2 ALICE Offline Week, 25 June 2014 C. Zampolli.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 7: Advanced File System Management.
V4-18-Release P. Hristov 21/06/2010.
TK1924 Program Design & Problem Solving Session 2011/2012
Code&Semantic Observations
PPR Production – What Is Available
News on the CDB Framework
AliRoot status and PDC’04
Progress with MUON reconstruction
Analysis framework - status
This pointer, Dynamic memory allocation, Constructors and Destructor
Loaders and Linkers: Features
Machine Independent Features
File Input and Output.
Modern PC operating systems
File System Management
Presentation transcript:

AliRoot I/O and Folder Alice Offline-Week V 2002 Piotr Krzysztof Skowroński June 11, 2002

2P. K. Skowroński Alice Offline Week11 May 2002 Goal All data types goes to the separate file. Each event is stored in separate root-directory within root file One tree per event for each data type – no event number embedded in the tree name Data exchange through folders.

3P. K. Skowroński Alice Offline Week11 May 2002 TPC.RecPoints.root Object Tree TPC.Hits.root Root dir Folder Kine.root Event #2 TreeH Event #2 TreeK Event #1 TreeH Event #1 TreeK TPC.Digits.root Event #1Event #2 File ITS.Tracks.rootITS.Digits.rootTPC.Tracks.rootITS.Hits.rootTPC.RecPoints.root Object g a lice.root RunLoader gAlice TreeE TreeD

4P. K. Skowroński Alice Offline Week11 May 2002 Idea of Loaders Loader is an object responsible for openning/closing files Manages files and directory (OS as well as ROOT) names Posting data from file to folder – reading and vice versa - writing Plus some shortcut methods for accessing data from folders e.g instead of calling dynamic_cast (fEventFolder->FindObject(fgkHeaderContainerName)); each time, one can use loader->TreeH();

5P. K. Skowroński Alice Offline Week11 May 2002 Two types of loaders Run Loader (AliRunLoader) Manages all central data  AliRun - gAlice  Header – TreeE  Kinematics - TreeK  Track References - TreeTR  Run Loader itself Detector Loader (AliLoader) Manages all data related to each detector  Hits – TreeH  Summable Digids – TreeS  Digits – TreeD  Reconstructed Points – TreeR  Tracks – TreeT

6P. K. Skowroński Alice Offline Week11 May 2002 AliLoader AliLoader implements all standard functionality However if any detector needs other behaviour of loader than standard – it should create detector specific loader and overload proper methods The same applies if extensions are needed See example of AliPHOSLoader

7P. K. Skowroński Alice Offline Week11 May 2002 AliRunLoader Decouples all I/O management from AliRun It stays itself in folder as well Is written to galice.root as an object Manages event reloading (as an only one object in aliroot) Is an owner of AliStack and AliHeader Is responsible for reloading events

8P. K. Skowroński Alice Offline Week11 May 2002 Architecture AliRunLoader is a central I/O manager It is created in Config.C and set to gAlice object AliRunLoader has a list of AliLoaders Each detector registers its loader during MC initialization Detector itself stores the pointer to its loader  Faster data access If detector is read from file, it gets pointer to its loader automatically  AliDetector is not „owner” of loader!

9P. K. Skowroński Alice Offline Week11 May 2002 Usage Each session should be started from loading RunLoader itself static AliRunLoader* AliRunLoader::Open(const char* filename = "galice.root", const char* eventfoldername= AliConfig::fgkDefaultEventFolderName, Option_t* option = "READ"); For example AliRunLoader *rl = AliRunLoader::Open("galice.root","MyFolder","READ"); if (rl == 0x0) { cerr<<"Can not open session for file galice.root"; return; }

10P. K. Skowroński Alice Offline Week11 May 2002 AliRunLoader::Open This method tries 1.to open file in mode specified by option 2.Find the run loader object in file If file option is „new”, „create” or „recreate” it creates new AliRunObject instead 3.Calls AliConfig::BuildEventFolder to create folder structure for event 4.Puts AliRunLoader in folder and returns pointer to it 5.In case of error returns NULL

11P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliRunLoader) In order to load data LoadgAlice – loads AliRun LoadHeader – Loads TreeE, creates AliHeader, sets address in tree and gets header for current event LoadKinematics – Opens kine file, posts TreeK for current event to folder. If header loaded calls AliStack::GetEvent which connects Tree. LoadTrackRefs – Opens file with track references and puts them in folder

12P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliRunLoader) To write data, call WriteKinematics WriteHeader WriteTrackRefs Tu unload data UnloadKinematics UnloadHeader UnloadTrackRefs UnloadgAlice

13P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliLoader) To load detector specific data call following methods LoadHits – loads hits for given detector LoadSDigits – loads summable digits LoadDigits – LoadRecPoints – LoadTracks – All methods above takes Option_t as a parameter, which is passed to TFile::Open

14P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliLoader) To write detector specific data call following methods WriteHits – writes hits for given detector WriteSDigits – writes summable digits WriteDigits – WriteRecPoints – WriteTracks – They take option, which can be „OVERWRITE” to force overwriting

15P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. To unload call UnloadDataType e.g.  UnloadHits To make new container (tree) call MakeDataTypeContainer e.g.  AliLoader::MakeHitsContainer  AliRunLoader::MakeKineContainer Old style MakeTree(Option_t*) is supported as well  AliRunLoader::MakeTree(”K”) – makes TreeK  AliRunLoader::MakeTree(”H”) – makes TreeH for all loaders in the list  AliLoader::MakeTree(”D”) – makes TreeD for only one detector However it does not support option „TR” since it will be recognized as Track Tree and Recostruction Tree

16P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. To get access to data (trees) one can use shortcut methods like AliLoader::TreeH() AliLoader::TreeS() AliRunLoader::TreeK() AliRunLoader::TreeE()

17P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliRunLoader) To get loader for specific detector use AliLoader* GetLoader(const char* name) AliLoader* GetLoader(AliDetector* name) Getting event: AliRunLoader::GetEvent(Int_t) Reloads all loaded data, for example AliRunLoader *rl = AliRunLoader::Open("galice.root","MyFolder","READ"); rl->GetEvent(0);//(1) – redundant: default is event 0 rl->LoadKinematics("READ");//(2)-loads kinematics AliLoader* tpcloader = rl->GetLoader("TPCLoader");//(3) tpcloader->LoadDigits("RECREATE");//(4)-loads Digits for TPC rl->GetEvent(1);//(5) At the moment of loading data (2),(3),(4) they are loaded for event 0 (current event). GetEvent in line (5) causes that all loaded data are reloaded for event 1.

18P. K. Skowroński Alice Offline Week11 May 2002 Usage cont. (AliRunLoader) To load detector data you can use method AliRunLoader::LoadDataType (Option_t* detectors="all", Option_t* opt="READ") eg: AliRunLoader::LoadHits() – calls LoadHits("READ") for all loaders AliRunLoader::LoadHits("TPC ITS PHOS") calls LoadHits("READ") for TPC, ITS and PHOS laoders AliRunLoader::LoadHits("all","update") calls LoadHits("update") for all loaders

19P. K. Skowroński Alice Offline Week11 May 2002 Status New I/O version is merged with v It compiles for all detectors but EMCAL TPC even works up to tracking Take it as a practical example display.C works as well I already wrote some documentation up to now rather poor however

20P. K. Skowroński Alice Offline Week11 May 2002 Substitutions AliRun::GetEvent(Int_t) AliRun::Stack() AliRun::GetHeader() AliRun::TreeK() AliRun::TreeE() AliRun::TreeH() AliRun::TreeS() AliRun::TreeD() AliRun::TreeR() AliRunLoader::GetEvent(Int_t) AliRunLoader::Stack() AliRunLoader::GetHeader() AliRunLoader::TreeK() AliRunLoader::TreeE() AliLoader::TreeH() AliLoader::TreeS() AliLoader::TreeD() AliLoader::TreeR()

21P. K. Skowroński Alice Offline Week11 May 2002 Clue How to get access to Run Loader? Add a data member with folder name  In AliDetector is not needed – it already have pointer to its AliLoader. AliRunLoader is easily accessible from folder using static method AliRunLoader* AliRunLoader:: GetRunLoader(const char* eventfoldername); Set the event folder name from the place you open session – macro, manager or superior class

22P. K. Skowroński Alice Offline Week11 May 2002 Example AliRunLoader *rl = AliRunLoader::Open("galice.root","Event",“read"); rl->LoadgAlice(); gAlice = rl->GetAliRun();//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AliTPC *TPC = (AliTPC*)gAlice->GetDetector("TPC"); AliLoader * tpcl = rl->GetLoader("TPCLoader"); tpcl->LoadHits("READ"); tpcl->LoadSDigits("RECREATE"); Int_t nevent = rl->GetNumberOfEvents(); for for(Int_t eventn =0;eventn<nevent;eventn++) { rl->GetEvent(eventn); TPC->Hits2SDigits2(eventn); tpcl->WriteSDigits(“OVERWRITE”); } delete delete rl;