Reverting rev. 51375,51372,51371 since they break the compilation
[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"
8dd92431 33#include "AliMUONCDB.h"
7190ece1 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",
8dd92431 42AliMUONVStore* MUONStatusMap(const TString& cdbStorage = "alien://folder=/alice/data/2011/OCDB",
43 Int_t runNumber=145000, Bool_t statusOnly=kTRUE)
411a502a 44{
45
8dd92431 46 AliCDBManager::Instance()->SetDefaultStorage(cdbStorage);
47 AliCDBManager::Instance()->SetRun(runNumber);
7190ece1 48
8dd92431 49
50 AliMUONCDB::LoadMapping();
51
52 AliMUONRecoParam* recoParam = AliMUONCDB::LoadRecoParam();
d565d56c 53
411a502a 54 AliCDBManager* man = AliCDBManager::Instance();
7190ece1 55
411a502a 56 man->SetDefaultStorage(cdbStorage.Data());
57
58// man->SetSpecificStorage("MUON/Calib/OccupancyMap","local://$ALICE_ROOT/OCDB");
59// man->SetSpecificStorage("MUON/Calib/OccupancyMap","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
60// man->SetSpecificStorage("MUON/Calib/RejectList","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
61// man->SetSpecificStorage("MUON/Align/Data","alien://folder=/alice/cern.ch/user/l/laphecet/OCDB");
d565d56c 62
d565d56c 63 AliMUONCalibrationData cd(runNumber);
64
65 AliMUONPadStatusMaker statusMaker(cd);
66
411a502a 67 statusMaker.SetLimits(*recoParam);
d565d56c 68
411a502a 69 UInt_t mask = recoParam->PadGoodnessMask();
8dd92431 70
71 // delete recoParam;
7190ece1 72
411a502a 73 statusMaker.Report(mask);
d565d56c 74
7190ece1 75 if ( statusOnly ) return statusMaker.StatusStore();
d565d56c 76
7190ece1 77 const Bool_t deferredInitialization = kFALSE;
d565d56c 78
7190ece1 79 AliMUONPadStatusMapMaker statusMapMaker(cd,mask,deferredInitialization);
80
81 return statusMapMaker.StatusMap();
d565d56c 82}