g anil r oot u tilities

62
Ganil Root Utilities Luc Legeard (legeard @ ganil.fr)

Upload: raisie

Post on 02-Feb-2016

38 views

Category:

Documents


0 download

DESCRIPTION

G anil R oot U tilities. Luc Legeard (legeard @ ganil.fr). Summary (1). - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: G anil  R oot  U tilities

Ganil Root Utilities

Luc Legeard (legeard @ ganil.fr)

Page 2: G anil  R oot  U tilities

1) Ganil Acquisition

2) ROOT- Generalities- Example of simple histogram- TTree

3) GRUa) Generalitiesb) Standard Analysis

- runs, generator, narval c) User Analysis

Guser Filesd) Usage of GRU in Ganil Acquisition

Summary (1)

Page 3: G anil  R oot  U tilities

4) Vigru

5) Other products-Ganil_Tape -Calimero-Spectra Server

6) Conclusion

Summary (2)

Page 4: G anil  R oot  U tilities

GUIGUI

GANIL DAQ general architecture

Experiment description Data Base

Global Run Control Core

Electrinics Control Core

Data Flow

Electronics

Main components

GUIGUI

Electronics Control Core

Narval

Page 5: G anil  R oot  U tilities

GUIGUI

GANIL DAQ general architecture

Experiment description Data Base

Global Run Control Core

Electrinics Control Core

Data Flow

Electronics

Main components

GUIGUI

Electronics Control Core

Narval

• Configure Data Flow System• Save/restore a configuration• Commands to global setup, start, stop electronics through Electronics Control Core(s)• Commands to control data flow elements• Monitor DAQ (status, data rate...)?• Handle error messages

Page 6: G anil  R oot  U tilities

GUIGUI

GANIL DAQ general architecture

Experiment description Data Base

Global Run Control Core

Electronics Control Core

Data Flow

Electronics

Main components

GUIGUI

Electronics Control Core

Narval

•Slow Control :•Describe hardware configuration•Save / restore hardware configurations•Setup boards registers•Monitor boards (temperatures, voltages ..)

•Electronics Run Control :•Embedded readout process state machine•Setup the embedded readout processes•Dispatch commands from Global Run Control to the embedded readout processes

Page 7: G anil  R oot  U tilities

GUIGUI

GANIL DAQ general architecture

Experiment description Data Base

Global Run Control Core

Electrinics Control Core

Data Flow

Electronics

Main components

GUIGUI

Electronics Control Core

Narval

NARVAL

• Distributed Data Acquisition System• Readout from front end electronics• Filtering• Event Building• Storage

Page 8: G anil  R oot  U tilities

GUIGUI

GANIL DAQ general architecture

Experiment description Data Base

Global Run Control Core

Electrinics Control Core

Data Flow

Electronics

Main components

GUIGUI

Electronics Control Core

Narval

Analysis With GRU/vigru

• GRU connected on each wanted Narval Actor via the “Watcher”

Page 9: G anil  R oot  U tilities

http: //root.cern.ch- Documentation- Download- Forum- Support

-Freeware-C++-CINT

“ROOT is an object-oriented framework aimed at solving the data analysis challenges of high-energy physics.” René Brun

ROOT

Page 10: G anil  R oot  U tilities

A real success

ROOT

Page 11: G anil  R oot  U tilities

French / English Courses

John Franckland franckland@ ganil.fr (Ganil)Daniel Cussol [email protected] (LPC Caen)

They propose 4 days courses :

https: //launchpad.net/formationroot

Downloadable pdf documentation

ROOT

Page 12: G anil  R oot  U tilities

ROOT with a simple example

Page 13: G anil  R oot  U tilities

TTree

******************************************* Row* X * Y * Z ******************************************** 0 * 1.102278 * 1.799389 * 4.4528222 ** 1 * 1.8671779 * 0.596621 * 3.8423130 ** 2 * 0.524181 * 1.8685209 * 3.7661390 ** 3 * 0.380611 * 0.9691280 * 1.0840740 ** 4 * 0.5524539 * 0.212309 * 0.350281 ** 5 * 0.184954 * 1.1873049 * 1.4439020 *...* 22 * 1.2211090 * 0.8143829 * 2.1543269 ** 23 * 1.4131350 * 1.5498369 * 4.3989419 ** 24 * 0.174493 * 1.330937 * 1.8018410 *

TTree = Data base of Events for ROOT

TTree* mytree = new TTree(“MyTree”)

mytree >Draw(“Z:Y:X”)

Leaves

Events

Nota : Leaves can be complex, vectors, structure, root object

Page 14: G anil  R oot  U tilities

GRU

• In Wikipedia GRU or Glavnoye Razvedyvatel'noye Upravleniye is the foreign military

intelligence directorate of the General Staff of the Armed Forces of the Russian Federation (formerly the Soviet Army General Staff of the Soviet Union). GRU is the English transliteration of the Russian acronym ГРУ, which stands for "Главное Разведывательное Управление", meaning Main Intelligence Directorate. The official full name translation is II Main Directorate of the General Staff of the Armed Forces of the Russian Federation. Other name, GRU GSh (GRU Generalnovo Shtaba, i.e. "GRU of the General Staff").

The GRU is Russia's largest foreign intelligence agency.[1] In 1997 it deployed six times as many agents in foreign countries as the SVR, which is the KGB intelligence successor. It also commanded 25,000 Spetsnaz troops in 1997.[2]

Page 15: G anil  R oot  U tilities

GRU

• Main functions of GRU:– Analyse physic Ganil data.

• On-line from old and new Acquisition (via network)• Off-line reading raw data files (Runs)

– Convert raw data files in ROOT files (TTree)• Standard conversion (one leaf /parameter)• Specific user conversion (sorted in vectors…)

• GRU = ROOT and Ganil C++ Libraries

Page 16: G anil  R oot  U tilities

GRU Overview

User C++Code

Spectra____________________________

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Tcip requests

Spectra

Input

DeviceRuns

Narval Actorvia

Watcher

RandomGenerator

ROOT files (TTrees, histograms)Runs

SpyNetwork

GRU VIGRU

Page 17: G anil  R oot  U tilities

GRU

•Use Cint to get command • Very useful to debug and prepare a

acquisition• C++ command (easy script)• But Cint is fragile due to its memory

handling• Impossible use interactively with a

running thread

GRUCore

QuickTime™ et undécompresseur BMP

sont requis pour visionner cette image.

•Use soap server to get commands.

• Less friendly• All usages cases are not treated• But more robust against crash

SoapServer

Page 18: G anil  R oot  U tilities

Information, Download, Installation :

http://wiki.ganil.fr/gap/wiki/Documentation/Software/Gru

Requirement :-OS : linux, MacOS-Gcc, g++-ROOT installed

-untar package (>tar -xvf GRUv_12_03.tar)>cd GRU

>./make_package to built allor

>./make_package_ganil to include network specific ganil libraries

>source thisgru.sh (source thisgru.csh) // to define $GRUDIR and complement $PATH and $LD_LIBRARY_PATH

GRU : installation

Page 19: G anil  R oot  U tilities

>Run script “make_html_doc” to generate html class documentation>Browse ./htmldoc/index.html

GRU : html doc

Page 20: G anil  R oot  U tilities

Analysis with GRU (1)

Principe of standard analysis :

-Raw Spectra-Standard conversion Run->TTree

GDevice *inputdevice =

new GDevice(argument); // declaration of Input inputdevice->Open(); // necessary for all devices ( do initialisation)GDevice *outputdevice =

new GDevice(argument); // declaration of output outputdevice->Open(); // necessary for all devices ( do initialisation)

GAcq *a = new GAcq(inputdevice,outputdevice); // treatment environment a->EventInit(); // event initialisation a->SetSpectraMode(1); //raw histograms a->SetUserMode(1); // init treatment a->SetTTreeMode(1,”MyTree.root”); // validate Run conversion in TTree a->SetScalerMode(1,”MyScaler.root”);// specific TTree for scalers a->SetNetMode(1,9090); a->DoRun( n); // n= nb events (if =0 => all)

inputdevice->Close(); outputdevice->Close(); a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish

standardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Runs : Root Files

Input

DeviceSource

GRU

OutputDevice

Nota : thisscript can be saved in file{ Script….}

and executed in GRU > .x MyScript.C

Page 21: G anil  R oot  U tilities

Analysis with GRU (2)

- Case of Input = Runs- Standard Root Conversion - No Spectra server

StandardAnalysis

Raw Spectra____________________________

Input

Device

ROOT files

GRU

GTape *inputdevice =

new GTape(“run1.dat”);inputdevice->SetBufferSize(16384);inputdevice->Open();

GAcq *a = new GAcq(inputdevice); a->EventInit(); // init done with run header a->SetSpectraMode(1); a->SetTTreeMode(1,”MyTree.root”); a->SetScalerMode(1,”MyScaler.root”); a->SetUserMode(1); a->DoRun(); inputdevice->Close();

inputdevice->SetName(“run2.dat”); inputdevice->Open(); a->DoRun(); inputdevice->Close(); Case of multi runs

a->SpeSave("histo.root"); delete (a); // finish

Runs

Page 22: G anil  R oot  U tilities

Analysis with GRU (3)Case of random generator:

Random generator produces Ebyedat Buffer . The event is defined from an ACTIONS_experiment.CHC_PAR file.Random law can be white noise, gaussian noise or binomial The appearance of a specific parameter is under a probability (default =60%) Can be defined after version GRU 12.3The first parameter defined in ActionFile has always a probability of 100% ( supposed to be a trigger)

GGeneBuffer *inputdevice =

new GGeneBuffer(“ACTIONS_experiment.CHC_PAR”); // declare Inputinputdevice->SetBufferSize(16384);inputdevice->SetRandomLaw(1) ; // 0 Gaussian,1 White Noise, 2 Binomialinputdevice->SetRandomProba(0.5) ; // Probability of parameter of each appearance =50% (default =60%) inputdevice->Open();

GAcq *a = new GAcq(inputdevice); // treatment environment a->EventInit(“experiment”,false); // event initialisation a->SetSpectraMode(1); // raw histograms a->SetUserMode(1); // init treatment a->SetEventUSleep(10000); // allow pause in µs between each event a->SetNetMode(1,9090); a->DoRun( n); // n= nb events (if =0 => all) inputdevice->Close(); a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Root Files

Input

Device

RandomGene

GRU

Page 23: G anil  R oot  U tilities

Analysis with GRU (4)

Case of infinite read of run:

When GRU reaches the end of run, it restarts form beginning indefinitely.

Like a generator but from a run file.Useful to test a C code closer from a real experiment.

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Root Files

Input

Device

GRU

GTape *inputdevice =

new GTape(“run.dat”);

inputdevice->SetBufferSize(16384); inputdevice->Open();

GAcq *a = new GAcq(inputdevice);

a->SetInfiniteRead(1);

a->EventInit(); a->SetSpectraMode(1); a->SetUserMode(1); a->SetNetMode(1,9090); a->DoRun(); // n= nb events (if =0 => all) inputdevice->Close(); a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish

Run

Page 24: G anil  R oot  U tilities

Analysis with GRU (5)

Case of Narval Actor:

The input can be any Narval Analysis Actor but it works better with a specific actor ( gnarval_ebyedat_watcher)

GNetClientNarval *inputdevice =

new GNetClientNarval (“hostname”); inputdevice->SetPort(10202);inputdevice->SetBufferSize(16384);inputdevice->Open();

GAcq *a = new GAcq(inputdevice); // treatment environment a->EventInit(“experiment”); // event initialisation a->SetSpectraMode(1); // raw histograms a->SetUserMode(1); // init treatment a->SetNetMode(1,9090); a->DoRun(); // n= nb events (if =0 => all) inputdevice->Close(); a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

ROOT files

Input

Device

GRU

Page 25: G anil  R oot  U tilities

Analysis with GRU (6)Case User analysis

- To analyse data, user has to instance a “GUser” object which inherits for GAcq class

- User introduces new spectra and fills them with specific own computing

gROOT->Reset(); gROOT->ProcessLine(".include /home/acqexp/GRU/GRUcurrent/include"); gROOT->ProcessLine(".L ./GUser_C.so"); // load GUser class

GDevice *inputdevice = new GDevice(argument); // declare Input

inputdevice->Open();

GUser *a = new GUser(inputdevice); // treatment environment a->EventInit(); // event initialisation a->SetSpectraMode(1); // raw histograms a->SetUserMode(1); // init treatment a->SetTTreeMode(3,”MyTree.root”); // user TTree a->SetNetMode(1,9090); a->DoRun(); // n= nb events (if =0 => all) inputdevice->Close(); a->SpeSave("histo.root"); // save all declared histogram delete (a); // finish

Source

Spectra Server

DataBase

ROOT Files

Input

Device

GRU

User C++Code

Spectra_____________________

StandardAnalysis

Raw Spectra____________________________

Page 26: G anil  R oot  U tilities

Analysis with GRU (7) GUser.h file :

#ifndef __GUser__#define __GUser__

#include <sstream>using std::ostream;

#include <TObject.h>#include "General.h"#include "GAcq.h"#include "GDevice.h"

class GUser : public GAcq{

protected: int fVerbose; // level (0 to 10 ) of verbose default = 0 ( level 10 is good for debug) TH1F * fMy1Dhisto; // pointer on user histogram 1 dimension of floatsTH2F* fMy2Dhisto; // pointer on user histogram 2 dimensions of floatsInt_t fLabel_voie1, fLabel_voie2;Ushort_t *fVector;

public: GUser(GDevice* _fDevIn= NULL, GDevice* _fDevOut= NULL) ; // default constructor of GUser object ~GUser() ;

virtual void InitUser(); // init acquisition virtual void InitUserRun(); // init before start virtual void User(); // done by start virtual void EndUserRun(); // stop run virtual void EndUser(); // exit acquisition virtual void InitTTreeUser(); // to define own leaves in case of user TTree

ClassDef (GUser ,1); // User Treatment of Data};

Page 27: G anil  R oot  U tilities

#include "GUser.h"#include "TROOT.h"#include <TProfile.h>#include <TRandom.h>

ClassImp (GUser);

GUser::GUser (GDevice* _fDevIn, GDevice* _fDevOut){ // Constructor / initialisor of Acquisition object // // entry: // - Input Device // - Output Device fDevIn = _fDevIn; fDevOut = _fDevOut;

// Declaration of new root histograms

fMy1Dhisto = new TH1F(“My1DHisto”, “My1DHisto”,16384,0,16384);fMy2Dhisto = new TH2F(“My2DHisto”, “My2DHisto”,1024,0,16384,1024,0,16384);fVector = new Ushort_t[2];

}

GUser::~GUser() { delete (fMy1Dhisto ); delete (fMy2Dhisto ); delete (fVector);}

Analysis with GRU (8) GUser.C file :

Page 28: G anil  R oot  U tilities

void GUser::InitUser(){ // Initialisation for global user treatment // choice : allow to switch on different treatments (1 to 6) // called with command SetUserMode (choice) // In this method, we can make histograms (previously declared in GUser.h)

GetSpectra()->AddSpectrum(fMy1Dhisto ,"MyFamily");GetSpectra()->AddSpectrum(fMy2Dhisto ,"MyFamily");

fLabel_voie0=GetEvent()->GetDataParameters()->GetLabel("ADC32_1_7_V0") ; fLabel_voie1=GetEvent()->GetDataParameters()->GetLabel("ADC32_1_7_V1") ;

}

void GUser::InitUserRun(){ // Initialisation for user treatment for each run}

Analysis with GRU (9) GUser.C file :

Page 29: G anil  R oot  U tilities

void GUser::User(){ // User method for user treatment for each events

// event is a vector of a serie of couples UShor_t/Short_t Label/Value ( GetEventArrayLabelValue()) // of variable size GetEventArrayLabelValueSize() and with a max size of GetEventArrayLabelValueSizeMax() // The numbers of couple Label/Value is GetEventArrayLabelValueSize()/2 // GetEventArrayLabelValue_Label(i) return Label number i in vector GetEventArrayLabelValue() // GetEventArrayLabelValue_Value(i) return Value number i in vector GetEventArrayLabelValue()

Float_t Coef_Calibration =0,7; Int_t new_value,x ,y,size; x =0; y =0;

size = GetEventArrayLabelValueSize()/2;

for(Int_t i=0;i< size; i++){ if (GetEventArrayLabelValue_Label(i) == fLabel_voie0){ x = GetEventArrayLabelValue_Value(i); new_value =(Int_t)( x * Coef_Calibration);

fMy1DHisto->Fill(new_value);}

if (GetEventArrayLabelValue_Label(i) == fLabel_voie1){ y = GetEventArrayLabelValue_Value(i); } }

fMy2DHisto->Fill (x,y);

fVector[0] = x; fVector[1] = y; }}

Analysis with GRU (10) GUser.C file :

Page 30: G anil  R oot  U tilities

void GUser::EndUserRun(){ // end of run , executed a end of each run

}

void GUser::EndUser(){ // global final end executed a end of runs // must be explicitly called!

}

void GUser::InitTTreeUser(){ // User method for specific initialisation of Ttree. // It can be useful for example multi-hit detections // or to have a TTree with only few parameters (for low compute). // To run this method, you have to select mode 3 in SetTTreeMode // ex : a->SetTTreeMode(3,"/space/MyTTree.root"); // GetTree() return TTree pointer.

GetTree()->Branch("mybranche",fVector,”fVector[2]/s");

}

Analysis with GRU (11)

Page 31: G anil  R oot  U tilities

Menu Général de l'expérience test machine serveur = ganp858

PA..........Définition du contexte de l'Acquisition DA..........Démarrage DAS AG..........Analysis with GRU (C++) RC..........RunControl TK..........Toolkit for RCC, Chainsaw, Narval,... VG..........ViGru XT..........Fenêtre Xterm AB..........Abort de l'acquisition host FI..........Sortir de l'Acquisition

GRU Analysis

LGA...Launch all GRUCore_X Processes on this computer IGA...Init all GRUCore_X STAA..Start all runs STOA. Stop all runs QGA.. Stop Final all Analysis on this computer KGA...Kill all GRUCores -------------------------------------------------------- CG....Create GRU_X Directory -------------------------------------------------------- -------------------------------------------------------- HE... Help FI... FIN

GRU in Ganil Acquistion (1)

Page 32: G anil  R oot  U tilities

GRU in Ganil Acquistion (2) Enter alphanumeric word to complete new directory GRU analysis (Enter empty entry to cancel): Do not use capital letter ! (ex: mygru1 to create GRU_mygru1) : test2

-------------------Definition of Analysis Context-------------------------- +--NarvalActor--+ +---GRUcore----+ +-----Vigru-----+ | with Watcher | | Soap Server | | | | | | -Host Name | | | | |----------->| -Port | | | | Host watcher | | | | | | -Name | |SpectraServer | | | | -Port | | -Port | | | | | | | | | | -Buffer Size | | |--------->| | | | | | | | +---------------+ +--------------+ +---------------+

Actor watcher Name (default = localhost): localhost Port watcher number (default = 10202): 10202 Buffer Size (default = 65536): 16384 GRUcore Soap Server Host Name (default = localhost): localhost GRUcore Soap Server Port Number (default = 6603): 6603 Spectra Sever Port (default = 9090): 9090

So if we agree with this : Name of directory : /home/legeard/ganacq_manip/test/GRU/GRU_test2 Host watcher Name : localhost Port watcher number : 10202 Buffer Size : 16384 GRUcore Host Name : localhost

GRUcore Soap Port : 6603 Spectra Sever : 9090

We can continue (y=[return]), do a correction (n) or cancel (c)?: y

Page 33: G anil  R oot  U tilities

GRU in Ganil Acquistion (3)GRU Analysis

LGA...Launch all GRUCore_X Processes on this computer IGA...Init all GRUCore_X STAA..Start all runs STOA. Stop all runs QGA.. Stop Final all Analysis on this computer KGA...Kill all GRUCores -------------------------------------------------------- CG....Creat GRU_X Directory -------------------------------------------------------- Gtest2...Go To GRU_test2 Directory -------------------------------------------------------- HE... Help FI... FIN GRU Analysis in Directory /home/legeard/ganacq_manip/test/GRU/GRU_test2

ED... Edit GUser.C GUser.h EC....Edit GruConfig (if necessary) MK....Do a compilation with local Makefile -------------------------------------------------------- LG... Launch GRUCore_test2 Process on this computer IG....Init GRUCore_test2 STA...Start Run of GRUCore_test2 STO.. Stop Run of GRUCore_test2 QG....Quit Analysis of GRUCore_test2 and do GUser::EndUser() KG....Kill GRUCore_test2 -------------------------------------------------------- VG....Vigru XT....Xterm in directory RM....Delete directory : /home/legeard/ganacq_manip/test/GRU/GRU_test2 HE....Help FI... FIN

[GRU_test2]$

GRUCoreInit.conf GRUCoreStart.conf GRUCoreStop.conf GRUCoreFinish.conf

GUser.C GUser.hGUserLinkDef.h Makefile

GruScript.C GruScript_offline.C

Page 34: G anil  R oot  U tilities

GRU in Ganil Acquistion (4)[GRU_test2]$

GRUCoreInit.conf GRUCoreStart.conf GRUCoreStop.conf GRUCoreFinish.conf

GUser.C GUser.hGUserLinkDef.h Makefile

GruScript.C GruScript_offline.C

GRUCoreStop.conf

#StopGRUC GRU localhost:6603 DORUN STOP

GRUCoreInit.conf

#Define inputGRUC GRU localhost:6603 INPUT NARVAL localhost 10202

#Define BufferSizeGRUC GRU localhost:6603 INPUT BUFFERSIZE 16384

#Define User codeGRUC GRU localhost:6603 INITACQ GUSER

#Init event with experiment nameGRUC GRU localhost:6603 INITEVENT test3

#Start all Raw SpectraGRUC GRU localhost:6603 SPECTRA ALL

#Start Spectra ServerGRUC GRU localhost:6603 SPECTRASERVER START 9090

#Init GUserGRUC GRU localhost:6603 INITRUNS 1

GRUCoreStart.conf

#StartGRUC GRU localhost:6603 DORUN START

GRUCoreFinish.conf

#QuitGRUC GRU localhost:6603 DORUN END

Page 35: G anil  R oot  U tilities

Vigru : Visualisation for Gru

Function : display a large number of spectra easily >Load list of alive spectra from remote servers>Display spectrum or a family of spectra>Presentation on multi-pages >Save/retrieve setup >Benefit of root powerful functionalities

Independent application Client of multiple servers

GRU/GRUcore Root file (containing spectra) SoapServer

Page 36: G anil  R oot  U tilities

Vigru : Connection

First : connectionto a spectra server

1) menuSetup-> Sources

2) Define a sever:-Select type (network/file) -Define protocol

(Gru/Ganil/Soap)-Fill host name/filename

+ port number-Select [Add Server]-Repeat 2) if several servers

3) Select [OK]

Page 37: G anil  R oot  U tilities

Vigru : Display a spectrum

Select one or severalspectra and choose spectra to display in chooser

Select pad withmouse’s middle button or with red arrow buttons

Page 38: G anil  R oot  U tilities

Vigru : Tabs

Add Page (Tab) Remove PageSetting Page

Page 39: G anil  R oot  U tilities

Vigru : RefreshRefresh pad Refresh full page

Setting time for auto refresh

Page 40: G anil  R oot  U tilities

vigru : log

Apply/remove logarithmOne X,Y or Z axis

Page 41: G anil  R oot  U tilities

vigru : statistics

Change statistic information on pads

Page 42: G anil  R oot  U tilities

vigru : zoom

Sliders bar to apply a zoom to all histograms of page in X or Y axis.

Reset zoom onselected pad

Page 43: G anil  R oot  U tilities

vigru : zoom

Send selected padin a full zoom tab

Page 44: G anil  R oot  U tilities

vigru : crosshair & status

Validate / invalidate Crosshair and Status bar information

Page 45: G anil  R oot  U tilities

Vigru : file menu

Print or make a postscript file

Open & Save Configurations

Save spectra in root fileor in txt format

Page 46: G anil  R oot  U tilities

Configuration Files : XML<root>

<RootAssociateFile>/home/legeard/GRU/serv/vigru11.root</RootAssociateFile> <ListIdServers>0 <ServerIdentity> <SourceName>localhost</SourceName> <SourceType>GRU</SourceType> <Source>NET</Source> <Port>9090</Port> </ServerIdentity> </ListIdServers> <Pages>4 <Tab>0 <TabName>4 Graphs</TabName> <npadx>2</npadx> <npady>2</npady> <GVPad> <Option2D>col</Option2D> <StatOpt>nemr</StatOpt> <Palette>0</Palette> <Logx>0</Logx> <Logy>0</Logy> <Logz>0</Logz> <ProcessType>1</ProcessType> <ProcessTab>0</ProcessTab> <ProcessPad>0</ProcessPad>

…………..

-Direct launch if conf file exists : vigru myvigruconf.xml -By default vigru.xml in current directory

Page 47: G anil  R oot  U tilities

Vigru : tools menu

Recall button actions but applied on page(s)

Peak find

Page 48: G anil  R oot  U tilities

Features : Process

Select the computing to applyand the origin pad

Do a refresh page

A “process” is a copy of spectra form a origin pad to a second pad on whicha computation is applied (FFT, Scatter, Projection…list can be completed on demand)

- Select a free pad - Select this menu : Process

Page 49: G anil  R oot  U tilities

Vigru Client of SoapServerVigru can also display signal or histogram send by small soap server (direct connection).

Useful for debugging hardware (Oscilloscope)

Development of Numexo2 card.

Process used : FFT=> one line spectral analysis

(vigru needs to be compiled with specific Ganil libraries)

Electroniccard

Embedded linux

+ Soap server

Soap

Page 50: G anil  R oot  U tilities

Graphical CutsGRU/vigru allows “half dynamic cuts”

In GUser files

// define a cut with arbitrary size TCutG * MyCut= new TCutG("Mycut",1);

// add this cut in Data Base GetSpectra()->AddCut(MyCut,(char*)"Cuts");

// The cut is used to condition a histogramExample / if ((MyCut->IsInside(px,py)))

MyHisto->Fill(px,py)

In Vigru

Select a pad where you want todraw a graphical cut

1) Click on chisel buttonDraw your cut with mouse and finish it with a double click

2) Click again on chisel button (with a red arrow)Select "Mycut" in "Cuts" folder.At this moment, your cut is updated in the server

Page 51: G anil  R oot  U tilities

Cuts

Page 52: G anil  R oot  U tilities

Cuts

For a re-use in case of fixed cuts

Save them with vigru with menu Cuts->Save Cuts

To reload it in vigru use, Cuts->Load Cuts for file Cuts

In server, to reload it :TCutG * MyCut1;.....

MyCut1= new TCutG("Mycut1",1);

.....

GetSpectra()->GetCutFromFile(MyCut1,(char*)"Cuts",(char*)"GruCuts.root");

Page 53: G anil  R oot  U tilities

Other product around GRU

Ganil_Tape

-Verify raw data Ganil files (Runs)-Simple analysis

statistics : nb events,parameters, labels

-Dump raw data : buffers, events-Get runs from tapes

Page 54: G anil  R oot  U tilities

Other Product around GRU

Calimero : Calibration of Must2 With Root.

Specific GRUcore :

Calculate coefficients of calibration of Must2 cards and Matacq card

QuickTime™ et undécompresseur BMP

sont requis pour visionner cette image.

QuickTime™ et undécompresseur BMP

sont requis pour visionner cette image.

Page 55: G anil  R oot  U tilities

Spectra Server a useful part of GRUSpectra = histograms + graphs + data vectors...

Function : Export ROOT Histograms via Network

All derived objects which inherit fromTH1TGraphTGrah2D

Easy to use in C file :>Declare a histograms data base (DB)>Declare a server of this DB>Add the ROOT histogram in DB

Page 56: G anil  R oot  U tilities

Narval Actor

Example with Agata

Narval Actor

Narval Actor

GRUSpectraServer

Narval Actor

DataFlow

DataFlow

Network

GRUSpectraServer

GRUSpectraServer

GRUSpectraServer

GRUSpectraServer

Vigru

Page 57: G anil  R oot  U tilities

Standalone server#include <stdlib.h> #include « TH1.h »#include "GSpectra.h »#include "GNetServerRoot.h »

main(){ int value1,value2 ; GSpectra* speDB= new GSpectra();GNetServerRoot* serv = new GNetServerRoot(speDB);serv->SetPort(9099);serv->StartGNetServer();

TH1S* histo1= new TH1S("Histo1", "histo1", 100, 0, 100 );TH1S* histo2= new TH1S("Histo2", "histo2", 100, 0, 100 );

speDB->AddSpectrum(histo1, « MyFamily » );speDB->AddSpectrum(histo2, « MyFamily » );

while(true){value1 = (int)(((float)rand()/RAND_MAX)*100);value2 = (int)(((float)rand()/RAND_MAX)*100);

()/RAND_MAX)*100); histo1->Fill(value1); histo2->Fill(value2);

sleep(1);}

}

Standard C/C++ codeRoot code

Gru Code

QuickTime™ et undécompresseur BMP

sont requis pour visionner cette image.

>Must be linked with libGRU.so Library

Page 58: G anil  R oot  U tilities

Future of GRU

GUI

Actor/PoolGRUCor

e

vigru

RCC

Events(C lib) Spectra

Soap

Soap

Soap

LoggerChainsa

w

Slow Clontrol

GRUcore have to be more integrated in Ganil Acquisition processesand drived by RCC-GUI.

Page 59: G anil  R oot  U tilities

Future of GRU

- Dynamic creation of spectra and conditions (on-line)

- Use new next event format (MFM)

- Improvement around cuts

- Graphical interface for GRU

...maybe you will give me ideas for improvements…

Page 60: G anil  R oot  U tilities

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Input

DeviceSource

ROOT files Runs

GRU

Page 61: G anil  R oot  U tilities

Source

Spectra Server

DataBase

ROOT Files

Input

Device

GRU

User C++Code

Spectra____________________________

StandardAnalysis

Raw Spectra____________________________

Page 62: G anil  R oot  U tilities

User C++Code

Spectra____________________________

StandardAnalysis

Raw Spectra____________________________

Spectra Server

DataBase

Tcip requests

Spectra