New macro file demonstrating use of TPCLoader.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Jun 2006 18:16:45 +0000 (18:16 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 2 Jun 2006 18:16:45 +0000 (18:16 +0000)
EVE/test-macros/tpc_gui.C [new file with mode: 0644]

diff --git a/EVE/test-macros/tpc_gui.C b/EVE/test-macros/tpc_gui.C
new file mode 100644 (file)
index 0000000..c2ea8d3
--- /dev/null
@@ -0,0 +1,52 @@
+// $Header$
+
+// Function to spawn a gui for reading rootified raw-data from TPC sector test.
+
+#ifdef __CINT__
+
+class AliRawReaderRoot;
+
+namespace Alieve {
+class TPCData;
+class TPCSector2D;
+class TPCSector3D;
+}
+
+#else
+
+#include <Reve/Reve.h>
+#include <Reve/RGTopFrame.h>
+#include <Alieve/TPCData.h>
+#include <Alieve/TPCSector2D.h>
+#include <Alieve/TPCSector3D.h>
+
+#include <RAW/AliRawReaderRoot.h>
+#include <TPC/AliTPCRawStream.h>
+
+#include <TSystem.h>
+#include <TStyle.h>
+
+#endif
+
+
+using namespace Alieve;
+
+void tpc_gui(const char *file=0, Int_t ievent=0)
+{
+  gStyle->SetPalette(1, 0);
+
+  TPCLoader* l = new TPCLoader;
+  TPCData*   d = new TPCData;
+  // d->SetLoadPedestal(5);
+  d->SetLoadThreshold(5);
+  d->SetAutoPedestal(kTRUE);
+  l->SetData(d);
+
+  TGListTreeItem* loader_item = gReve->AddRenderElement(l);
+
+  if(file != 0) {
+    l->SetFile(file);
+    l->OpenFile();
+    l->GotoEvent(ievent);
+  }
+}