]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/EVE/AliHLTEveISSD.cxx
- adding the use of the histogram merger
[u/mrichter/AliRoot.git] / HLT / EVE / AliHLTEveISSD.cxx
CommitLineData
33791895 1/**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * ALICE Experiment at CERN, All rights reserved. *
4 * *
5 * Primary Authors: Svein Lindal <slindal@fys.uio.no > *
6 * for The ALICE HLT Project. *
7 * *
8 * Permission to use, copy, modify and distribute this software and its *
9 * documentation strictly for non-commercial purposes is hereby granted *
10 * without fee, provided that the above copyright notice appears in all *
11 * copies and that both the copyright notice and this permission notice *
12 * appear in the supporting documentation. The authors make no claims *
13 * about the suitability of this software for any purpose. It is *
14 * provided "as is" without express or implied warranty. *
15 **************************************************************************/
16
17/// @file AliHLTEvePhos.cxx
18/// @author Svein Lindal <slindal@fys.uio.no>
19/// @brief ISSD class for the HLT EVE display
20
21#include "AliHLTEveISSD.h"
22#include "TEvePointSet.h"
23#include "AliHLTHOMERBlockDesc.h"
24#include "TCanvas.h"
25#include "TH1F.h"
26#include "TH2F.h"
27#include "TObjArray.h"
28
29ClassImp(AliHLTEveISSD);
30
31AliHLTEveISSD::AliHLTEveISSD() :
32 AliHLTEveITS("ISSD"),
33 f2DCanvas(NULL),
34 f2DHistoCount(0)
35{
36 // Constructor.
37}
38
39AliHLTEveISSD::~AliHLTEveISSD()
40{
41 //Destructor
42 if(f2DCanvas)
43 delete f2DCanvas;
44 f2DCanvas = NULL;
45}
46
47void AliHLTEveISSD::SetUpPointSet(TEvePointSet * ps) {
48 //See header file for documentation
49 ps->SetMainColor(kBlue);
50 ps->SetMarkerStyle((Style_t)kFullDotMedium);
51}
52
53
54void AliHLTEveISSD::AddHistogramsToCanvas(AliHLTHOMERBlockDesc* block, TCanvas *canvas, Int_t &cdCount ) {
55 //See header file for documentation
56
57
58 if(!f2DCanvas) f2DCanvas = CreateCanvas("ISSD 2D QA", "ISSD 2D QA");
59
60
61 if ( ! block->GetClassName().CompareTo("TH1F")) {
62 TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
63 if(histo){
64 ++cdCount;
65 canvas->cd(cdCount);
66 histo->Draw();
67 }
68
69 } else if ( ! block->GetClassName().CompareTo("TH2F")) {
70 TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
71 if (hista) {
72 ++f2DHistoCount;
73 f2DCanvas->cd(f2DHistoCount);
74 hista->Draw("COLZ");
75 }
76
77 } else if ( ! block->GetClassName().CompareTo("TObjArray")) {
78 TIter next((TObjArray*)(block->GetTObject()));
79 TObject *object;
80 while (( object = (TObject*) next())) {
81 TString string;
82 string = "TH1F";
83 TString string2;
84 string2 = "TH2F";
85
86 if ( !(string.CompareTo(object->ClassName())) ) {
87 TH1F* histo = reinterpret_cast<TH1F*>(object);
88 ++cdCount;
89 canvas->cd(cdCount);
90 histo->Draw();
91
92
93 } else if ( !(string2.CompareTo(object->ClassName()) ) ) {
94 TH2F* histo = reinterpret_cast<TH2F*>(object);
95 ++f2DHistoCount;
96 f2DCanvas->cd(f2DHistoCount);
97 histo->Draw("COLZ");
98 }
99 }
100 }
101
102 canvas->cd(); f2DCanvas->cd();
103
104}
105
106
107void AliHLTEveISSD::UpdateElements() {
108 //See header file for documentation
109 if(fCanvas) fCanvas->Update();
110 if(f2DCanvas) f2DCanvas->Update();
111 if(fPointSet) fPointSet->ElementChanged();
112
113}
114
115void AliHLTEveISSD::ResetElements() {
116 //See header file for documentation
117 fHistoCount = 0;
118 f2DHistoCount = 0;
119 if(fPointSet) fPointSet->Reset();
120}