]>
Commit | Line | Data |
---|---|---|
913f1b43 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | /// \ingroup macros | |
19 | /// \file MakeMUONRecoParamArray.C | |
20 | /// \brief Macro to set reconstruction parameters and put them in the OCDB | |
21 | /// | |
22 | /// \author Philippe Pillot, SUBATECH | |
23 | ||
24 | #if !defined(__CINT__) || defined(__MAKECINT__) | |
25 | ||
26 | #include "AliMUONRecoParam.h" | |
913f1b43 | 27 | #include "AliCDBManager.h" |
9074a9a9 | 28 | #include "AliMUONCDB.h" |
913f1b43 | 29 | |
30 | #include <Riostream.h> | |
31 | ||
32 | #endif | |
33 | ||
34 | ||
35 | //----------------------------------------------------------------------- | |
9074a9a9 | 36 | void MakeMUONRecoParamArray(Int_t startRun = 0, |
37 | Int_t endRun = AliCDBRunRange::Infinity(), | |
38 | const char* settings="ppIdeal") | |
913f1b43 | 39 | { |
ec73f5ef | 40 | /// set the reconstruction parameters and store them in the OCDB ($ALICE_ROOT/OCDB/MUON/Calib/RecoParam/). |
9074a9a9 | 41 | /// |
913f1b43 | 42 | /// - make a CDB entry for the run range [startRun, endRun] |
9074a9a9 | 43 | /// |
44 | /// for the possible values of settings, please see AliMUONRecoParam::Create | |
913f1b43 | 45 | |
46 | // init CDB | |
47 | AliCDBManager* man = AliCDBManager::Instance(); | |
913f1b43 | 48 | |
9074a9a9 | 49 | if (!man->IsDefaultStorageSet()) |
50 | { | |
51 | man->SetDefaultStorage("local://$ALICE_ROOT/OCDB"); | |
913f1b43 | 52 | } |
53 | ||
9074a9a9 | 54 | man->SetRun(startRun); |
55 | ||
56 | TObjArray* recoParams = AliMUONRecoParam::Create(settings); | |
57 | ||
58 | if (recoParams) | |
59 | { | |
60 | // save RecoParam in CDB | |
61 | AliMUONCDB::WriteToCDB(recoParams, "MUON/Calib/RecoParam", startRun, endRun, | |
534a02b1 | 62 | "reconstruction parameters for MUON", "L. Aphecetche and P. Pillot"); |
9074a9a9 | 63 | } |
913f1b43 | 64 | |
9074a9a9 | 65 | delete recoParams; |
913f1b43 | 66 | } |
67 |