]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/TestMUONPreprocessor.C
Fixes to calls for MeanMaterialBudget (now in AliTracker) (From Jouri Belikov)
[u/mrichter/AliRoot.git] / MUON / TestMUONPreprocessor.C
index 37ec6aed1d7280c3a155c058ec6ae11538f63d5b..c71b71272285aab2568180a4517d20eff26fced8 100644 (file)
 // By Laurent Aphecetche, SUBATECH Nantes
 
 #include "TestMUONPreprocessor.h"
+
+#include "AliMUONTrackerPreprocessor.h"
+#include "AliMUONHVNamer.h"
+
+#include "AliMpExMap.h"
+#include "AliMpHelper.h"
+#include "AliMpCDB.h"
+
 #include "AliCDBManager.h"
-#include "AliShuttleInterface.h"
+#include "AliCDBEntry.h"
 #include "AliCDBId.h"
+#include "AliShuttleInterface.h"
 #include "AliTestShuttle.h"
-#include "TMap.h"
+#include "AliDCSValue.h"
+
 #include "Riostream.h"
 #include "TSystem.h"
-#include "AliMpExMap.h"
 #include "TMap.h"
-#include "TString.h"
 #include "TObjArray.h"
-#include "AliMpHelper.h"
-#include "AliDCSValue.h"
 #include "TObjString.h"
+#include "TString.h"
 #include "TRandom.h"
-#include "AliMUONTrackerPreprocessor.h"
-#include "AliCDBEntry.h"
-#include "AliMUONHVNamer.h"
 #endif
 
-void TestMUONPreprocessor(Int_t runNumber=80)
+void TestMUONPreprocessor(Int_t runNumber=80, const char* runType="PEDESTAL_RUN")
 {
+  // runType can be :
+  //
+  // PEDESTAL_RUN -> pedestals
+  // ELECTRONICS_CALIBRATION_RUN -> gains
+  // PHYSICS -> HV
+  // GMS
+  
   // load library
   gSystem->Load("../SHUTTLE/TestShuttle/libTestShuttle.so");
   gSystem->Load("libMUONshuttle.so");
@@ -93,18 +104,19 @@ void TestMUONPreprocessor(Int_t runNumber=80)
   shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","PEDESTALS","LDC2","$ALICE_ROOT/MUON/data/LDC2.ped");
   shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","PEDESTALS","LDC3","$ALICE_ROOT/MUON/data/LDC3.ped");
   
+  shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","GAINS","LDC0","$ALICE_ROOT/MUON/data/LDC0.gain");
+  shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","GAINS","LDC1","$ALICE_ROOT/MUON/data/LDC1.gain");
+  shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","GAINS","LDC2","$ALICE_ROOT/MUON/data/LDC2.gain");
+  shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","GAINS","LDC3","$ALICE_ROOT/MUON/data/LDC3.gain");
+  
   // and GMS file
-  shuttle->AddInputFile(AliTestShuttle::kDAQ,"MCH","GMS","GMS","$ALICE_ROOT/MUON/data/GMS.root");
+  shuttle->AddInputFile(AliTestShuttle::kDCS,"MCH","GMS","GMS","$ALICE_ROOT/MUON/data/GMS.root");
 
   // The shuttle can read run parameters stored in the DAQ run logbook.
   // To test it, we must provide the run parameters manually. They will be retrieved in the preprocessor
   // using GetRunParameter function.
   // In real life the parameters will be retrieved automatically from the run logbook;
-  shuttle->AddInputRunType("MCH", "PEDESTAL_RUN"); 
-  // shuttle->AddInputRunType("MCH", "GMS"); 
-  // PEDESTAL_RUN -> pedestals
-  // ELECTRONICS_CALIBRATION_RUN -> gains
-  // PHYSICS ? -> HV
+  shuttle->SetInputRunType(runType);
   
   // Create the preprocessor that should be tested, it registers itself automatically to the shuttle
   new AliMUONTrackerPreprocessor(shuttle);
@@ -126,6 +138,10 @@ TMap* CreateDCSAliasMap()
   ///     <valueList> is a TObjArray of AliDCSValue
   ///     An AliDCSValue consists of timestamp and a value in form of a AliSimpleValue
   
+  // Load mapping from CDB
+  AliMpCDB::LoadMpSegmentation();
+  AliMpCDB::LoadDDLStore();
+
   TMap* aliasMap = new TMap;
   aliasMap->SetOwner(kTRUE);
   
@@ -163,12 +179,11 @@ TMap* CreateDCSAliasMap()
       for ( UInt_t timeStamp = 0; timeStamp < 60*15; timeStamp += 120 )
       {
         Float_t value = random.Gaus(1750,62.5);
-        if ( aliasName == "MchHvLvLeft/Chamber01Left/Quad3Sect2.actual.vMon") value = 500;
-//        if ( aliasName == "MchHvLvLeft/Chamber05Left/Slat07.actual.vMon") value = 1300;
-//        if ( aliasName == "MchHvLvLeft/Chamber05Left/Slat03.actual.vMon") value = 2500;
+        if ( aliasName == "MchHvLvLeft/Chamber00Left/Quad2Sect1.actual.vMon") value = 500;
         AliDCSValue* dcsValue = new AliDCSValue(value,timeStamp);
         valueSet->Add(dcsValue);
       }
+      if ( aliasName == "MchHvLvLeft/Chamber04Left/Slat06.actual.vMon" ) continue;
       aliasMap->Add(new TObjString(*alias),valueSet);
     }
   }