#include <TH1.h>
#include <TObjArray.h>
#include <TROOT.h>
+#include <TMath.h>
///\class AliMUONTrackerDataHistogrammer
///
if ( fData.HasManu(detElemId,manuId) )
{
- for ( Int_t i = 0; i < AliMpConstants::ManuNofChannels(); ++i )
+ if ( fData.IsChannelLevelEnabled() )
{
- if ( fData.HasChannel(detElemId,manuId,i) )
+ for ( Int_t i = 0; i < AliMpConstants::ManuNofChannels(); ++i )
{
- if ( IsInternalMode() )
+ if ( fData.HasChannel(detElemId,manuId,i) )
{
- h.Fill(fData.Channel(detElemId,manuId,i,fInternalDim));
+ if ( IsInternalMode() )
+ {
+ h.Fill(fData.Channel(detElemId,manuId,i,fInternalDim));
+ }
+ else
+ {
+ AliMUONSparseHisto* sh = fData.GetChannelSparseHisto(detElemId,manuId,i,fExternalDim);
+
+ if ( sh )
+ {
+ Add(h,*sh);
+ }
+ }
}
- else
+ }
+ }
+ else
+ {
+ if ( IsInternalMode() )
+ {
+ h.Fill(fData.Manu(detElemId,manuId,fInternalDim));
+ }
+ else
+ {
+ AliMUONSparseHisto* sh = fData.GetManuSparseHisto(detElemId,manuId,fExternalDim);
+ if (sh)
{
- AliMUONSparseHisto* sh = fData.GetChannelSparseHisto(detElemId,manuId,i);
-
- if ( sh )
- {
- Add(h,*sh);
- }
+ Add(h,*sh);
}
}
}
h = new TH1F(name,name,nbins,xmin,xmax);
h->SetDirectory(gROOT);
}
+ else
+ {
+ AliError(Form("Cannot create histo for name=%s nbins=%d xmin=%e xmax=%e",name,nbins,xmin,xmax));
+ }
return h;
}
//_____________________________________________________________________________
TH1*
AliMUONTrackerDataHistogrammer::CreateHisto(const AliMUONVPainter& painter,
- Int_t externalDim,
- Int_t internalDim)
+ Int_t externalDim,
+ Int_t internalDim)
{
/// Create an histogram, from given dim of given data,
/// for all the channels handled by painter
}
else
{
- AliErrorClass(Form("Could not create histo for painter %s external dim %d internal dim %d",
- painter.PathName().Data(),externalDim,internalDim));
+ AliErrorClass(Form("Could not create histo for painter %s (%p) data %s (%p) external dim %d internal dim %d",
+ painter.PathName().Data(),&painter,
+ data->GetName(),data,externalDim,internalDim));
}
+ if (histo) histo->SetDirectory(gROOT);
+
return histo;
}
if ( fData.HasChannel(detElemId,manuId,i) )
{
Double_t value = fData.Channel(detElemId,manuId,i,fInternalDim);
- xmin = TMath::Min(xmin,value);
- xmax = TMath::Max(xmax,value);
+
+ if ( ! TMath::Finite(value) )
+ {
+ AliError(Form("Got a NaN for DE %d manu %d ch %d",detElemId,manuId,i));
+ }
+ else
+ {
+ xmin = TMath::Min(xmin,value);
+ xmax = TMath::Max(xmax,value);
+ }
}
}
}