]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/MUON/macros/MakeTriggerTable.C
Extacting the OCDB in a separate module. The detectors have write permission in the...
[u/mrichter/AliRoot.git] / HLT / MUON / macros / MakeTriggerTable.C
index 10c78bde0ac02b0c25aada6d946615581b300f86..1ae81dbc42c9e4bcd1efcfbd747c9ad2ce3773f8 100644 (file)
@@ -30,6 +30,7 @@
 #include "TFile.h"
 #include "TError.h"
 
+#include "AliCDBManager.h"
 #include "AliLoader.h"
 #include "AliRunLoader.h"
 #include "AliStack.h"
@@ -37,6 +38,7 @@
 #include "AliMUON.h"
 #include "AliMUONMCDataInterface.h"
 #include "AliMUONHit.h"
+#include "AliHLTMUONEvent.h"
 #include "AliHLTMUONRootifierComponent.h"
 #include "AliHLTMUONMansoTrack.h"
 
@@ -58,6 +60,22 @@ void MakeTriggerTable(
                Float_t sigmaZtrg = 0.02  // 2 microns resolution
        )
 {
+       // Setup the CDB default storage and run number if nothing was set.
+       AliCDBManager* cdbManager = AliCDBManager::Instance();
+       if (cdbManager == NULL)
+       {
+               cerr << "ERROR: Global CDB manager object does not exist." << endl;
+               return;
+       }
+       if (cdbManager->GetDefaultStorage() == NULL)
+       {
+               cdbManager->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+       }
+       if (cdbManager->GetRun() == -1)
+       {
+               cdbManager->SetRun(0);
+       }
+       
        gSystem->Load("libAliHLTMUON.so");
        // Must pree load libAliHLTMUON.so before loading this macro and running it in compiled mode.