Changed default OCDB from 2009 to 2010
[u/mrichter/AliRoot.git] / MUON / MUONStatusMap.C
CommitLineData
d565d56c 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
e54bf126 18/// \ingroup macros
19/// \file MUONStatusMap.C
20/// \brief Macro to check/test pad status and pad status map makers
3fb89a07 21///
e54bf126 22/// \author Laurent Aphecetche
d565d56c 23
24#if !defined(__CINT__) || defined(__MAKECINT__)
25#include "AliCDBManager.h"
26#include "AliMUONCalibrationData.h"
411a502a 27#include "AliMUONLogger.h"
d565d56c 28#include "AliMUONPadStatusMaker.h"
29#include "AliMUONPadStatusMapMaker.h"
411a502a 30#include "AliMUONRecoParam.h"
d565d56c 31#include "AliMUONVCalibParam.h"
7190ece1 32#include "AliMUONVStore.h"
33#include "AliMpCDB.h"
34#include "AliMpConstants.h"
35#include "AliMpDDLStore.h"
36#include "AliMpDetElement.h"
7190ece1 37#include "AliMpManuIterator.h"
d565d56c 38#include "Riostream.h"
39#endif
40
411a502a 41//AliMUONVStore* MUONStatusMap(const TString& cdbStorage = "alien://folder=/alice/data/2009/OCDB",
42AliMUONVStore* MUONStatusMap(const TString& cdbStorage = "local://$ALICE_ROOT/OCDB",
43 Int_t runNumber=67138, Bool_t statusOnly=kTRUE)
44{
45
46 AliMUONRecoParam* recoParam = AliMUONRecoParam::GetCosmicParam();
7190ece1 47
411a502a 48 AliMpCDB::LoadAll2();
d565d56c 49
411a502a 50 AliCDBManager* man = AliCDBManager::Instance();
7190ece1 51
411a502a 52 man->SetDefaultStorage(cdbStorage.Data());
53
54// man->SetSpecificStorage("MUON/Calib/OccupancyMap","local://$ALICE_ROOT/OCDB");
55// man->SetSpecificStorage("MUON/Calib/OccupancyMap","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
56// man->SetSpecificStorage("MUON/Calib/RejectList","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
57// man->SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
d565d56c 58
411a502a 59// man->SetRun(runNumber);
3fb89a07 60
d565d56c 61 AliMUONCalibrationData cd(runNumber);
62
63 AliMUONPadStatusMaker statusMaker(cd);
64
411a502a 65 statusMaker.SetLimits(*recoParam);
d565d56c 66
411a502a 67 delete recoParam;
7190ece1 68
411a502a 69 UInt_t mask = recoParam->PadGoodnessMask();
7190ece1 70
411a502a 71 statusMaker.Report(mask);
d565d56c 72
7190ece1 73 if ( statusOnly ) return statusMaker.StatusStore();
d565d56c 74
7190ece1 75 const Bool_t deferredInitialization = kFALSE;
d565d56c 76
7190ece1 77 AliMUONPadStatusMapMaker statusMapMaker(cd,mask,deferredInitialization);
78
79 return statusMapMaker.StatusMap();
d565d56c 80}