]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updated GUI - use TPC calib viewer
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2008 09:40:34 +0000 (09:40 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 21 Feb 2008 09:40:34 +0000 (09:40 +0000)
Adding manual in README file (Marian)

TPC/amoreTPC-QA/README
TPC/amoreTPC-QA/src/ui/Makefile
TPC/amoreTPC-QA/src/ui/UIQA.cxx
TPC/amoreTPC-QA/src/ui/UIQA.h

index 079accd08a5e157a68217184232f234bc478af36..53155d17d0f9e587dfb647426037a4b88d5ae565 100644 (file)
@@ -1,3 +1,31 @@
+How to use AMORE:
+
+login to the aldaqdqm04 
+user: tpc
+passwrod: ask responsible
+
+
+1. Check if you have data at given GDC
+eventDump  :@aldaqpc030
+
+2. Start agent
+   From GDC:
+ amoreAgent -aTPCQA -s :@aldaqpc030
+   Or From file:
+  amoreAgent -aTPCQA  -s data.raw
+
+3. start amore for TPC
+   amore  -dTPC -mUIQA
+
+
+
+
+
+
+
+
+
+
 AMORE AGENT config:
 
 
@@ -10,17 +38,10 @@ Please enter the default DATE datasource for this agent [:] : RAW
 Please enter the default AMORE PublisherModule for this agent [MyModule1] : AmoreTPCPublisher
 New amoreAgent was succesfully configured
 
-
-
-
 mysql:
 mysql -udaq -p
-
 use AMORE;
 show tables;
 select moname from CEDA;
-
-
-
 publisher:
 
index 37c9c73e54b8fed8b04974e7b2041773641f7a20..f825763ab1a2f406cb832c30b92f951edffd4d99 100644 (file)
@@ -6,7 +6,7 @@ pkginclude_HEADERS = UIQA.h
 BUILT_SOURCES = TPCUIDict.h TPCUIDict.cxx
 
 bin_PROGRAMS = libAmoreTPCUI.$(DllSuf)
-libAmoreTPCUI_CPPFLAGS = $(CPPFLAGS) -I../common -I$(ALICE_ROOT)/TPC
+libAmoreTPCUI_CPPFLAGS = $(CPPFLAGS) -I../common -I$(ALICE_ROOT)/TPC  -I$(ALICE_ROOT)/STEER
 libAmoreTPCUI_CXXFLAGS = $(CXXFLAGS)
 libAmoreTPCUI_LIBS = $(LIBS)   $(AMORE)/lib/libAmoreDA.a   -lAmoreTPCCommon  -lEG -lVMC -lGeom -lMinuit -lRAWDatabase -lSTEERBase -lSTEER -lESD -lRAWDatarec -lCDB -lTPCbase -lTPCrec -lTPCsim
 libAmoreTPCUI_LDFLAGS = $(LDFLAGS) -L../common -L$(ALICE_ROOT)/lib/tgt_linux -L$(AMORE_SITE)/lib -shared -Wl,-soname,$(bin_PROGRAMS) -o $(bin_PROGRAMS)
index 81496c5c0ac8e5c0c5a5826abab16452f1177fa3..04ac3e066af6f63e090bbe71e331e31070dc3b86 100644 (file)
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
  ***************************************************************************/
 #include "UIQA.h"
-#include "AliTPCCalPad.h"
-#include "AliTPCdataQA.h"
-#include "AliTPCdataQA.h"
 #include <AmoreDA.h>
 #include <TROOT.h>
 #include <TStyle.h>
-
+#include "AliTPCCalPad.h"
+#include "AliTPCdataQA.h"
+#include "AliTPCCalibViewer.h"
+#include "AliTPCCalibViewerGUI.h"
+#include "AliTPCPreprocessorOnline.h"
+#include "AliCDBEntry.h"
 ClassImp(amore::TPC::ui::UIQA)
 
 #include <iostream>
@@ -58,7 +60,13 @@ void UIQA::Construct() { // The custom GUI is constructed here. gRootFrame is th
  fTab=new TGTab(amore::ui::gRootFrame);
  amore::ui::gRootFrame->AddFrame(fTab);
  //
- TGCompositeFrame* tempFrame=fTab->AddTab("OverThreshold");
+ //
+ TGCompositeFrame* tabCont1 =fTab->AddTab("Expert");
+ fViewerGUI = new AliTPCCalibViewerGUI(tabCont1, 1000, 600, 0);
+ tabCont1->AddFrame(fViewerGUI , new TGLayoutHints(kLHintsExpandX | kLHintsExpandY, 0, 0, 0, 0));
+ //
+  TGCompositeFrame* tempFrame=fTab->AddTab("OverThreshold");
  fEC[0]=new TRootEmbeddedCanvas("fEC0", tempFrame, 1000, 650);
  tempFrame->AddFrame(fEC[0]);
  fEC[0]->GetCanvas()->Divide(3,3);
@@ -68,6 +76,10 @@ void UIQA::Construct() { // The custom GUI is constructed here. gRootFrame is th
  fEC[1]=new TRootEmbeddedCanvas("fEC1", tempFrame, 1000, 650);
  tempFrame->AddFrame(fEC[1]);
  fEC[1]->GetCanvas()->Divide(2,3);
+ //
+ //
+
+
  
 
  amore::ui::gRootFrame->MapSubwindows();
@@ -91,7 +103,7 @@ void UIQA::Construct() { // The custom GUI is constructed here. gRootFrame is th
  gStyle->SetFrameFillColor(10);
  gStyle->SetFrameBorderSize(1);
  gStyle->SetFrameBorderMode(-1);
- gStyle->SetFrameLineWidth(1.2);
+ gStyle->SetFrameLineWidth(1.);
 }
 
 void UIQA::SubscribeMonitorObjects() { // Before using any MonitorObject, a subscription should be made.
@@ -184,7 +196,7 @@ void UIQA::Update() { // This is executed after getting the updated contents of
    canvas->cd(6);
    tpcqa->GetMaxCharge()->MakeHisto2D(1)->Draw("colz");
  }
-
+ if (tpcqa) MakeTree(tpcqa);
 
  // End of access example
 
@@ -209,6 +221,82 @@ void UIQA::EndOfCycle() {
 
 }
 
+
+  void UIQA::MakeTree(AliTPCdataQA* ped){
+    //
+    //
+    AliTPCPreprocessorOnline preprocesor;
+    if (ped->GetMaxCharge()) preprocesor.AddComponent(ped->GetMaxCharge());  
+    if (ped->GetMeanCharge()) preprocesor.AddComponent(ped->GetMeanCharge());  
+    if (ped->GetOverThreshold0()) preprocesor.AddComponent(ped->GetOverThreshold0());
+    if (ped->GetOverThreshold5()) preprocesor.AddComponent(ped->GetOverThreshold5());
+    if (ped->GetOverThreshold10()) preprocesor.AddComponent(ped->GetOverThreshold10());
+    if (ped->GetOverThreshold20()) preprocesor.AddComponent(ped->GetOverThreshold20());
+    if (ped->GetOverThreshold30()) preprocesor.AddComponent(ped->GetOverThreshold30());
+    AliTPCCalPad * noise = GetNoise();
+    if (noise)  preprocesor.AddComponent(noise);
+    AliTPCCalPad * pedestal = GetPedestal();
+      if (pedestal)  preprocesor.AddComponent(pedestal);
+    preprocesor.DumpToFile("CalibTree2.root");
+    delete noise;
+    delete pedestal;
+    //  /*CalibTree
+    AliTPCCalibViewer *viewer = fViewerGUI->GetViewer();
+    AliTPCCalibViewer *nviewer = new  AliTPCCalibViewer("CalibTree2.root", "calPads");
+    fViewerGUI->Initialize(nviewer);
+    //*/
+    //
+    //
+    //
+    
+  }
+
+  AliTPCCalPad *  UIQA::GetNoise(){
+    //
+    // GetNoise - if not in AmoreDB than from file
+    //
+    //amore::da::AmoreDA amoreDA;
+    // TObject *temp=0;
+    //amoreDA.Receive("PEDESTAL/NOISE",temp);
+    //temp->Dump();
+    // if (temp) return (AliTPCCalPad*) temp;
+    TDirectory * dir = gDirectory;
+    TFile *f = new TFile("$AMORE_SITE/PadNoise.root");
+    AliCDBEntry * entry = (AliCDBEntry*)f->Get("AliCDBEntry");
+    if (entry){
+      AliTPCCalPad * pad = ((AliTPCCalPad *)entry->GetObject()->Clone());
+      if (pad) {
+       pad->SetName("Noise");
+       pad->Print();
+       return pad;
+      }
+    }
+    f->Close();
+    dir->cd();
+    return 0;
+  }
+
+  AliTPCCalPad *  UIQA::GetPedestal(){
+    //
+    //
+    TFile f("$AMORE_SITE/Pedestal.root");
+    AliCDBEntry * entry = (AliCDBEntry*)f.Get("AliCDBEntry");
+    if (entry){
+      AliTPCCalPad * pad = ((AliTPCCalPad *)entry->GetObject()->Clone());
+      if (pad) {
+       pad->SetName("Pedestals");
+       pad->Print();
+       return pad;
+      }
+    }
+    return 0;
+  }
+  AliTPCCalPad *  UIQA::GetTime0(){
+    return 0;
+  }
+
+
+
 };
 
 };
index 0d945613530bb58c31facd2b7ad7c4f7f946e077..eea58f149779af79f802f78f75709cb41c52c811 100644 (file)
@@ -26,7 +26,9 @@
 #include <TGTab.h>
 #include <TGNumberEntry.h>
 #include <TGTextView.h>
-
+class AliTPCCalibViewerGUI;
+class AliTPCdataQA;
+class AliTPCCalPad;
 namespace amore {
 
 namespace TPC {
@@ -56,12 +58,15 @@ class UIQA : public amore::ui::VisualModule, public amore::TPC::common::Common {
  virtual void EndOfSession() {};
  
  protected:
+ void MakeTree(AliTPCdataQA * qa);
+ AliTPCCalPad * GetNoise();
+ AliTPCCalPad * GetPedestal();
+ AliTPCCalPad * GetTime0();
  TGTab* fTab;
  TRootEmbeddedCanvas* fEC[10];
  TGNumberEntryField* fNEF[10];
  TGTextView* fTextView[10];
+ AliTPCCalibViewerGUI *fViewerGUI;
  ClassDef(UIQA, 1);
 
 };