]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliHeader.cxx
Test macro for the parallel TPC tracking (M.Ivanov)
[u/mrichter/AliRoot.git] / STEER / AliHeader.cxx
index 861231b38dcbd4c531e7db43cb4a3a2725f92c1b..25f867190d88685e3f56e0defd30ca89a9783a8f 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
+
+//-----------------------------------------------------------------------
+//     Simulation event header class
+//     Collaborates with AliRun, AliStack, and AliGenReaderTreeK classes
+//     Many other classes depend on it
+//     Author:
+//-----------------------------------------------------------------------
+
+#include <stdio.h>
 
 #include "AliHeader.h"
-#include "stdio.h"
  
 ClassImp(AliHeader)
 
-AliHeader::AliHeader()
+//_______________________________________________________________________
+AliHeader::AliHeader():
+  fRun(0),
+  fNvertex(0),
+  fNprimary(0),
+  fNtrack(0),
+  fEvent(0),
+  fEventNrInRun(0),
+  fStack(0),
+  fGenHeader(0)
 {
-  fRun=0;      
-  fNvertex=0;
-  fNprimary=0;
-  fNtrack=0;
-  fEvent=0;
+  //
+  // Default constructor
+  //
+}
+
+//_______________________________________________________________________
+AliHeader::AliHeader(const AliHeader& head):
+  TObject(head),
+  fRun(0),
+  fNvertex(0),
+  fNprimary(0),
+  fNtrack(0),
+  fEvent(0),
+  fEventNrInRun(0),
+  fStack(0),
+  fGenHeader(0)
+{
+  //
+  // Copy constructor
+  //
+  head.Copy(*this);
+}
+
+//_______________________________________________________________________
+AliHeader::AliHeader(Int_t run, Int_t event):
+  fRun(run),
+  fNvertex(0),
+  fNprimary(0),
+  fNtrack(0),
+  fEvent(event),
+  fEventNrInRun(0),
+  fStack(0),
+  fGenHeader(0)
+{
+  //
+  // Standard constructor
+  //
 }
 
-AliHeader::AliHeader(Int_t run, Int_t event)
+//_______________________________________________________________________
+AliHeader::AliHeader(Int_t run, Int_t event, Int_t evNumber):
+  fRun(run),
+  fNvertex(0),
+  fNprimary(0),
+  fNtrack(0),
+  fEvent(event),
+  fEventNrInRun(evNumber),
+  fStack(0),
+  fGenHeader(0)
 {
+  //
+  // Standard constructor
+  //
+}
+
+//_______________________________________________________________________
+void AliHeader::Reset(Int_t run, Int_t event)
+{
+  //
+  // Resets the header with new run and event number
+  //
   fRun=run;    
   fNvertex=0;
   fNprimary=0;
@@ -40,17 +107,26 @@ AliHeader::AliHeader(Int_t run, Int_t event)
   fEvent=event;
 }
 
-void AliHeader::Reset(Int_t run, Int_t event)
+//_______________________________________________________________________
+void AliHeader::Reset(Int_t run, Int_t event, Int_t evNumber)
 {
+  //
+  // Resets the header with new run and event number
+  //
   fRun=run;    
   fNvertex=0;
   fNprimary=0;
   fNtrack=0;
   fEvent=event;
+  fEventNrInRun=evNumber;
 }
 
-void AliHeader::Dump()
+//_______________________________________________________________________
+void AliHeader::Print(const char*) const
 {
+  //
+  // Dumps header content
+  //
   printf(
 "\n=========== Header for run %d Event %d = beginning ======================================\n",
   fRun,fEvent);
@@ -60,4 +136,42 @@ void AliHeader::Dump()
   printf(
   "=========== Header for run %d Event %d = end ============================================\n\n",
   fRun,fEvent);
+
 }
+
+//_______________________________________________________________________
+AliStack* AliHeader::Stack() const
+{
+// Return pointer to stack
+    return fStack;
+}
+
+//_______________________________________________________________________
+void AliHeader::SetStack(AliStack* stack)
+{
+// Set pointer to stack
+    fStack = stack;
+}
+
+//_______________________________________________________________________
+void AliHeader::SetGenEventHeader(AliGenEventHeader* header)
+{
+// Set pointer to header for generated event
+    fGenHeader = header;
+}
+
+//_______________________________________________________________________
+AliGenEventHeader*  AliHeader::GenEventHeader() const
+{
+// Get pointer to header for generated event
+    return fGenHeader;
+}
+
+//_______________________________________________________________________
+void AliHeader::Copy(TObject&) const
+{
+  Fatal("Copy","Not implemented\n");
+}
+
+
+