PelROOT
The Pelletron-Linac data analysis tools for ROOT

ScanRoot

The ScanRoot is a modified version of ROOT compiled with all the PelROOT libraries. You can use the scanroot program to process data files (.FIL) to create histograms and/or use it to do final histogram analysis such as projections, fits, etc.

Starting ScanROOT

To start the ScanRoot just type:

spmroot [options] [file1] [file2] ...

where the optional parameters are:
When the program starts it will show the following prompt


and a graphical interface as shown next.

The graphical interface

When ScanRoot starts it shows the following graphical interface:

on the top of the window there is a quick access bar with the most used commands (this is a static bar). The most simple data processing can be done by just following the order of the buttons in this bar.

The buttons in the quick access bar correspond to the following actions: Bellow the quick access bar is located the main interface, divided in tabs. There are 3 tabs in total corresponding to:

The File tab

The File tab contains buttons and information for file I/O. The interface in this tab looks like:

The buttons in the File tab correspond to the following actions: There are also four text entries in the Tab that correspond to the file names that are being used for data processing.

The Output Saving Mode selection tab sets how the parameters are saved in the output file, if there is an output file open. The default option is to save all the parametes. If the Only new parameters is selected, the output file will contain only the new parameters that are created during data process. The original parameters from the input file are not propagated to the output. To know more about creating new paramentes, click here.

The Data tab

The Data tab contains buttons and information for data processing. The interface in this tab looks like:

The buttons in the Data tab correspond to the following actions: There are two selection buttons in this tab:

The Tools tab

The Tools tab contains buttons and information for some useful tools. The interface in this tab looks like:

The buttons in the Tools tab correspond to the following actions:

Command prompt interface

The command line is particularly interesting when the user wants to automate the event processing because the user can write a macro containing the instructions to process a lot of files at once.

There are two modes of using the command line.
  1. Using some pre-defined functions in the ScanRoot program.
    • ScanRoot has a set of pre-defined functions that makes the prompt interface easier for the user that is not familiar with C++ objects. The set of functions is limited but contains all the basic functions for the regular processing of event files.

      NOTE: Use this functions ONLY in the command line mode or inside macros that run in command mode. Do not use these function inside histograms or Level 2 programs because the compiler will not recognize them.
  2. Using the pointer to the ScanRoot object.
    • There is a global variable gSCAN that points to the ScanRootGui object in the computer memory. ScanRootGui is derived from ScanRoot and has public methods for all the features ScanRoot can offer. It is also possible to directly get a pointer to the PelTools and PelIO objects in the memory. The use of gSCAN pointer is more flexible than the previous method but requires some knowledge of C++ programming.

      NOTE: The global variable gSCAN is available only in the command line mode or inside macros that run in command mode. Do not use gSCAN inside histograms or Level 2 programs because the compiler will not recognize it.
Here is an example of a macro that process 2 .FIL files and save the histograms to files:
void macro()
{
  hac("histograms.cxx"); // loads the histogramming program
 
  openInput("file1.fil"); // opens the 1st .FIL file
  go(); // process all the events in this file
  saveHist("file1.root"); // saves the fistograms to file1.root
  closeInput();

  zero(); //zero all histograms. The file1.root WILL NOT be zeroed. Just the memory
  openInput("file2.fil"); // opens the 2nd .FIL file
  go(); // process all the events in this file
  saveHist("file2.root"); // saves the fistograms to file1.root
  closeInput();
}
To run this macro, type, at the ScanRoot prompt (if the macro is saved as macro.C)

.x macro.C

The ScanRoot pre-defined functions are:

ScanRoot and ScanRootGui objects in memory

SPMRoot and ScanROOT is constructed in a object oriented framework.

While loading histogramming or filtering code, the program (SPMRoot or ScanROOT) passes a pointer to an internal ScanRoot object. This object is responsible for all the interface between the user and the data. There are many functions available for data manipulation and environment configuration. Some of them are shortcutted in the ScanRoot pre-defined functions (above). Also, while using ScanROOT program there is a global pointer (gSCAN) to the ScanRootGui object created in the memory. The user can utilize this pointer to get access to many public methods available in this object or to other objects, such as the PelIO and PelTools objects.

The basic classes for data manipulation in this framework are listed bellow: The documentation for the PelROOT classes can be found here.

26 09 06 - 17:59 |

Last Comments

Options:

Calendar

« May 2024
S M T W T F S
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Last Comments

admin (version 3.01): Both men and women are wo…
Appannababu (Make your questio…): Hello Patrico, Thanks, I …
Patricio Carnelli… (Make your questio…): Hi Appannababu, This scri…
Appannababu (Make your questio…): Hello, I am new t…
cheap nashville p… (Using Graphical C…): Thanks for your sharing.i…
Supra Skytop (version 3.01): This topic was really edu…
Supra Sneakers (Using Graphical C…): Hey, appreciate it for ta…
Patricio Carnelli… (Make your questio…): Hello, I’m a PhD student …
Bob (Pivot 1.30 Beta 2…): And this is what a commen…

Search site

Archives

01 Sep - 30 Sep 2006
01 Dec - 31 Dec 2006
01 Jan - 31 Jan 2007
01 Feb - 28 Feb 2007
01 Mar - 31 Mar 2007
01 Apr - 30 Apr 2007
01 Jun - 30 Jun 2007
01 Oct - 31 Oct 2007
01 May - 31 May 2008
01 Oct - 31 Oct 2008
01 May - 31 May 2013
01 Nov - 30 Nov 2013
01 Jun - 30 Jun 2014

RSS & Atom

XML: RSS Feed XML: Atom Feed