Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPD-MOOD v4Henrik Tydesjö1 SPD-MOOD v4. Henrik Tydesjö2 Why A New Version?  Maintenance: Version 3 close to becoming a monster after 3 years of code.

Similar presentations


Presentation on theme: "SPD-MOOD v4Henrik Tydesjö1 SPD-MOOD v4. Henrik Tydesjö2 Why A New Version?  Maintenance: Version 3 close to becoming a monster after 3 years of code."— Presentation transcript:

1 SPD-MOOD v4Henrik Tydesjö1 SPD-MOOD v4

2 Henrik Tydesjö2 Why A New Version?  Maintenance: Version 3 close to becoming a monster after 3 years of code fixes and temporary solutions Version 4 is better following the philosophy of object oriented programming and gives a nice possibility for anyone to add new code in a simple way  Increasing number of requests for new functionality: Version 4 offers user to select specifically what to monitor, minimizing the resources and time spent for each individual need  Stability of operation: Version 3 had some problems of stability, lacking some proper handling of posix threads and mutexes (Root ‘signal/slot’ handling related) Version 4 is greatly improved in this context  Another major benefit is the way in which SPD-MOOD displays data It is now completely re-organized and improved  The displaying is based on a ‘multiple window’ system which is in many ways more flexible and convenient for the user

3 SPD-MOOD v4Henrik Tydesjö3 Additional New Features  ‘Run Until Event’ Stop running at specified event number  Consistency Error Flag Bar in main window showing green (ok) or red (error occurred) Possibility to reset this flag (to see if problem persists)  ‘Screen-Shot All’ Make screen-shots of all the displays that are open  Trigger mask May be set for all or single monitoring histogram (Two 32-bit words compared to the trigger pattern in raw data) Event accepted when: (trigMask1 & trigPattern1) OR (trigMask2 & trigPattern2)

4 SPD-MOOD v4Henrik Tydesjö4 Main Window, Setup Window Setup window – personalize your monitoring:  Choose what to monitor  Choose what to display Main window, some features:  Define data source (Login)  Collect data (Run…)  Operations on all available monitoring objects  Global options (pixel mask, trigger mask etc.)

5 SPD-MOOD v4Henrik Tydesjö5 How To Run LOGIN Panel: Data Source:  Online  Offline  Offline File List Data Format:  DATE  ROOT Main Window:  Login (open login panel)  Run  Run Until Event  Run N Events  Run One Event

6 SPD-MOOD v4Henrik Tydesjö6 Setup Window: How Does It Work? Two kinds of monitoring objects:  ‘Histogramming’ objects  ‘Displaying’ objects Histogramming object  Parameters that need to be monitored (e.g. using histogram)  Collects statistics as SPD-MOOD runs  ‘Reset’ functionality  ‘Pause’ functionality  ‘Trigger mask’ functionality Displaying object  Display window (see next slide)  Link to ‘histogramming’ object (change properties of hist. obj.)  ‘Update’ functionality (draw histogram)  ‘Screen shot’ functionality  ‘Movie’ making functionality Example for histogramming object (Cluster multiplicity): ‘+’ Create new hist. obj. ‘-’ Delete last hist. obj. created Number of hist. obj. Open display(s) - Create displaying object(s)

7 SPD-MOOD v4Henrik Tydesjö7 Display Window Update:Update display Reset:Reset histogram Clone:Copy displaying object - open new display window connected to same hist. obj. Close display (hist. obj. still present) Movie:Make movie based on screen shots when ‘Au-Up’ * Pause:Pause collecting stats for connected hist. obj. Au-Re:Automatically reset the connected hist. obj. after each event Au-Up:Automatically update the display at next event fulfilling certain conditions (‘modulus’ and updating time) Kill:Close display and delete hist. obj. Trig mask:Set trigger mask for connected hist. obj. Screen shot:Make screen shot of this display *) Not shown in this display

8 SPD-MOOD v4Henrik Tydesjö8 Display Example: Clones 4 displays of same hist. obj. – ‘clones’ (3 shown here) Au-Up Ev# set to display every 4 th event in each display

9 SPD-MOOD v4Henrik Tydesjö9 Save/Load Configuration and Setup  As in Version 3 the global configuration parameters are saved automatically upon exiting the program (for instance, the data source is stored) Again there is the possibility to save a specific configuration to file to retrieve it later (see ‘File’ menu of SPD-MOOD main window) If you believe the values are screwed-up, there is a possibility to revert to a default set of values (this problem appeared once during 2008)  The setup (which histograms/displays to use) may also be saved (see ‘File’ menu of SPD-MOOD setup window) There is a default setup (which may be changed), always loaded at program start-up Setup may also be saved to a file, for instance you may have several such as: ‘MyFavoriteCosmic.setup’ ‘MyFavoriteUniformityScan.setup’ ‘MyFavoriteBeamInjection.setup’ Also the size and location-on-screen of the display windows are saved

10 SPD-MOOD v4Henrik Tydesjö10 Underlying Code Structure (I) There is a set of ‘singleton’ classes that contains the essential part of code:  TMMainFrame Main window + connection to Setup window (TMSetupDisplays)  TMConfig Global configuration parameters (data source, active eqs, etc.)  TMControlMutex Handles mutex locks (SPD-MOOD needs to be a multi-threaded application)  TMControlSPD Interface to raw data (via DATE monitoring library and AliRoot RawReaders) Parses data and sends information to Histogramming objects.  TMDisplayingList populated via TMSetupDisplays List of Displaying objects (basically display windows on screen) Facilitates operations on all displaying objects  TMHistogrammingList populated via TMSetupDisplays List of Histogramming objects (Filled from TMControlSPD during running) Facilitates operations on all histogramming objects

11 SPD-MOOD v4Henrik Tydesjö11 Underlying Code Structure (II) TMHistogrammingList TMControlSPD TMMainFrame TMDisplayingList ProcessPixel ProcessCluster ResetAuto etc… Start/Stop Run Update All Screen-Shot All Close All Raw Data UpdateAutoDisplays Reset All GetEvent Login

12 SPD-MOOD v4Henrik Tydesjö12 TMDisplayingShowDet  Draw  Reset  GetNrEventsetc… Hist. Obj. Disp. Obj. Underlying Code Structure (III) TMHistogrammingList TMDisplayingList TMHistogrammingClustersPerHSA TMDisplayingHitMapEq TMHistogrammingHitMapEq TMHistogrammingFastorEq TMHistogrammingHitMapEq TMHistogrammingGlobalClusterXY TMHistogrammingGlobalClusterZY TMDisplaying TMDisplaying (clone)

13 SPD-MOOD v4Henrik Tydesjö13 How To Add New Code 1) Make a new histogramming object: Write class that derives from TMHistogramming class There is a template class (TMHistogrammingTEMPLATE) in source directory to help get started 2) Make a new displaying object (optional): In most cases, the base class TMDisplaying can be used Otherwise write class that derives from TMDisplaying 3) Add code to manage added objects from Setup Window: TMSetupDisplays class (.h.cxx files) Look for lines like this for hint where code is needed: // ADD CODE HERE Main additions needed:  Each hist. obj. should have unique ID defined in TMSetupDisplays.h  Add buttons (‘+’, ‘-’, ‘SHOW’) to Setup Window to manage the new histogramming object  Code to create histogramming object upon button click  Code to create corresponding displaying object upon button click In most simple case only 9 lines of code added or changed

14 SPD-MOOD v4Henrik Tydesjö14 TMHistogramming Class Methods that may be implemented (overriding the base class methods) in the new class deriving from TMHistogramming:  StartEvent (eventHeaderStruct *event, UInt_t globalEventNumber) Called before any processing of event.  ProcessPixel (UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row) Called for each pixel hit found in raw data.  ProcessClusters (HenrikClusterFinderSPD* clFinder) Called after data parsing. Access to clusters found in the entire event.  ProcessCluster (Float_t x, Float_t y, Float_t z, UInt_t module, UInt_t size, UInt_t widz, UInt_t widphi, UInt_t type) Called after data parsing. Called for each cluster found by HenrikClusterFinderSPD. May be used instead of ProcessClusters(…).  ProcessEvent (eventHeaderStruct *event) Called after data parsing.  EndEvent (AliITSRawStreamSPD *str, UInt_t globalEventNumber) Called at the end of the event loop. In addition, methods Draw (TPad *pad) and Reset () should be implemented All histograms used in Version 3 and a few new ones have been added so far

15 SPD-MOOD v4Henrik Tydesjö15 Ex: Clusters per HS

16 SPD-MOOD v4Henrik Tydesjö16 Ex: Bunch Crossing Modulus 4

17 SPD-MOOD v4Henrik Tydesjö17 Ex: Hit-Map for Half Sector Double-click opens chip display:

18 SPD-MOOD v4Henrik Tydesjö18 Ex: FastOR Signals per Equipment

19 SPD-MOOD v4Henrik Tydesjö19 Ex: Consistency Errors vs. Event Number ‘Show Error Codes’ button opens list of error codes:

20 SPD-MOOD v4Henrik Tydesjö20 Installation (I) 1)Target a Linux machine for installation Development made on SLC4 2)Install ROOT if not present (see http://root.cern.ch) Any Root version should be fine, but in case of problems, check SPD-MOOD web documentation to see which ROOT version was used for development 3)Install DATE (optional) Needed for online monitoring (does not need full DATE installation) 4)Download and install ‘mpeg2encode’ and ‘mpgtx’ (optional) Needed for movie making functionality (may be found on web) Add these binaries to PATH environment variable 5)Download SPD-MOOD.tgz files are found on SPD-MOOD web documentation page Un-pack by (in the case of version 4.01): > tar zxvf SPDMood_v4.01.tgz

21 SPD-MOOD v4Henrik Tydesjö21 Installation (II) 6)Add environment information to login script ‘SPDMOOD_SITE’ should be set to the downloaded directory name In bash shell, add something like this to.bashrc file: export SPDMOOD_SITE=/local/home/spd/SPDMood_v4.01 export PATH=$SPDMOOD_SITE/bin:$PATH export LD_LIBRARY_PATH=$SPDMOOD_SITE/lib:$LD_LIBRARY_PATH 7)Edit $SPDMOOD_SITE/build/Makefile First two lines may be edited according to desired mode of operation: WITH_DATE = 1 if DATE will be used (otherwise put 0) WITH_MOVIE = 1 if movie making is desired (otherwise put 0) 8)Build the code > cd $SPDMOOD_SITE/build > make 9)Run Application > SPDmood.exe Might require to re-run login script first. In case connection to grid is desired, run: > gridSPDmood.exe

22 SPD-MOOD v4Henrik Tydesjö22 Grid Connection From SPD-MOOD v4.03 on:  Grid files may be accessed directly through ALIEN  To source /tmp/gclient_env_$UID script, and automatically connect to grid at program start-up, run: > gridSPDmood.exe This should of course be preceded by an ‘alien-token-init’  Data source should start with alien://, for instance: alien:///alice/data/2008/LHC08d/000062834/raw/08000062834000.10.root

23 SPD-MOOD v4Henrik Tydesjö23 Further Details See SPD-MOOD web documentation for further details: http://tydes.home.cern.ch/tydes/doc/SPDMood  This presentation  Download page, description of updates for each version  Installation guide  Lists explaining all menus and buttons


Download ppt "SPD-MOOD v4Henrik Tydesjö1 SPD-MOOD v4. Henrik Tydesjö2 Why A New Version?  Maintenance: Version 3 close to becoming a monster after 3 years of code."

Similar presentations


Ads by Google