33 #include <TObjArray.h>
55 fExternalDim(externalDim),
56 fInternalDim(internalDim)
73 Double_t entries(h.GetEntries());
75 for ( Int_t i = 0; i < sh.
GetNbins(); ++i )
84 h.SetEntries(entries);
87 if (sh.
HasOverflow()) h.SetBinContent(h.GetNbinsX()+1,1);
99 for ( Int_t i = 0; i < busPatch->
GetNofManus(); ++i )
175 Int_t manuChannel)
const
187 Int_t nbins((1<<sh->
Nbits()));
191 TH1* h =
CreateHisto(Form(
"DE%04dMANU%04dCH%02d",detElemId,manuId,manuChannel),
216 h =
new TH1F(name,name,nbins,xmin,xmax);
217 h->SetDirectory(
gROOT);
221 AliError(Form(
"Cannot create histo for name=%s nbins=%d xmin=%e xmax=%e",name,nbins,xmin,xmax));
237 if ( !group )
return 0x0;
243 AliErrorClass(Form(
"externalDim %d is out of bounds",externalDim));
249 AliErrorClass(Form(
"internalDim %d is out of bounds",internalDim));
253 if ( internalDim < 0 && externalDim < 0 )
255 AliErrorClass(
"Both internal and external dim are < 0 !!!");
266 TIter next(&manuArray);
270 Int_t nbins((1<<12));
290 TString name(Form(
"%s-%s",basename.Data(),ext.Data()));
292 TH1* histo = tdh.
CreateHisto(name.Data(),nbins,xmin,xmax);
296 while ( ( mid = static_cast<AliMpManuUID*>(next()) ) )
308 AliErrorClass(Form(
"Could not create histo for painter %s (%p) data %s (%p) external dim %d internal dim %d",
310 data->GetName(),data,externalDim,internalDim));
313 if (histo) histo->SetDirectory(
gROOT);
336 h =
CreateHisto(Form(
"DE%04dMANU%04d",detElemId,manuId),
347 Double_t& xmin, Double_t& xmax)
const
357 AliError(
"Cannot use this method for external mode !");
361 TIter next(&manuArray);
363 while ( ( mid = static_cast<AliMpManuUID*>(next()) ) )
366 Int_t manuId = mid->
ManuId();
374 if ( ! TMath::Finite(value) )
376 AliError(Form(
"Got a NaN for DE %d manu %d ch %d",detElemId,manuId,i));
380 xmin = TMath::Min(xmin,value);
381 xmax = TMath::Max(xmax,value);
Int_t GetNofManus() const
Bool_t HasOverflow() const
Int_t fExternalDim
(external) dimension we'll histogram
Int_t GetNbins() const
Return number of bins we hold.
Int_t DetElemId() const
Get detection element.
Make histograms from VTrackerData and VPainter objects.
virtual Bool_t HasManu(Int_t detElemId, Int_t manuId) const =0
Whether we have data for a given manu.
static TH1 * CreateHisto(const AliMUONVPainter &painter, Int_t externalDim, Int_t internalDim)
virtual Bool_t HasChannel(Int_t detElemId, Int_t manuId, Int_t manuChannel) const
Whether we have a given channel or not.
virtual Double_t Channel(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0) const =0
Get the value for a given channel and given dimension.
void AddManuHisto(TH1 &h, Int_t detElemId, Int_t manuId) const
Int_t GetDEId() const
Return the Detection element Id.
virtual TString PathName() const
Get our path name (aka fullname)
Double_t GetBinCenter(Int_t bin) const
AliMpDetElement * GetDetElement(Int_t detElemId, Bool_t warn=true) const
Int_t GetManuId(Int_t index) const
The class defines the electronics properties of detection element.
Bool_t HasUnderflow() const
virtual TString DimensionName(Int_t dim) const =0
Get the name of a given (internal) dimension.
Int_t GetBinContent(Int_t bin) const
AliMUONVTrackerData * Data() const
Return the data we are plotting.
static AliMpDDLStore * Instance(Bool_t warn=true)
void GetDataRange(const TObjArray &manuList, Double_t &xmin, Double_t &xmax) const
const AliMUONAttPainter & Attributes() const
Get our attributes.
static Int_t ManuNofChannels()
Max number of channels per manu.
Base class for a graphical object representing some part of the MUON tracking system.
virtual Double_t Manu(Int_t detElemId, Int_t manuId, Int_t dim=0) const =0
Get the value for a given manu and given dimension.
TH1 * CreateManuHisto(Int_t detElemId, Int_t manuId, Int_t nbins, Double_t xmin, Double_t xmax) const
virtual void HistogramRange(Double_t &xmin, Double_t &xmax) const
Get histogram range.
virtual AliMUONSparseHisto * GetManuSparseHisto(Int_t detElemId, Int_t manuId, Int_t dim=0) const =0
Get sparse histogram for a given manu (valid only if IsChannelLevelEnabled()==kFALSE and IsManuLevelE...
virtual const char * GetName() const
Return our name.
virtual Bool_t HasDetectionElement(Int_t detElemId) const =0
Whether we have data for a given detection element.
AliMUONVPainter * Master() const
AliMpBusPatch * GetBusPatch(Int_t busPatchId, Bool_t warn=true) const
A very memory compact histogram to hold some tracker distributions.
virtual AliMUONSparseHisto * GetChannelSparseHisto(Int_t detElemId, Int_t manuId, Int_t manuChannel, Int_t dim=0) const =0
Get sparse histogram for a given channel.
virtual Bool_t IsHistogrammed(Int_t) const
Whether we have histograms for a given dimension, or not.
void AddDEHisto(TH1 &h, Int_t detElemId) const
Int_t fInternalDim
(internal) dimension we'll make histogram for
TH1 * CreateChannelHisto(Int_t detElemId, Int_t manuId, Int_t manuChannel) const
Int_t ManuId() const
Get manu identifier.
Int_t GetNofBusPatches() const
The class defines the properties of BusPatch.
void Add(TH1 &h, const AliMUONSparseHisto &sh) const
virtual Bool_t IsChannelLevelEnabled() const =0
Whether we store values at the channel level.
virtual void FillManuList(TObjArray &manuList) const
Append (i.e. don't have the right to clear the array !) our list of manus to manuList.
Int_t Nbits() const
Number of bits used to code the x-value of the histogram.
Int_t GetBusPatchId(Int_t index) const
void AddBusPatchHisto(TH1 &h, Int_t busPatchId) const
virtual TString ExternalDimensionName(Int_t dim) const =0
Get the name of a given (external) dimension.
virtual Int_t NumberOfDimensions() const =0
The number of dimensions we are handling.
Bool_t IsInternalMode() const
Whether we are working with internal dimensions or external ones.
A group of AliMUONVPainter.
AliMUONPainterGroup * PlotterGroup() const
Return the plotter group.
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
virtual Bool_t HasBusPatch(Int_t busPatchId) const =0
Whether we have data for a given buspath.
const AliMUONVTrackerData & fkData
data we'll histogram
virtual ~AliMUONTrackerDataHistogrammer()
virtual Int_t ExternalDimension() const =0
The number of dimensions we are inputting.