]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliHeader.cxx
Cleanup of STEER coding conventions
[u/mrichter/AliRoot.git] / STEER / AliHeader.cxx
index 0ed2b78ecc971c00dc71bd7eb3990aabd96a9062..b8e8e47ca418c2edc8a778fdf15bf2e252f061b7 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-Revision 1.5  2001/03/21 18:22:30  hristov
-fParticleFileMap fix (I.Hrivnacova)
+/* $Header$ */
 
-Revision 1.4  2000/10/02 21:28:14  fca
-Removal of useless dependecies via forward declarations
+//-----------------------------------------------------------------------
+//
+//     Simulation event header class
+//
+//-----------------------------------------------------------------------
 
-Revision 1.3  2000/07/12 08:56:25  fca
-Coding convention correction and warning removal
-
-Revision 1.2  1999/09/29 09:24:29  fca
-Introduction of the Copyright and cvs Log
-
-*/
+#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)
 {
   //
   // Default constructor
   //
-  fRun=0;      
-  fNvertex=0;
-  fNprimary=0;
-  fNtrack=0;
-  fEvent=0;
 }
 
-AliHeader::AliHeader(Int_t run, Int_t event)
+//_______________________________________________________________________
+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, 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;
@@ -58,7 +106,8 @@ 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
@@ -68,9 +117,11 @@ void AliHeader::Reset(Int_t run, Int_t event)
   fNprimary=0;
   fNtrack=0;
   fEvent=event;
+  fEventNrInRun=evNumber;
 }
 
-void AliHeader::Print(const char* option)
+//_______________________________________________________________________
+void AliHeader::Print(const char*) const
 {
   //
   // Dumps header content
@@ -84,12 +135,42 @@ void AliHeader::Print(const char* option)
   printf(
   "=========== Header for run %d Event %d = end ============================================\n\n",
   fRun,fEvent);
-  
-  // print  particle file map
-  const char* oMap = strstr(option,"Map");
-  if (oMap) {
-    printf("\nParticle file map: \n");
-    for (Int_t i=0; i<fNtrack; i++) 
-      printf("   %d th entry: %d \n",i,fParticleFileMap[i]);
-  }    
+
+}
+
+//_______________________________________________________________________
+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(AliHeader&) const
+{
+  Fatal("Copy","Not implemented\n");
+}
+
+
+