AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TestMUONPreprocessor.C File Reference

The macro for testing the shuttle preprocessors. More...

#include "TestMUONPreprocessor.h"
#include "AliMUONTrackerPreprocessor.h"
#include "AliMUONTriggerPreprocessor.h"
#include "AliLog.h"
#include "AliMpBusPatch.h"
#include "AliMpExMap.h"
#include "AliMpHelper.h"
#include "AliMpDDLStore.h"
#include "AliMpDCSNamer.h"
#include "AliMpCDB.h"
#include "AliCDBManager.h"
#include "AliCDBEntry.h"
#include "AliCDBId.h"
#include "AliShuttleInterface.h"
#include "AliTestShuttle.h"
#include "AliDCSValue.h"
#include "Riostream.h"
#include "TSystem.h"
#include "TMap.h"
#include "TObjArray.h"
#include "TObjString.h"
#include "TString.h"
#include "TRandom.h"
Include dependency graph for TestMUONPreprocessor.C:

Go to the source code of this file.

Functions

void TestMUONPreprocessor (Int_t runNumber=80, const char *runType="PHYSICS", const char *sourceDirectory="$HOME/Downloads/muontestshuttle")
 
void GenerateConfig ()
 
TMap * CreateDCSAliasMap (const char *inputCDB, Int_t runNumber)
 Create a fake DCS alias map. More...
 

Detailed Description

The macro for testing the shuttle preprocessors.

This macro runs the test preprocessor for MUON. It uses AliTestShuttle to simulate a full Shuttle process

You must make a link of some OCDB entries to have the mapping loaded correctly :

cd $ALICE_ROOT/../src/SHUTTLE/TestShuttle/TestCDB
mkdir -p MUON/Calib/MappingData
cd MUON/Calib/MappingData/
ln -si $ALICE_ROOT/OCDB/MUON/Calib/MappingData/* .
cd $ALICE_ROOT/../src/SHUTTLE/TestShuttle/TestCDB
mkdir -p MUON/Calib/Config
cd MUON/Calib/Config
ln -si $ALICE_ROOT/OCDB/MUON/Calib/Config/* .

and Align/Baseline if you'd like to test GMS subprocessor :

cd $ALICE_ROOT/../src/SHUTTLE/TestShuttle/TestCDB
mkdir -p MUON/Align
cd MUON/Align
ln -si $ALICE_ROOT/OCDB/MUON/Align/Baseline .

The input data has to be created first by other processes (or is created here by CreateDCSAliasMap() for tracker and trigger HV).

To play with it, you'll have to set/modify several lines, to

  • a) select input files, using shuttle->AddInputFile()
  • b) select run type, using shuttle->AddInputRunParameter() (the run type dictates which task is really performed by the MUONPreprocessor

The sourceDirectory is there to "emulate" what the real preprocessor will find on the FXS, and is assumed to have the following structure :

CONFIG/
   LDC0.config
   LDC1.config
   LDC2.config
   LDC3.config
CONFIGPAR/
   LDC0.config
   LDC1.config
   LDC2.config
   LDC3.config
GMS/
   GMS.root
OCCUPANCY/
   mch.occupancy
BPEVO/
   mchbpevo.root
PEDESTALS/
   LDC0.ped
   LDC1.ped
   LDC2.ped
   LDC3.ped
TRIGGER/
   ExportedFiles.dat (mandatory)
   MtgGlobalCrate-1.dat
   MtgLocalLut-1.dat
   MtgLocalMask-1.dat
   MtgRegionalCrate-1.dat

An example set of input files can be found at https://cernbox.cern.ch/public.php?service=files&t=c9363b0a1f92daf4963dd4f8b2a8f72a

(just get the zip file and unpack it into a directory that will be sourceDirectory)

IMPORTANT: The trigger files have to be present in order for the algorithm to work correctly. If you want to test the Trigger DCS maps only, but you don't have the .dat trigger files, you have to create dummy files through :

cd sourceDirectory/TRIGGER
echo -e "MtgLocalMask-1.dat\nMtgRegionalCrate-1.dat\nMtgGlobalCrate-1.dat\nMtgLocalLut-1.dat" > ExportedFiles.dat
touch MtgLocalMask-1.dat MtgRegionalCrate-1.dat MtgGlobalCrate-1.dat MtgLocalLut-1.dat

For more information on usage, please see the README_shuttle page.

Author
Laurent Aphecetche, SUBATECH Nantes;
Diego Stocco, SUBATECH Nantes

Definition in file TestMUONPreprocessor.C.

Function Documentation

TMap* CreateDCSAliasMap ( const char *  inputCDB,
Int_t  runNumber 
)

Create a fake DCS alias map.

Creates a DCS structure for MUON Tracker HV + LV and Trigger DCS and Currents

The structure is the following: TMap (key –> value) <DCSAlias> –> <valueList> <DCSAlias> is a string <valueList> is a TObjArray of AliDCSValue An AliDCSValue consists of timestamp and a value in form of a AliSimpleValue

Definition at line 314 of file TestMUONPreprocessor.C.

Referenced by TestMUONPreprocessor().

void GenerateConfig ( )

Generate "fake" configuration files for the tracker. One per LDC.

Definition at line 251 of file TestMUONPreprocessor.C.

void TestMUONPreprocessor ( Int_t  runNumber = 80,
const char *  runType = "PHYSICS",
const char *  sourceDirectory = "$HOME/Downloads/muontestshuttle" 
)

Definition at line 142 of file TestMUONPreprocessor.C.