]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MakeMUONSingleRecoParam.C
Update for 2012
[u/mrichter/AliRoot.git] / MUON / MakeMUONSingleRecoParam.C
CommitLineData
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 MakeMUONSingleRecoParam.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"
27#include "AliMUONCDB.h"
28
29#include "AliCDBManager.h"
30#include "AliRecoParam.h"
31
32#include <Riostream.h>
33
34#endif
35
36
37//-----------------------------------------------------------------------
38void MakeMUONSingleRecoParam(Int_t startRun = 0, Int_t endRun = AliCDBRunRange::Infinity(),
39 AliRecoParam::EventSpecie_t eventType = AliRecoParam::kLowMult)
40{
41 /// set the reconstruction parameters and store them in the OCDB ($ALICE_ROOT/MUON/Calib/RecoParam/).
42 /// - make a CDB entry for the run range [startRun, endRun]
43 /// - "eventType" specifies the set of parameters to be stored
44
45 // init CDB
46 AliCDBManager* man = AliCDBManager::Instance();
162637e4 47 if(!man->IsDefaultStorageSet()) man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
913f1b43 48 man->SetRun(startRun);
49
50 // choose desired set of parameters
51 AliMUONRecoParam* param;
52 switch (eventType) {
53 case AliRecoParam::kLowMult: // set of parameters for p-p runs
54 param = AliMUONRecoParam::GetLowFluxParam();
55 break;
56 case AliRecoParam::kHighMult: // set of parameters for Pb-Pb runs
57 param = AliMUONRecoParam::GetHighFluxParam();
58 break;
59 case AliRecoParam::kCosmic: // set of parameters for cosmic runs
60 param = AliMUONRecoParam::GetCosmicParam();
61 break;
62 default: // unknown species
63 cout<<"No set of parameters defined for the desired event type! Exiting..."<<endl;
64 return;
65 break;
66 }
67 param->Print("FULL");
68
69 // save RecoParam in CDB
a99c3449 70 AliMUONCDB::WriteToCDB(param, "MUON/Calib/RecoParam", startRun, endRun, "reconstruction parameters for MUON", "Philippe Pillot");
913f1b43 71
72}
73