From 3f98e62326d8afffeda4860ba9a5ea4d71c2f1ed Mon Sep 17 00:00:00 2001 From: phille Date: Wed, 5 Sep 2007 23:51:29 +0000 Subject: [PATCH] Improved raw data display. The raw dat can now be displayed post mortem. The raw dat can now be displayed post mortem.. --- .../OnlineDisplay/AliHLTPHOSOnlineDisplay.cxx | 148 +++++++++++++++--- .../OnlineDisplay/AliHLTPHOSOnlineDisplay.h | 23 +++ .../AliHLTPHOSOnlineDisplayButton.cxx | 71 +++++++++ .../AliHLTPHOSOnlineDisplayButton.h | 45 ++++++ .../AliHLTPHOSOnlineDisplayCalibTab.cxx | 16 +- .../AliHLTPHOSOnlineDisplayEventTab.cxx | 71 ++++++++- .../AliHLTPHOSOnlineDisplayEventTab.h | 21 ++- .../AliHLTPHOSOnlineDisplayNumberEntry.cxx | 129 +++++++++++++++ .../AliHLTPHOSOnlineDisplayNumberEntry.h | 49 ++++++ .../AliHLTPHOSOnlineDisplayRawDataMenu.cxx | 125 +++++++++++++++ .../AliHLTPHOSOnlineDisplayRawDataMenu.h | 72 +++++++++ .../AliHLTPHOSOnlineDisplayRawTab.cxx | 2 +- HLT/PHOS/OnlineDisplay/Makefile | 57 +++++-- 13 files changed, 775 insertions(+), 54 deletions(-) create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayButton.cxx create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayButton.h create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.h create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.cxx create mode 100644 HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.h diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplay.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplay.cxx index 57a146be9ad..03f6bdd94b2 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplay.cxx +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplay.cxx @@ -38,21 +38,25 @@ #include #include "AliHLTPHOSOnlineDisplayEventTab.h" #include "AliHLTPHOSOnlineDisplayCalibTab.h" +#include "AliHLTPHOSOnlineDisplayRawDataMenu.h" -AliHLTPHOSOnlineDisplayEventTab* AliHLTPHOSOnlineDisplay::fgEventTabPtr = 0; -AliHLTPHOSOnlineDisplayCalibTab* AliHLTPHOSOnlineDisplay::fgCalibTabPtr = 0; -AliHLTPHOSOnlineDisplayRawTab* AliHLTPHOSOnlineDisplay::fgRawTabPtr = 0; -AliHLTPHOSOnlineDisplay* AliHLTPHOSOnlineDisplay::fgInstancePtr = 0; /**GetStartZ(); + int tmpEndZ = fgRawMenuPtr->GetEndZ(); + int tmpStartX = fgRawMenuPtr->GetStartX(); + int tmpEndX = fgRawMenuPtr->GetEndX(); + int tmpGain = fgRawMenuPtr->GetGain(); + + int nzRows = tmpEndZ - tmpStartZ +1; + int nxCols = tmpEndX - tmpStartX +1; + int nHistograms = (nzRows)*(nxCols); + + if(nzRows < 0) + { + cout << "ERROR, the Z end coordinate must be bigger than the start coordinat" << endl; + } + else if(nxCols < 0) + { + cout << "ERROR, the X end coordinate must be bigger than the start coordinat" << endl; + } + else if(nHistograms > MAX_HISTOGRAMS) + { + cout << "ERROR, the total number of histograms cannnot exceed " << MAX_HISTOGRAMS << endl; + } + else + { + char tmpName[256]; + fgRawDataCanvas = new TCanvas("TEST2", "PHOS HLT Raw Data Display", 1200, 1000); ; + fgRawDataCanvas->Divide(nzRows, nxCols); + int cnt = 0; + int tmpModID = 0; + int tmpRcuX = 0 ; + int tmpRcuZ = 0; + int tmpX = 0; + int tmpZ = 0; + // int tmpGain = 0; + + for(int zrow=0; zrow< nzRows ; zrow++) + { + for(int xcol=0; xcol cd("<< cnt <<") = " << fgRawDataCanvas->cd(cnt) << endl; + fgRawDataPlotsPtr[cnt]->Draw(); + cout << "cnt = "<< cnt <Update(); + + } } @@ -185,17 +281,17 @@ AliHLTPHOSOnlineDisplay::ScanArguments(int argc, char** argv) { argument=argv[i+1]; if(argument.CompareTo("-port")==0) - { - i++; - if(i+1 <= argc) - { - i++; - fgPorts[fgNPorts] = atoi(argv[i]); - cout << "A setting port to " << fgPorts[fgNPorts] < for the ALICE HLT Project.* + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +#include "AliHLTPHOSOnlineDisplayButton.h" +#include +#include "AliHLTPHOSOnlineDisplay.h" + +using namespace std; + + +AliHLTPHOSOnlineDisplayButton::AliHLTPHOSOnlineDisplayButton() +{ + +} + + +//AliHLTPHOSOnlineDisplayButton::AliHLTPHOSOnlineDisplayButton(TGGroupFrame *gfPtr,char opt, char *name) +AliHLTPHOSOnlineDisplayButton::AliHLTPHOSOnlineDisplayButton(AliHLTPHOSOnlineDisplay *onlineDisplayPtr, TGMainFrame *gfPtr,char opt, char *name) + : TGTextButton(gfPtr, name) +{ + // fOnlineDisplayPtr; + fOnlineDisplayPtr = onlineDisplayPtr; + command = opt; +} + + + +AliHLTPHOSOnlineDisplayButton::~AliHLTPHOSOnlineDisplayButton() +{ + +} + + +Bool_t +AliHLTPHOSOnlineDisplayButton::HandleButton(Event_t* event) +{ + AllowStayDown(kFALSE); + + if(event->fType == kButtonPress) + { + AllowStayDown(kFALSE); + + switch(command) + { + case 'r': //First get configuration comment + cout << "AliHLTPHOSOnlineDisplayButton::HandleButton, getting rawdata"<< endl; + fOnlineDisplayPtr->ShowRawData(); + break; + default: + // MainGui::DisplayMessage("illegal command"); + cout << "illegal command" << endl; + break; + }//end switch + + }//end if + +}//end HandleButton diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayButton.h b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayButton.h new file mode 100644 index 00000000000..beee9038883 --- /dev/null +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayButton.h @@ -0,0 +1,45 @@ +#ifndef ALIHLTPHOSONLINEDISPLAYBUTTON_H +#define ALIHLTPHOSONLINEDISPLAYBUTTON_H + +/************************************************************************** + * This file is property of and copyright by the Experimental Nuclear * + * Physics Group, Dep. of Physics * + * University of Oslo, Norway, 2007 * + * * + * Author: Per Thomas Hille for the ALICE HLT Project.* + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +#include +#include + +class AliHLTPHOSOnlineDisplay; + +class AliHLTPHOSOnlineDisplayButton : public TGTextButton +{ +public: + AliHLTPHOSOnlineDisplayButton(); + // AliHLTPHOSOnlineDisplayButton(TGGroupFrame *gfPtr, char opt, char *name); + // AliHLTPHOSOnlineDisplayButton(TGMainFrame *gfPtr, char opt, char *name); + AliHLTPHOSOnlineDisplayButton(AliHLTPHOSOnlineDisplay *onlineDisplayPtr, TGMainFrame *gfPtr, char opt, char *name); + virtual ~AliHLTPHOSOnlineDisplayButton(); + virtual Bool_t HandleButton(Event_t* event); + +private: + // MainGui *currentMainGuiPtr; + TGMainFrame *currentWindowPtr; + char command; + + AliHLTPHOSOnlineDisplay *fOnlineDisplayPtr; +}; + +#endif diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayCalibTab.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayCalibTab.cxx index e1e84e19eb4..744878823f4 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayCalibTab.cxx +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayCalibTab.cxx @@ -62,7 +62,21 @@ AliHLTPHOSOnlineDisplayCalibTab::ReadBlockData(HOMERReader *homerReaderPtr) tmpz = (accCellEnergiesPtr->fRcuZ)*N_ZROWS_RCU +z; fgCalibHistPtr[gain]->Fill(tmpx, tmpz, accCellEnergiesPtr->fAccumulatedEnergies[x][z][gain] ); - fgHitsHistPtr[gain]->Fill(tmpx, tmpz, accCellEnergiesPtr->fHits[x][z][gain] ); + + ////////////////////////////////////////////////////// + //Added for debugging purposes, want a pure dead map// + ////////////////////////////////////////////////////// + + if(accCellEnergiesPtr->fHits[x][z][gain] > 0) + { + fgHitsHistPtr[gain]->SetBinContent(x, z, 10); + } + + //////////////////////////////////////////////////// + + + + //fgHitsHistPtr[gain]->Fill(tmpx, tmpz, accCellEnergiesPtr->fHits[x][z][gain] ); if(fgHitsHistPtr[gain]->GetBinContent(tmpx, tmpz) > 0) { diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx index 068e7ce3b96..bb4e4c6bc06 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.cxx @@ -8,7 +8,8 @@ #include "HOMERReader.h" #include "HOMERWriter.h" #include "AliHLTPHOSRcuCellEnergyDataStruct.h" - +//#include "AliHLTPHOSRcuCellEnergyDebugDataStruct.h" +#include "AliHLTPHOSRcuCellEnergyDebugDataStruct.h" using namespace std; @@ -21,6 +22,30 @@ AliHLTPHOSOnlineDisplayEventTab::AliHLTPHOSOnlineDisplayEventTab() AliHLTPHOSOnlineDisplayEventTab::AliHLTPHOSOnlineDisplayEventTab(TGTab *tabPtr, HOMERReader *homerSyncPtr, HOMERReader *homerPtrs[MAX_HOSTS], int nHosts) { + for(int mod =0; mod SetBinContent(i, fChannelData[mod][rcuX][rcuZ][x][z][gain][i]); + } +} + + int AliHLTPHOSOnlineDisplayEventTab::GetNextEvent() { @@ -70,7 +105,9 @@ AliHLTPHOSOnlineDisplayEventTab::ReadBlockData(HOMERReader *homeReaderPtr) while ( blk != ~(unsigned long)0 ) { Int_t moduleID; - const AliHLTPHOSRcuCellEnergyDataStruct* cellEnergiesPtr = (const AliHLTPHOSRcuCellEnergyDataStruct*)homeReaderPtr->GetBlockData( blk ); + // const AliHLTPHOSRcuCellEnergyDataStruct* cellEnergiesPtr = (const AliHLTPHOSRcuCellEnergyDataStruct*)homeReaderPtr->GetBlockData( blk ); + const AliHLTPHOSRcuCellEnergyDebugDataStruct* cellEnergiesPtr = (const AliHLTPHOSRcuCellEnergyDebugDataStruct*)homeReaderPtr->GetBlockData( blk ); + moduleID = cellEnergiesPtr->fModuleID ; cout <<"AliHLTPHOSOnlineDisplayEventTab::ReadBlockData, fModuleID =" <Fill(moduleID*N_XCOLUMNS_MOD + tmpX + N_XCOLUMNS_RCU*cellEnergiesPtr->fRcuX, tmpZ + N_ZROWS_RCU*cellEnergiesPtr->fRcuZ, cellEnergiesPtr->fValidData[i].fEnergy); + for(int j= 0; j< N_SAMPLES; j++) + { + fChannelData[moduleID][cellEnergiesPtr->fRcuX][cellEnergiesPtr->fRcuZ][tmpX][tmpZ][HIGH_GAIN][j] = cellEnergiesPtr->fValidData[i].fData[j]; + // fChannelData[moduleId][] + } + } else if(tmpGain == LOW_GAIN) { fgLegoPlotLGPtr->Fill(moduleID*N_XCOLUMNS_MOD + tmpX + N_XCOLUMNS_RCU*cellEnergiesPtr->fRcuX, tmpZ + N_ZROWS_RCU*cellEnergiesPtr->fRcuZ, cellEnergiesPtr->fValidData[i].fEnergy); + for(int j= 0; j< N_SAMPLES; j++) + { + fChannelData[moduleID][cellEnergiesPtr->fRcuX][cellEnergiesPtr->fRcuZ][tmpX][tmpZ][LOW_GAIN][j] = cellEnergiesPtr->fValidData[i].fData[j]; + } } } @@ -127,22 +174,32 @@ AliHLTPHOSOnlineDisplayEventTab::InitDisplay(TGTab *tabPtr) { - fgLegoPlotHGPtr = new TH2D("Homer a eventTAB","xx HLT: #pi^{0} 5 - 30Gev HG, High gain", + // fgLegoPlotHGPtr = new TH2D("Homer a eventTAB","xx HLT: #pi^{0} 5 - 30Gev HG, High gain", + fgLegoPlotHGPtr = new TH2D("Cosmics, High gain", "PHOS HLT: Cosmics", N_XCOLUMNS_MOD*N_MODULES , 0, N_XCOLUMNS_MOD*N_MODULES, N_ZROWS_MOD, 0, N_ZROWS_MOD); - fgLegoPlotHGPtr->SetMaximum( MAX_BIN_VALUE); + fgLegoPlotHGPtr->SetMaximum(1023); fgLegoPlotHGPtr->Reset(); - fgLegoPlotLGPtr = new TH2D("Homer b eventTab","x HLT: #pi^{0} 5 - 30Gev LG, Low gain", + // fgLegoPlotHGPtr = new TH2D("Homer a eventTAB","xx HLT: #pi^{0} 5 - 30Gev HG, High gain", + // fgLegoPlotHGPtr = new TH2D("Homer a eventTAB","xx HLT: #pi^{0} 5 - 30Gev HG, High gain", + // N_XCOLUMNS_MOD*N_MODULES , 0, N_XCOLUMNS_MOD*N_MODULES, + // N_ZROWS_MOD, 0, N_ZROWS_MOD); + // fgLegoPlotHGPtr->SetMaximum( MAX_BIN_VALUE); + // fgLegoPlotHGPtr->Reset(); + + fgLegoPlotLGPtr = new TH2D("Cosmics, Low gain", "PHOS HLT: Cosmics", N_XCOLUMNS_MOD* N_MODULES , 0, N_XCOLUMNS_MOD* N_MODULES, N_ZROWS_MOD, 0, N_ZROWS_MOD); - fgLegoPlotLGPtr->SetMaximum( MAX_BIN_VALUE); + // fgLegoPlotLGPtr->SetMaximum( MAX_BIN_VALUE); + fgLegoPlotLGPtr->SetMaximum(1023); + fgLegoPlotLGPtr->Reset(); TGLayoutHints *fL1 = new TGLayoutHints(kLHintsBottom | kLHintsExpandX | kLHintsExpandY, 2, 2, 15, 1); - TGCompositeFrame *tf = tabPtr->AddTab("Event display TAB"); + TGCompositeFrame *tf = tabPtr->AddTab("Event display"); fSubTab1 = new TGTab(tf, 100, 100); TGCompositeFrame *tf2 = fSubTab1->AddTab("LEGO"); fSubF1 = new TGCompositeFrame(tf2, 60, 20, kVerticalFrame); diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h index 8672e3768a2..980132f9cd9 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayEventTab.h @@ -6,21 +6,34 @@ #include "AliHLTPHOSOnlineDisplayTab.h" #include #include +#include #include "AliHLTPHOSConstants.h" -using namespace PhosHLTConst; +#define N_SAMPLES 70 //BAD, someone is going to pay for this +#define N_ZRCU_COORD 2 +#define N_XRCU_COORD 2 + +using namespace PhosHLTConst; + class AliHLTPHOSGetEventButton; class HOMERReader; class AliHLTPHOSRcuCellEnergyDataStruct; - +class AliHLTPHOSRcuCellEnergyDebugDataStruct; +// AliHLTPHOSRcuCellEnergyDebugDataStruct.h class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab { public: virtual ~AliHLTPHOSOnlineDisplayEventTab(); AliHLTPHOSOnlineDisplayEventTab(TGTab *tabPtr, HOMERReader *fgHomerReaderPtr, HOMERReader *fgHomerReadersPtr[MAX_HOSTS], int nHosts); AliHLTPHOSOnlineDisplayEventTab(); + + + // void GetRawData(TH1D *histPtr); + //AliHLTPHOSOnlineDisplayEventTab::GetRawData(TH1D *histPtr, int mod, int rcuX, int rcuZ, int x, int z, int gain) + void GetRawData(TH1D *histPtr, int mod, int rcuX, int rcuZ, int x, int z, int gain); + void UpdateDisplay(); int GetNextEvent(); virtual void ReadBlockData(HOMERReader *homeReaderPtr); @@ -34,6 +47,10 @@ class AliHLTPHOSOnlineDisplayEventTab : public AliHLTPHOSOnlineDisplayTab TH2D *fgLegoPlotLGPtr; TH2D *fgLegoPlotHGPtr; + + // int *fChannelData[N_MODULES][N_RCUS_PER_MODULE][N_ZROWS_RCU][N_XCOLUMNS_RCU][N_GAINS]; + int *fChannelData[N_MODULES][N_XRCU_COORD][N_ZRCU_COORD][N_XCOLUMNS_RCU][N_ZROWS_RCU][N_GAINS]; + protected: Bool_t fgAccumulate; diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx new file mode 100644 index 00000000000..f8516a1e8c9 --- /dev/null +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.cxx @@ -0,0 +1,129 @@ +/************************************************************************** + * This file is property of and copyright by the Experimental Nuclear * + * Physics Group, Dep. of Physics * + * University of Oslo, Norway, 2006 * + * * + * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. * + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + + +#include "AliHLTPHOSOnlineDisplayNumberEntry.h" +//#include "MainGui.h" + +AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry() +{ + +} + +AliHLTPHOSOnlineDisplayNumberEntry::~AliHLTPHOSOnlineDisplayNumberEntry() +{ + +} + +AliHLTPHOSOnlineDisplayNumberEntry::AliHLTPHOSOnlineDisplayNumberEntry(const TGWindow* parent, Double_t val, Int_t digitwidth, Int_t id, + TGNumberFormat::EStyle style, TGNumberFormat::EAttribute attr, + TGNumberFormat::ELimit limits, + Double_t min, Double_t max): + TGNumberEntry(parent , val, digitwidth, id, style, attr, limits, min, max) +{ + // buttonType = buttType; //c = config Id, r = readout region entry + fButtonToNum = kFALSE; +} + +void +AliHLTPHOSOnlineDisplayNumberEntry::ValueChanged(Long_t t) +{ + int tmp = GetIntNumber(); + // printf("\nnumberentry:ValueChanged: walue gotten was: %d\n", tmp); + + if(t == 10000) + { + if(tmp > lowLimit) + { + SetIntNumber(tmp -1); + } + else + { + + } + } + else if(t == 0) + { + if(tmp < (highLimit)) + { + SetIntNumber(tmp +1); + + } + else + { + + } + } +} + +void +AliHLTPHOSOnlineDisplayNumberEntry::ValueSet(Long_t t) +{ + int tmp = GetIntNumber(); + + // printf("\nnumberentry:ValueSet: walue gotten was: %d\n", tmp); + + if(t == 10000) + { + if(tmp > highLimit) + { + SetIntNumber(highLimit); + tmp = highLimit; + } + else if(tmp < lowLimit) + { + SetIntNumber(lowLimit); + tmp = lowLimit; + } + } + else if(t == 0) + { + if(tmp > highLimit) + { + SetIntNumber(highLimit); + tmp = highLimit; + } + else if(tmp < lowLimit) + { + SetIntNumber(lowLimit); + + tmp = lowLimit; + } + } + + // if(buttonType == 'c') + // { + // MainGui::GetConfigInfo(tmp); + // } +} + +void +AliHLTPHOSOnlineDisplayNumberEntry::SetButtonType(char c) +{ + buttonType = c; +} + + + + +void +AliHLTPHOSOnlineDisplayNumberEntry::SetLimits(int low, int high) +{ + lowLimit = low; + highLimit = high; +} diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.h b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.h new file mode 100644 index 00000000000..f0489ea9c3a --- /dev/null +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayNumberEntry.h @@ -0,0 +1,49 @@ +#ifndef ALIHLTPHOSONLINEDISPLAYNUMBERENTRY_H +#define ALIHLTPHOSONLINEDISPLAYNUMBERENTRY_H + +/************************************************************************** + * This file is property of and copyright by the Experimental Nuclear * + * Physics Group, Dep. of Physics * + * University of Oslo, Norway, 2006 * + * * + * Author: Per Thomas Hille perthi@fys.uio.no for the ALICE DCS Project. * + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +#include + + +class AliHLTPHOSOnlineDisplayNumberEntry : public TGNumberEntry +{ + public: + AliHLTPHOSOnlineDisplayNumberEntry(); + ~AliHLTPHOSOnlineDisplayNumberEntry(); + AliHLTPHOSOnlineDisplayNumberEntry(const TGWindow* parent = 0, Double_t val = 0, Int_t digitwidth = 5, + Int_t id = -1, TGNumberFormat::EStyle style = kNESReal, + TGNumberFormat::EAttribute attr = kNEAAnyNumber, + TGNumberFormat::ELimit limits = kNELNoLimits, Double_t min = 0, Double_t max = 1); + + virtual void ValueChanged(Long_t t); + + virtual void ValueSet(Long_t t); + + void SetLimits(int low, int high); + void SetButtonType(char c); + + private: + char buttonType; + int lowLimit; + int highLimit; +}; + + +#endif diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.cxx new file mode 100644 index 00000000000..feae8a9bb99 --- /dev/null +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.cxx @@ -0,0 +1,125 @@ +/************************************************************************** + * This file is property of and copyright by the Experimental Nuclear * + * Physics Group, Dep. of Physics * + * University of Oslo, Norway, 2007 * + * * + * Author: Per Thomas Hille for the ALICE HLT Project.* + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ +#include "AliHLTPHOSOnlineDisplayRawDataMenu.h" +#include "TGFrame.h" +#include "TGLabel.h" +#include "AliHLTPHOSOnlineDisplayNumberEntry.h" +#include "AliHLTPHOSOnlineDisplayButton.h" +//#include "TGMainFrame.h" + +//#include "TGWindow.h" + +#include + +using namespace std; + + +AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu() +{ + cout << "ERROR, you cannot invoke the Online display without arguments " << endl; +} + + +AliHLTPHOSOnlineDisplayRawDataMenu::AliHLTPHOSOnlineDisplayRawDataMenu(AliHLTPHOSOnlineDisplay *onlineDisplayPtr) +{ + fOnlineDisplayPtr = onlineDisplayPtr; + // fEventPtr = eventPtr; + cout << "creating new AliHLTPHOSOnlineDisplayRawDataMen " < MoveResize( 30, 140, 50, 20); + endLabelPtr = new TGLabel(fWindowPtr, "To"); + endLabelPtr-> MoveResize(100, 140, 50, 20); + startZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5); + // startZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, startZ, 5, -1, (TGNumberFormat::EStyle) 5); + + startZInputPtr->MoveResize( 30, 160, 50, 18); + startZInputPtr->SetLimits(0, 55); + endZInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5); + endZInputPtr->MoveResize( 100, 160, 50, 18); + endZInputPtr->SetLimits(0, 55); + startXInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5); + startXInputPtr->MoveResize(30, 180, 50, 18); + startXInputPtr->SetLimits(0, 63*5); + endXInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5); + endXInputPtr->MoveResize( 100, 180, 50, 18); + endXInputPtr->SetLimits(0, 63*5); + + gainInputPtr = new AliHLTPHOSOnlineDisplayNumberEntry(fWindowPtr, 0, 5, -1, (TGNumberFormat::EStyle) 5); + gainInputPtr->MoveResize( 190, 180, 50, 18); + gainInputPtr->SetLimits(0, 1); + + gainLabelPtr = new TGLabel(fWindowPtr, "Gain"); + gainLabelPtr-> MoveResize( 190, 150, 30, 30); + + zLabelPtr = new TGLabel(fWindowPtr, "Z"); + zLabelPtr-> MoveResize( 10, 160, 20, 20); + xLabelPtr = new TGLabel(fWindowPtr, "X"); + xLabelPtr-> MoveResize( 10, 180, 20, 20); + + fGetDataButtonPtr = new AliHLTPHOSOnlineDisplayButton(fOnlineDisplayPtr, fWindowPtr, 'r', "show rawdata"); + fGetDataButtonPtr->MoveResize(70, 90, 150, 20); + // applyFeeButtPtr = new PhosMenuButton(applyApdMenuPtr, 'c', "Apply to FEE"); + // applyFeeButtPtr->MoveResize( 20, 20, 150, 20); + + fWindowPtr->MoveResize(250,250,250,250); + fWindowPtr->MapSubwindows(); + fWindowPtr->MapWindow(); + + +} + + +AliHLTPHOSOnlineDisplayRawDataMenu::~AliHLTPHOSOnlineDisplayRawDataMenu() +{ + +} + +int +AliHLTPHOSOnlineDisplayRawDataMenu::GetStartZ() +{ + return startZInputPtr->GetIntNumber(); +} + +int +AliHLTPHOSOnlineDisplayRawDataMenu::GetEndZ() +{ + return endZInputPtr->GetIntNumber(); +} + + +int +AliHLTPHOSOnlineDisplayRawDataMenu::GetStartX() +{ + return startXInputPtr->GetIntNumber(); +} + +int +AliHLTPHOSOnlineDisplayRawDataMenu::GetEndX() +{ + return endXInputPtr->GetIntNumber(); +} + +int +AliHLTPHOSOnlineDisplayRawDataMenu::GetGain() +{ + return gainInputPtr->GetIntNumber(); +} diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.h b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.h new file mode 100644 index 00000000000..e11f8addad1 --- /dev/null +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawDataMenu.h @@ -0,0 +1,72 @@ +#ifndef ALIHLTPHOSONLINEDISPLAYRAWDATAMENU_H +#define ALIHLTPHOSONLINEDISPLAYRAWDATAMENU_H + +/************************************************************************** + * This file is property of and copyright by the Experimental Nuclear * + * Physics Group, Dep. of Physics * + * University of Oslo, Norway, 2007 * + * * + * Author: Per Thomas Hille for the ALICE HLT Project.* + * Contributors are mentioned in the code where appropriate. * + * Please report bugs to perthi@fys.uio.no * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +//class TGWindow; +//class TGFrame; +class TGMainFrame; +class TGGroupFrame; +class TGNumberEntry; +class TGLabel; +class AliHLTPHOSOnlineDisplayNumberEntry; +class AliHLTPHOSOnlineDisplayButton; +class AliHLTPHOSOnlineDispplayEventTab; +class AliHLTPHOSOnlineDisplay; + +class AliHLTPHOSOnlineDisplayRawDataMenu +{ +public: + int GetStartZ(); + int GetEndZ(); + int GetStartX(); + int GetEndX(); + int GetGain(); + + // AliHLTPHOSOnlineDisplayRawDataMenu(); + AliHLTPHOSOnlineDisplayRawDataMenu(AliHLTPHOSOnlineDisplay *onlineDisplayPtr); + + virtual ~AliHLTPHOSOnlineDisplayRawDataMenu(); + + // TGWindow *fWindowPtr; + TGMainFrame *fWindowPtr; + // TGGroupFrame *fFramePtr; + AliHLTPHOSOnlineDisplayNumberEntry *startZInputPtr; + AliHLTPHOSOnlineDisplayNumberEntry *endZInputPtr; + AliHLTPHOSOnlineDisplayNumberEntry *startXInputPtr; + AliHLTPHOSOnlineDisplayNumberEntry *endXInputPtr; + + AliHLTPHOSOnlineDisplayNumberEntry *gainInputPtr; + + TGLabel *zLabelPtr; + TGLabel *xLabelPtr; + TGLabel *startLabelPtr; + TGLabel *endLabelPtr; + + AliHLTPHOSOnlineDisplayButton *fGetDataButtonPtr; + TGLabel *gainLabelPtr; + // AliHLTPHOSOnlineDispplayEventTab *fEventPtr; + +private: + AliHLTPHOSOnlineDisplayRawDataMenu(); + AliHLTPHOSOnlineDisplay *fOnlineDisplayPtr; + +}; + +#endif diff --git a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawTab.cxx b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawTab.cxx index 219bcdfb0d4..af829e8d386 100644 --- a/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawTab.cxx +++ b/HLT/PHOS/OnlineDisplay/AliHLTPHOSOnlineDisplayRawTab.cxx @@ -170,7 +170,7 @@ AliHLTPHOSOnlineDisplayRawTab::UpdateDisplay() for(int x = startX; x < endX; x ++) { cout << "z = "<< z << " x= " << x<cd(x*N_ZROWS_RCU +z +1); + // fgTestCanvasPtr->cd(x*N_ZROWS_RCU (tmpHistoName, tmpHistoName, 300, 0, 299);+z +1); // fgTestCanvasPtr->cd((z - startZ)*nCols +x +1); fgTestCanvasPtr->cd((z - startZ)*nCols +x); // fgTestCanvasPtr->cd( z*nCols +x); diff --git a/HLT/PHOS/OnlineDisplay/Makefile b/HLT/PHOS/OnlineDisplay/Makefile index 0ba3288f587..36d3a3864ff 100755 --- a/HLT/PHOS/OnlineDisplay/Makefile +++ b/HLT/PHOS/OnlineDisplay/Makefile @@ -12,17 +12,17 @@ HeadSuf = h ROOTLIBS = `root-config --libs --glibs` ###ALIROOTLIBS = -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) -lESD -lSTEER -lRAWDatarec -lRAWDatabase -ALIROOTLIBS = -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) +ALIROOTLIBS = -L$(ALIHLT_TOPDIR)/build/lib -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) -HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-x86_64-release -lHOMER +HLTLIBS =-L$(ALIHLT_DC_DIR)/lib/Linux-x86_64-debug -lHOMER HOMERINCLUDE =$(ALIHLT_DC_DIR)/src/Util/HOMER/include ##echo $(HOMERINCLUDE) -ALIHLTPHOSINCLUDE =$(ALICE_ROOT)/HLT/PHOS +ALIHLTPHOSINCLUDE =$(ALIHLT_TOPDIR)/PHOS -ALIHLTINCLUDE =$(ALICE_ROOT)/HLT/BASE +ALIHLTINCLUDE =$(ALIHLT_TOPDIR)/BASE MAINO = main.$(ObjSuf) MAINS = main.$(SrcSuf) @@ -39,6 +39,20 @@ ALIHLTPHOSONLINEDISPLAYO =AliHLTPHOSOnlineDisplay.$(ObjSuf) ALIHLTPHOSONLINEDISPLAYS =AliHLTPHOSOnlineDisplay.$(SrcSuf) ALIHLTPHOSONLINEDISPLAYH =AliHLTPHOSOnlineDisplay.$(HeadSuf) +ALIHLTPHOSONLINEDISPLAYBUTTONO =AliHLTPHOSOnlineDisplayButton.$(ObjSuf) +ALIHLTPHOSONLINEDISPLAYBUTTONS =AliHLTPHOSOnlineDisplayButton.$(SrcSuf) +ALIHLTPHOSONLINEDISPLAYBUTTONH =AliHLTPHOSOnlineDisplayButton.$(HeadSuf) + + +ALIHLTPHOSONLINEDISPLAYNUMBERENTRYO =AliHLTPHOSOnlineDisplayNumberEntry.$(ObjSuf) +ALIHLTPHOSONLINEDISPLAYNUMBERENTRYS =AliHLTPHOSOnlineDisplayNumberEntry.$(SrcSuf) +ALIHLTPHOSONLINEDISPLAYNUMBERENTRYH =AliHLTPHOSOnlineDisplayNumberEntry.$(HeadSuf) + + +ALIHLTPHOSONLINEDISPLAYRAWDATAMENUO =AliHLTPHOSOnlineDisplayRawDataMenu.$(ObjSuf) +ALIHLTPHOSONLINEDISPLAYRAWDATAMENUS =AliHLTPHOSOnlineDisplayRawDataMenu.$(SrcSuf) +ALIHLTPHOSONLINEDISPLAYRAWDATAMENUH =AliHLTPHOSOnlineDisplayRawDataMenu.$(HeadSuf) + ALIHLTPHOSONLINEDISPLAYTABO =AliHLTPHOSOnlineDisplayTab.$(ObjSuf) ALIHLTPHOSONLINEDISPLAYTABS =AliHLTPHOSOnlineDisplayTab.$(SrcSuf) ALIHLTPHOSONLINEDISPLAYTABH =AliHLTPHOSOnlineDisplayTab.$(HeadSuf) @@ -55,39 +69,48 @@ ALIHLTPHOSONLINEDISPLAYCALIBTABO =AliHLTPHOSOnlineDisplayCalibTab.$(ObjSuf) ALIHLTPHOSONLINEDISPLAYCALIBTABS =AliHLTPHOSOnlineDisplayCalibTab.$(SrcSuf) ALIHLTPHOSONLINEDISPLAYCALIBTABH =AliHLTPHOSOnlineDisplayCalibTab.$(HeadSuf) -OBJS = $(MAINO) $(ALIHLTPHOSONLINEDISPLAYO) $(ALIHLTPHOSONLINEDISPLAYTABO) \ - $(ALIHLTPHOSONLINEDISPLAYEVENTTABO) $(ALIHLTPHOSONLINEDISPLAYRAWTABO) $(ALIHLTPHOSONLINEDISPLAYCALIBTABO) $(GETEVENTBUTTONO)\ -# $(ALIHLTPHOSTH1DO) - +OBJS = $(MAINO) $(ALIHLTPHOSONLINEDISPLAYO) $(ALIHLTPHOSONLINEDISPLAYTABO) $(ALIHLTPHOSONLINEDISPLAYRAWDATAMENUO)\ + $(ALIHLTPHOSONLINEDISPLAYEVENTTABO) $(ALIHLTPHOSONLINEDISPLAYRAWTABO) $(ALIHLTPHOSONLINEDISPLAYCALIBTABO) \ + $(GETEVENTBUTTONO) $(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYO) $(ALIHLTPHOSONLINEDISPLAYBUTTONO) pftest:$(OBJS) - g++ -g $(ROOTLIBS) $(ALIROOTLIBS) $(HLTLIBS) $(OBJS) -o onlinedisplay + g++ -ggdb -g $(ROOTLIBS) $(ALIROOTLIBS) $(HLTLIBS) $(OBJS) -o onlinedisplay $(MAINO):$(MAINS) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(MAINS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(MAINS) $(ALIHLTPHOSONLINEDISPLAYO):$(ALIHLTPHOSONLINEDISPLAYS) $(ALIHLTPHOSONLINEDISPLAYH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYS) + +$(ALIHLTPHOSONLINEDISPLAYBUTTONO):$(ALIHLTPHOSONLINEDISPLAYBUTTONS) $(ALIHLTPHOSONLINEDISPLAYBUTTONH) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYBUTTONS) + +$(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYO):$(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYS) $(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYH) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYNUMBERENTRYS) + + +$(ALIHLTPHOSONLINEDISPLAYRAWDATAMENUO):$(ALIHLTPHOSONLINEDISPLAYRAWDATAMENUS) $(ALIHLTPHOSONLINEDISPLAYRAWDATAMENUH) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYRAWDATAMENUS) #$(ALIHLTPHOSTH1DO):$(ALIHLTPHOSTH1DS) $(ALIHLTPHOSTH1DH) -# g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSTH1DS) +# g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSTH1DS) $(ALIHLTPHOSONLINEDISPLAYTABO):$(ALIHLTPHOSONLINEDISPLAYTABS) $(ALIHLTPHOSONLINEDISPLAYTABH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYTABS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYTABS) $(ALIHLTPHOSONLINEDISPLAYEVENTTABO):$(ALIHLTPHOSONLINEDISPLAYEVENTTABS) $(ALIHLTPHOSONLINEDISPLAYEVENTTABH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYEVENTTABS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYEVENTTABS) $(ALIHLTPHOSONLINEDISPLAYRAWTABO):$(ALIHLTPHOSONLINEDISPLAYRAWTABS) $(ALIHLTPHOSONLINEDISPLAYRAWTABH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYRAWTABS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYRAWTABS) $(ALIHLTPHOSONLINEDISPLAYCALIBTABO):$(ALIHLTPHOSONLINEDISPLAYCALIBTABS) $(ALIHLTPHOSONLINEDISPLAYCALIBTABH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYCALIBTABS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(ALIHLTPHOSONLINEDISPLAYCALIBTABS) $(GETEVENTBUTTONO):$(GETEVENTBUTTONS) $(GETEVENTBUTTONH) - g++ -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(GETEVENTBUTTONS) + g++ -ggdb -g -I$(ROOTSYS)/include -I$(ALIHLTPHOSINCLUDE) -I$(HOMERINCLUDE) -I$(ALIHLTINCLUDE) -c $(GETEVENTBUTTONS) clean: @rm -f *o *~ *# pftest -- 2.43.0