1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
6 * Artur Szostak <artursz@iafrica.com> *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
21 * \file CreateDefaultCDBEntries.C
22 * \brief Macro for generating default CDB entries for dHLT.
24 * This macro is used to generate some default CDB entries for the dHLT.
25 * It is an experts macro so make sure you know what you are doing.
27 * The simplest way to run this macro with defaults is to copy "rootlogon.C" from
28 * $ALICE_ROOT/HLT/MUON/macros into your current working directory, then from
29 * the shell command prompt run the following command:
31 * > aliroot -b -q -l $ALICE_ROOT/HLT/MUON/macros/CreateDefaultCDBEntries.C+
34 * \author Artur Szostak <artursz@iafrica.com>
37 #if !defined(__CINT__) || defined(__MAKECINT__)
38 #include "AliCDBManager.h"
39 #include "AliCDBStorage.h"
40 #include "AliCDBEntry.h"
41 #include "AliHLTMUONConstants.h"
43 #include "TObjString.h"
51 * Generates default CDB entries in the given CDB storage (local by default)
52 * \param cdbPath The path to the local storage.
54 void CreateDefaultCDBEntries(const char* cdbPath = "local://$ALICE_ROOT")
56 // Setup the CDB default storage and run number.
57 AliCDBManager* cdbManager = AliCDBManager::Instance();
58 if (cdbManager == NULL)
60 cerr << "ERROR: Global CDB manager object does not exist." << endl;
64 AliCDBStorage* storage = cdbManager->GetStorage(cdbPath);
67 cerr << "ERROR: Could not get storage for: " << cdbPath << endl;
73 Int_t lastRun = AliCDBRunRange::Infinity();
75 // Create and store the configuration parameters for the trigger decision cuts.
76 TMap* cuts = new TMap;
77 cuts->SetOwner(kTRUE);
78 cuts->Add(new TObjString("lowptcut"), new TObjString("1"));
79 cuts->Add(new TObjString("highptcut"), new TObjString("2"));
80 cuts->Add(new TObjString("lowmasscut"), new TObjString("2.5"));
81 cuts->Add(new TObjString("highmasscut"), new TObjString("7"));
83 const char* path = AliHLTMUONConstants::DecisionComponentCDBPath();
84 AliCDBId id(path, firstRun, lastRun, verison);
85 AliCDBMetaData* metaData = new AliCDBMetaData();
86 metaData->SetResponsible("dimuon HLT");
87 metaData->SetComment("Trigger decision cuts for dimuon HLT.");
88 storage->Put(cuts, id, metaData);