#include "TMath.h"
#include "TPaveText.h"
#include "TVirtualPad.h"
+#include "TStyle.h"
+#include "TLatex.h"
/// \cond CLASSIMP
ClassImp(AliMUONTrackerQAChecker)
//___________________________________________________________________________
Int_t GetColorFromCheckCode(AliMUONVQAChecker::ECheckCode code)
{
- const Int_t INFOCOLOR(kGreen); // green = INFO
- const Int_t WARNINGCOLOR(kYellow); // yellow = WARNING
- const Int_t ERRORCOLOR(kOrange); // orange = ERROR
- const Int_t FATALCOLOR(kRed); // red = FATAL
-
- if ( code == AliMUONVQAChecker::kInfo ) return INFOCOLOR;
- else if ( code == AliMUONVQAChecker::kWarning ) return WARNINGCOLOR;
- else if ( code == AliMUONVQAChecker::kFatal) return FATALCOLOR;
- else return ERRORCOLOR;
+ if ( code == AliMUONVQAChecker::kInfo ) return AliMUONVQAChecker::kInfoColor;
+ else if ( code == AliMUONVQAChecker::kWarning ) return AliMUONVQAChecker::kWarningColor;
+ else if ( code == AliMUONVQAChecker::kFatal) return AliMUONVQAChecker::kFatalColor;
+ else return AliMUONVQAChecker::kErrorColor;
}
const char* NOTENOUGHEVENTMESSAGE = "Not enough event to judge. Please wait a bit";
sopt += extraopt;
histo.SetOption(sopt.Data());
- histo.SetTitle(kFALSE);
+ histo.SetBit(TH1::kNoTitle);
- TObject* title = histo.GetListOfFunctions()->FindObject("title");
- if (title) title->Delete();
+ TList* lstF = histo.GetListOfFunctions();
+ TObject* title = lstF->FindObject("title");
+ if (title) delete lstF->Remove(title);
+ //
+ lstF->Add(text);
+
+ }
- histo.GetListOfFunctions()->Add(text);
+ //___________________________________________________________________________
+ void ShowTrueValue(TH1& hrostatusnorm, Int_t v)
+ {
+ // For a bar > 100% we put the text inside the bar (as TEXT45 option is putting above which
+ // would go offscreen)
+
+ Int_t bin = hrostatusnorm.FindBin(1.0*v);
+
+ Double_t value = hrostatusnorm.GetBinContent(bin);
+
+ if ( value > 100.0 )
+ {
+ TLatex* l = new TLatex(hrostatusnorm.GetBinCenter(bin),50,Form("%g",value));
+ l->SetTextFont(gStyle->GetTextFont());
+ l->SetTextAlign(22);
+ l->SetTextAngle(45);
+ l->SetTextSize(0.02*hrostatusnorm.GetMarkerSize());
+ hrostatusnorm.GetListOfFunctions()->Add(l);
+ }
}
-
-}
+}
//__________________________________________________________________
AliMUONTrackerQAChecker::AliMUONTrackerQAChecker() : AliMUONVQAChecker()
{
/// dtor
}
-//__________________________________________________________________
-AliMUONTrackerQAChecker::AliMUONTrackerQAChecker(const AliMUONTrackerQAChecker& qac) :
- AliMUONVQAChecker(qac)
-{
- /// copy ctor
-}
-
//______________________________________________________________________________
AliMUONVQAChecker::ECheckCode*
AliMUONTrackerQAChecker::CheckRecPoints(TObjArray ** list, const AliMUONRecoParam* /*recoParam*/)
Int_t neventsseen = TMath::Nint(hneventsseen->GetBinContent(1));
Int_t neventsused = TMath::Nint(hneventsused->GetBinContent(1));
- if ( !hneventsseen || !hneventsused )
- {
- continue;
- }
-
AliMUONVQAChecker::ECheckCode c1 = AliMUONVQAChecker::kInfo;
AliMUONVQAChecker::ECheckCode c2 = AliMUONVQAChecker::kInfo;
AliMUONVQAChecker::ECheckCode c3 = AliMUONVQAChecker::kInfo;
}
}
- hbp.GetListOfFunctions()->Delete();
- hddl.GetListOfFunctions()->Delete();
hddl.SetStats(kFALSE);
hbp.SetXTitle("Absolute Bus Patch Id");
hbp.SetYTitle("Occupancy (percent)");
line2->SetLineColor(1);
line2->SetLineWidth(1);
+ TList* lstF = hbp.GetListOfFunctions();
+ if (lstF) {
+ TObject *stats = lstF->FindObject("stats");
+ lstF->Remove(stats);
+ TObject *obj;
+ while ((obj = lstF->First())) { while(lstF->Remove(obj)) { } delete obj; }
+ if (stats) lstF->Add(stats);
+ }
+
hbp.GetListOfFunctions()->Add(line1);
hbp.GetListOfFunctions()->Add(line2);
/// Normalize and put some text on the readout error histogram
/// Note in particular the treatment of tokenlost errors !
- hrostatus.GetListOfFunctions()->Delete();
- hrostatusnorm.GetListOfFunctions()->Delete();
hrostatusnorm.Reset();
- hrostatusnorm.SetFillStyle(0);
AliMUONVQAChecker::ECheckCode rv(AliMUONVQAChecker::kInfo);
hrostatusnorm.Add(&hrostatus,100.0/neventsseen);
hrostatusnorm.SetOption("TEXT45"); // note : cannot use HIST option, otherwise the associated function (i.e. the tpavetext) is not drawn...
hrostatusnorm.SetMinimum(0.0);
+ hrostatusnorm.SetMaximum(100.0);
Double_t tokenLost = hrostatusnorm.GetBinContent(hrostatusnorm.FindBin(1.0*AliMUONQAIndices::kTrackerRawNofTokenLostErrors));
{
messages.Add(new TObjString("Too many empty events !"));
messages.Add(new TObjString(NOTIFYEXPERTMESSAGE));
- rv = AliMUONVQAChecker::kFatal;
-
- }
+ rv = AliMUONVQAChecker::kFatal;
+ }
}
SetupHisto(neventsseen,neventsused,messages,hrostatusnorm,rv,"text45");
+ ShowTrueValue(hrostatusnorm,AliMUONQAIndices::kTrackerRawNofTokenLostErrors);
+ ShowTrueValue(hrostatusnorm,AliMUONQAIndices::kTrackerRawNofParityErrors);
+ ShowTrueValue(hrostatusnorm,AliMUONQAIndices::kTrackerRawNofPaddingErrors);
+ ShowTrueValue(hrostatusnorm,AliMUONQAIndices::kTrackerRawNofGlitchErrors);
+
return rv;
}
AliMUONVQAChecker::ECheckCode rv(AliMUONVQAChecker::kInfo);
- heventsizeperevent.GetListOfFunctions()->Delete();
-
heventsizeperevent.Reset();
TObjArray messages;
}
else
{
- heventsizeperevent.Add(&heventsize);
- heventsizeperevent.Scale(1.0/neventsseen/1024.0);
+ heventsizeperevent.Add(&heventsize,1.0/neventsseen/1024.0);
heventsizeperevent.SetMinimum(0);
Double_t totalEventSizePerEvent = heventsizeperevent.Integral();
if ( totalEventSizePerEvent > recoParam.EventSizeHardLimit() )
{
- rv = AliMUONVQAChecker::kFatal;
+ rv = AliMUONVQAChecker::kError;
msg = "That is really too high.";
action = NOTIFYEXPERTMESSAGE;
}
{
msg = "That is a bit high.";
action = "Please keep an eye on it.";
- rv = AliMUONVQAChecker::kError;
+ rv = AliMUONVQAChecker::kWarning;
}
else
{