tpc_clusters.C - added missing AliRunLoader::UnloadRecPoints(). New tpc_raw.C macro...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 May 2008 15:57:56 +0000 (15:57 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 16 May 2008 15:57:56 +0000 (15:57 +0000)
EVE/alice-macros/acorde_raw.C
EVE/alice-macros/tpc_clusters.C
EVE/alice-macros/tpc_raw.C [new file with mode: 0644]
EVE/macros/alieve_online.C

index 5d5683ed8e07d621237486c66dd4e088fbe815ac..c0454b49e635fa91b6b93f5f172cac9b56f80884 100644 (file)
@@ -12,8 +12,7 @@ TString acorde_module_path(Int_t module);
 
 void acorde_raw()
 {
-  // AliEveEventManager::AssertGeometry();
-  gEve->GetGeometry("geometry.root");
+  AliEveEventManager::AssertGeometry();
 
   AliRawReader       * reader = AliEveEventManager::AssertRawReader();
   AliACORDERawStream * stream = new AliACORDERawStream(reader);
index bbb0571ea7165a3785b8c3471df0e79c8d4e0930..5891f1d6d953f3170845244df11571355271d7ff 100644 (file)
@@ -72,6 +72,8 @@ TEvePointSet* tpc_clusters(TEveElement* cont=0, Float_t maxR=270)
 
   delete clrow;
 
+  rl->UnloadRecPoints("TPC");
+
   if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE)
   {
     Warning("tpc_clusters.C", "No TPC clusters");
diff --git a/EVE/alice-macros/tpc_raw.C b/EVE/alice-macros/tpc_raw.C
new file mode 100644 (file)
index 0000000..45a5b60
--- /dev/null
@@ -0,0 +1,68 @@
+// $Id: tpc_sector_raw_test.C 25672 2008-05-09 11:56:22Z cvetan $
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+// Macro to visualise rootified raw-data from TPC.
+//
+// Use tpc_raw(Int_t mode) in order to run it
+// Needs that alieve_init() is already called
+// mode = 1 - show only 2D sectors
+// mode = 2 - show only 3D sectors
+// mode = 3 - show both 2D and 3D sectors
+
+class AliRawReader;
+
+class AliEveTPCData;
+class AliEveTPCSector2D;
+class AliEveTPCSector3D;
+
+void tpc_raw(Int_t mode = 3)
+{
+  gStyle->SetPalette(1, 0);
+
+  gEve->DisableRedraw();
+
+  AliRawReader *reader = AliEveEventManager::AssertRawReader();
+  reader->Reset();
+  AliTPCRawStream input(reader);
+  reader->Select("TPC"); // ("TPC", firstRCU, lastRCU);
+
+  x = new AliEveTPCData;
+  // x->SetLoadPedestal(5);
+  x->SetLoadThreshold(5);
+  x->SetAutoPedestal(kTRUE);
+
+  x->DropAllSectors();
+  x->LoadRaw(input, kTRUE, kTRUE);
+
+  for (Int_t i=0; i<=35; ++i) {
+    if (mode & 1) {
+      s = new AliEveTPCSector2D();
+      s->SetSectorID(i);
+      s->SetAutoTrans(kTRUE); // place on proper 3D coordinates
+      s->SetDataSource(x);
+      s->SetFrameColor(36);
+      gEve->AddElement(s);
+      s->IncRTS();
+    }
+    if (mode & 2) {
+      t = new AliEveTPCSector3D();
+      t->SetSectorID(i);
+      t->SetAutoTrans(kTRUE);
+      t->SetDataSource(x);
+      t->SetMinTime(40);
+      t->SetMaxTime(980);
+      t->SetDriftVel(2.273);
+      gEve->AddElement(t);
+      t->IncRTS();
+    }
+  }
+
+  gEve->EnableRedraw();
+  gEve->Redraw3D();
+}
index 7b59917c33dea4665ecf894b15e26ecf3c051d6f..0670cc35f56a84db0f093d6098f8d4ae01025070 100644 (file)
@@ -9,4 +9,7 @@ void alieve_online()
   // List of macros to be executed
   gROOT->Macro("its_raw.C");
   gROOT->Macro("its_clusters.C");
+  gROOT->Macro("tpc_raw.C");
+  gROOT->Macro("tpc_clusters.C");
+  gROOT->Macro("acorde_raw.C");
 }