]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVQADataMakerRec.cxx
Coverity fixes (Ivana)
[u/mrichter/AliRoot.git] / MUON / AliMUONVQADataMakerRec.cxx
CommitLineData
ece56eb9 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#include "AliMUONVQADataMakerRec.h"
19
20///
21/// \class AliMUONVQADataMakerRec
22///
23/// Interface for a MUON QADataMakerRec, common to MCH and MTR
24///
25/// \author Laurent Aphecetche
26
27/// \cond CLASSIMP
28ClassImp(AliMUONVQADataMakerRec)
29/// \endcond
30
31#include "AliQADataMakerRec.h"
32#include "AliMUONRecoParam.h"
33#include "AliCDBManager.h"
152fe71e 34#include "TH1.h"
ece56eb9 35
36//_____________________________________________________________________________
37AliMUONVQADataMakerRec::AliMUONVQADataMakerRec(AliQADataMakerRec* master)
38: fMaster(master)
39{
40 /// ctor
41}
42
43//_____________________________________________________________________________
44AliMUONVQADataMakerRec::~AliMUONVQADataMakerRec()
45{
46 /// dtor
47}
48
49//_____________________________________________________________________________
50Int_t
51AliMUONVQADataMakerRec::Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert , const Bool_t image )
52{
53 /// fwd
54 return fMaster ? fMaster->Add2DigitsList(hist,index,expert,image) : -1;
55}
56
57//_____________________________________________________________________________
58Int_t
59AliMUONVQADataMakerRec::Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert , const Bool_t image )
60{
61 /// fwd
62 return fMaster ? fMaster->Add2ESDsList(hist,index,expert,image) : -1;
63}
64
65//_____________________________________________________________________________
66Int_t
67AliMUONVQADataMakerRec::Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert , const Bool_t image )
68{
69 /// fwd
70 return fMaster ? fMaster->Add2RecPointsList(hist,index,expert,image) : -1;
71}
72
73//_____________________________________________________________________________
74Int_t
75AliMUONVQADataMakerRec::Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert , const Bool_t image , const Bool_t saveForCorr )
76{
77 /// fwd
78 return fMaster ? fMaster->Add2RawsList(hist,index,expert,image,saveForCorr) : -1;
79}
80
81//_____________________________________________________________________________
82AliRecoParam::EventSpecie_t
83AliMUONVQADataMakerRec::CurrentEventSpecie() const
84{
85 /// fwd
86 return fMaster ? fMaster->GetEventSpecie() : AliRecoParam::kDefault;
87}
88
89//_____________________________________________________________________________
90const AliMUONRecoParam*
91AliMUONVQADataMakerRec::GetRecoParam() const
92{
93 /// fwd
94 return fMaster ? dynamic_cast<const AliMUONRecoParam*>(fMaster->GetRecoParam()) : 0x0;
95}
96
97//_____________________________________________________________________________
98TH1*
99AliMUONVQADataMakerRec::GetDigitsData(Int_t index) const
100{
101 /// fwd
102 return fMaster ? fMaster->GetDigitsData(index) : 0x0;
103}
104
105//_____________________________________________________________________________
106TH1*
107AliMUONVQADataMakerRec::GetESDsData(Int_t index) const
108{
109 /// fwd
110 return fMaster ? fMaster->GetESDsData(index) : 0x0;
111}
112
113//_____________________________________________________________________________
114TH1*
115AliMUONVQADataMakerRec::GetRecPointsData(Int_t index) const
116{
117 /// fwd
118 return fMaster ? fMaster->GetRecPointsData(index) : 0x0;
119}
120
121//_____________________________________________________________________________
122TH1*
123AliMUONVQADataMakerRec::GetRawsData(Int_t index) const
124{
125 /// fwd
126 return fMaster ? fMaster->GetRawsData(index) : 0x0;
127}
128
152fe71e 129//_____________________________________________________________________________
130void
57e2ad1a 131AliMUONVQADataMakerRec::ResetDetector(const TObjArray* list)
152fe71e 132{
133 /// Reset all histograms found in list, that match either trigger or tracker
134
135 TString cn(ClassName());
136 TString pattern;
137
138 if ( cn.Contains("Trigger") ) pattern = "Trigger";
139 if ( cn.Contains("Tracker") ) pattern = "Tracker";
140
141 TIter next(list);
142 TObject* o;
143 while ( (o = next()) )
144 {
145 TH1* h = dynamic_cast<TH1*>(o);
146 if ( h )
147 {
152fe71e 148 TString hcn(h->ClassName());
149 if ( hcn.Contains(pattern) )
150 {
151 h->Reset();
152 }
153 }
154 }
155}
156
ece56eb9 157//_____________________________________________________________________________
158Int_t
159AliMUONVQADataMakerRec::RunNumber() const
160{
161 /// fwd
162 return fMaster ? fMaster->GetRun() : -1;
163}