![]() |
AliRoot Core
v5-06-15 (45dab64)
|
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"
Go to the source code of this file.
Functions | |
void | TestMUONPreprocessor (Int_t runNumber=80, const char *runType="CALIBRATION", const char *sourceDirectory="/afs/cern.ch/user/l/laphecet/public") |
void | GenerateConfig () |
TMap * | CreateDCSAliasMap (const char *inputCDB, Int_t runNumber) |
Create a fake DCS alias map. More... | |
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 load relevant libraries (besides normal MUON ones -which is done easily by executing root from the $ALICE_ROOT/MUON directory to use the rootlogon.C there) before compiling this macro :
gSystem->Load("$ALICE_ROOT/SHUTTLE/TestShuttle/libTestShuttle"); gSystem->Load("libMUONshuttle");
Last line above assume you have $ALICE_ROOT/MUON/lib/tgt_[arch] (where libMUONshuttle is located) in your LD_LIBRARY_PATH
Having $ALICE_ROOT/SHUTTLE/TestShuttle directory in your LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH on Mac OS X) won't hurt either...
You must also make a link of some OCDB entries to have the mapping loaded correctly :
cd $ALICE_ROOT/SHUTTLE/TestShuttle/TestCDB mkdir -p MUON/Calib cd MUON/Calib ln -si $ALICE_ROOT/OCDB/MUON/Calib/MappingData .
and Align/Baseline if you'd like to test GMS subprocessor :
cd $ALICE_ROOT/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 HV).
To play with it, you'll have to set/modify several lines, to
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 GAINS/ LDC0.gain LDC1.gain LDC2.gain LDC3.gain GMS/ GMS.root OCCUPANCY/ mch.occupancy PEDESTALS/ LDC0.ped LDC1.ped LDC2.ped LDC3.ped LDC4.conf CONFIG/ LDC0.conf LDC1.conf LDC2.conf LDC3.conf LDC4.conf TRIGGER/ ExportedFiles.dat (mandatory) MtgGlobalCrate-1.dat MtgLocalLut-1.dat MtgLocalMask-1.dat MtgRegionalCrate-1.dat
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.
Definition in file TestMUONPreprocessor.C.
TMap* CreateDCSAliasMap | ( | const char * | inputCDB, |
Int_t | runNumber | ||
) |
Create a fake DCS alias map.
Creates a DCS structure for MUON Tracker HV 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 315 of file TestMUONPreprocessor.C.
Referenced by TestMUONPreprocessor().
void GenerateConfig | ( | ) |
Generate "fake" configuration files for the tracker. One per LDC.
Definition at line 252 of file TestMUONPreprocessor.C.
void TestMUONPreprocessor | ( | Int_t | runNumber = 80 , |
const char * | runType = "CALIBRATION" , |
||
const char * | sourceDirectory = "/afs/cern.ch/user/l/laphecet/public" |
||
) |
Definition at line 150 of file TestMUONPreprocessor.C.