--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// base class for ESD and AOD events
+// Author: Markus Oldenburg, CERN
+//-------------------------------------------------------------------------
+
+#include "AliVEvent.h"
+
+
+AliVEvent::AliVEvent(const AliVEvent& vEvnt) :
+ TObject(vEvnt) { } // Copy constructor
+
+AliVEvent& AliVEvent::operator=(const AliVEvent& vEvnt)
+{ if (this!=&vEvnt) {
+ TObject::operator=(vEvnt);
+ }
+
+ return *this;
+}
+
+
+ClassImp(AliVEvent)
--- /dev/null
+// -*- mode: C++ -*-
+#ifndef ALIVEVENT_H
+#define ALIVEVENT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Class AliVEvent
+//
+// Origin: Markus Oldenburg, CERN, Markus.Oldenburg@cern.ch
+//-------------------------------------------------------------------------
+
+#include <TObject.h>
+#include <TTree.h>
+#include "AliVHeader.h"
+#include "AliVParticle.h"
+
+class AliVEvent : public TObject {
+
+public:
+
+ AliVEvent() { }
+ virtual ~AliVEvent() { }
+ AliVEvent(const AliVEvent& vEvnt);
+ AliVEvent& operator=(const AliVEvent& vEvnt);
+
+ // Services
+ virtual void AddObject(TObject* obj) = 0;
+ virtual TObject* FindListObject(const char *name) = 0;
+ virtual TList* GetList() const = 0;
+
+ virtual void CreateStdContent() = 0;
+ virtual void GetStdContent() = 0;
+
+ virtual void ReadFromTree(TTree *tree) = 0;
+ virtual const void WriteToTree(TTree* tree) const = 0;
+
+ //virtual void Reset() = 0;
+ //virtual void ResetStdContent() = 0;
+ virtual void SetStdNames() = 0;
+
+ virtual void Print(Option_t *option="") const = 0;
+
+ // Header
+ virtual AliVHeader* GetHeader() const = 0;
+
+ // Delegated methods for fESDRun or AODHeader
+
+ virtual void SetRunNumber(Int_t n) = 0;
+ virtual void SetPeriodNumber(UInt_t n) = 0;
+ virtual void SetMagneticField(Double_t mf) = 0;
+
+ virtual Int_t GetRunNumber() const = 0;
+ virtual UInt_t GetPeriodNumber() const = 0;
+ virtual Double_t GetMagneticField() const = 0;
+
+ // Delegated methods for fHeader
+ virtual void SetOrbitNumber(UInt_t n) = 0;
+ virtual void SetBunchCrossNumber(UShort_t n) = 0;
+ virtual void SetEventType(UInt_t eventType)= 0;
+ virtual void SetTriggerMask(ULong64_t n) = 0;
+ virtual void SetTriggerCluster(UChar_t n) = 0;
+
+ virtual UInt_t GetOrbitNumber() const = 0;
+ virtual UShort_t GetBunchCrossNumber() const = 0;
+ virtual UInt_t GetEventType() const = 0;
+ virtual ULong64_t GetTriggerMask() const = 0;
+ virtual UChar_t GetTriggerCluster() const = 0;
+
+ virtual Double_t GetZDCN1Energy() const = 0;
+ virtual Double_t GetZDCP1Energy() const = 0;
+ virtual Double_t GetZDCN2Energy() const = 0;
+ virtual Double_t GetZDCP2Energy() const = 0;
+ virtual Double_t GetZDCEMEnergy() const = 0;
+
+ // Tracks
+ virtual AliVParticle *GetTrack(Int_t i) const = 0;
+ //virtual Int_t AddTrack(const AliVParticle *t) = 0;
+ virtual Int_t GetNumberOfTracks() const = 0;
+
+ //---------- end of new stuff
+
+
+ /* to be considered to go in here be implemented
+
+ void SetPrimaryVertex(const AliESDVertex *vertex) {
+ *fPrimaryVertex = *vertex;
+ fPrimaryVertex->SetName("PrimaryVertex");// error prone use class wide names?
+ }
+ const AliESDVertex *GetPrimaryVertex() const {return fPrimaryVertex;}
+
+ void SetMultiplicity(const AliMultiplicity *mul) {
+ *fSPDMult = *mul;
+ // CKB
+ // new (&fSPDMult) AliMultiplicity(*mul);
+ }
+ const AliMultiplicity *GetMultiplicity() const {return fSPDMult;}
+
+
+ AliESDMuonTrack *GetMuonTrack(Int_t i) const {
+ return (AliESDMuonTrack *)fMuonTracks->UncheckedAt(i);
+ }
+ void AddMuonTrack(const AliESDMuonTrack *t) {
+ TClonesArray &fmu = *fMuonTracks;
+ new(fmu[fMuonTracks->GetEntriesFast()]) AliESDMuonTrack(*t);
+ }
+
+ AliESDv0 *GetV0(Int_t i) const {
+ return (AliESDv0*)fV0s->UncheckedAt(i);
+ }
+ Int_t AddV0(const AliESDv0 *v);
+
+ AliESDcascade *GetCascade(Int_t i) const {
+ return (AliESDcascade *)fCascades->UncheckedAt(i);
+ }
+ void AddCascade(const AliESDcascade *c) {
+ TClonesArray &fc = *fCascades;
+ new(fc[fCascades->GetEntriesFast()]) AliESDcascade(*c);
+ }
+
+ AliESDkink *GetKink(Int_t i) const {
+ return (AliESDkink *)fKinks->UncheckedAt(i);
+ }
+ Int_t AddKink(const AliESDkink *c);
+
+ AliESDCaloCluster *GetCaloCluster(Int_t i) const {
+ return (AliESDCaloCluster *)fCaloClusters->UncheckedAt(i);
+ }
+ Int_t AddCaloCluster(const AliESDCaloCluster *c);
+
+ Int_t GetNumberOfMuonTracks() const {return fMuonTracks->GetEntriesFast();}
+ Int_t GetNumberOfV0s() const {return fV0s->GetEntriesFast();}
+ Int_t GetNumberOfCascades() const {return fCascades->GetEntriesFast();}
+ Int_t GetNumberOfKinks() const {return fKinks->GetEntriesFast();}
+ Int_t GetNumberOfCaloClusters() const {return fCaloClusters->GetEntriesFast();}
+
+ */
+
+ ClassDef(AliVEvent,0) // base class for AliEvent data
+};
+#endif
+
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Event IO handler base class
+// Author: Andreas Morsch, CERN
+//-------------------------------------------------------------------------
+
+#include "AliVEventHandler.h"
+
+ClassImp(AliVEventHandler)
+
+//______________________________________________________________________________
+AliVEventHandler::AliVEventHandler() :
+ TNamed()
+{
+ // default constructor
+}
+
+//______________________________________________________________________________
+AliVEventHandler::~AliVEventHandler()
+{
+// destructor
+}
+
+//______________________________________________________________________________
+AliVEventHandler::AliVEventHandler(const char* name, const char* title):
+ TNamed(name, title)
+{
+}
--- /dev/null
+#ifndef ALIVEVENTHANDLER_H
+#define ALIVEVENTHANDLER_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Event Handler base class
+// Author: Andreas Morsch, CERN
+//-------------------------------------------------------------------------
+
+#include <TNamed.h>
+
+
+class AliVEventHandler : public TNamed {
+
+ public:
+ AliVEventHandler();
+ AliVEventHandler(const char* name, const char* title);
+ virtual ~AliVEventHandler();
+ virtual void SetOutputFileName(char* fname) = 0;
+ virtual char* GetOutputFileName() = 0;
+ virtual Bool_t InitIO(Option_t* opt) = 0;
+ virtual Bool_t BeginEvent() = 0;
+ virtual Bool_t Notify(const char *path) = 0;
+ virtual Bool_t FinishEvent() = 0;
+ virtual Bool_t Terminate() = 0;
+ virtual Bool_t TerminateIO() = 0;
+ private :
+ ClassDef(AliVEventHandler, 0);
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Event header base class
+// Author: Markus Oldenburg, CERN
+//-------------------------------------------------------------------------
+
+#include "AliVHeader.h"
+
+ClassImp(AliVHeader)
+
+//______________________________________________________________________________
+AliVHeader::AliVHeader() :
+ TNamed("header","") { } // default constructor
+
+//______________________________________________________________________________
+AliVHeader::AliVHeader(const AliVHeader& hdr) :
+ TNamed(hdr) { } // Copy constructor
+
+//______________________________________________________________________________
+AliVHeader& AliVHeader::operator=(const AliVHeader& hdr)
+{
+ // Assignment operator
+ if(this!=&hdr) {
+ TNamed::operator=(hdr);
+ }
+ return *this;
+}
--- /dev/null
+#ifndef AliVHeader_H
+#define AliVHeader_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// Event header base class
+// Author: Markus Oldenburg, CERN
+//-------------------------------------------------------------------------
+
+#include <TNamed.h>
+
+class AliVHeader : public TNamed {
+
+ public :
+ AliVHeader();
+ virtual ~AliVHeader() { };
+ AliVHeader(const AliVHeader& evt);
+ AliVHeader& operator=(const AliVHeader& evt);
+
+ virtual UShort_t GetBunchCrossNumber() const = 0;
+ virtual UInt_t GetOrbitNumber() const = 0;
+ virtual UInt_t GetPeriodNumber() const = 0;
+ virtual ULong64_t GetTriggerMask() const = 0;
+ virtual UChar_t GetTriggerCluster() const = 0;
+ virtual UInt_t GetEventType() const = 0;
+
+ /*
+ virtual void SetBunchCrossNumber(UShort_t nBx) = 0;
+ virtual void SetOrbitNumber(UInt_t nOr) = 0;
+ virtual void SetPeriodNumber(UInt_t nPer) = 0;
+ virtual void SetTriggerMask(ULong64_t trigMsk) = 0;
+ virtual void SetTriggerCluster(UChar_t trigClus) = 0;
+ virtual void SetEventType(UInt_t evttype) = 0;
+ */
+
+ virtual void Print(Option_t* option = "") const = 0;
+
+ ClassDef(AliVHeader,0);
+};
+
+#endif
--- /dev/null
+/**************************************************************************
+ * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// base class for ESD and AOD particles
+// Author: Markus Oldenburg, CERN
+//-------------------------------------------------------------------------
+
+#include "AliVParticle.h"
+
+ClassImp(AliVParticle)
+
+AliVParticle::AliVParticle(const AliVParticle& vPart) :
+ TObject(vPart) { } // Copy constructor
+
+AliVParticle& AliVParticle::operator=(const AliVParticle& vPart)
+{ if (this!=&vPart) {
+ TObject::operator=(vPart);
+ }
+
+ return *this;
+}
--- /dev/null
+#ifndef AliVParticle_H
+#define AliVParticle_H
+/* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+//-------------------------------------------------------------------------
+// base class for ESD and AOD particles
+// Author: Markus Oldenburg, CERN
+//-------------------------------------------------------------------------
+
+#include <Rtypes.h>
+#include <TObject.h>
+
+class AliVParticle: public TObject {
+
+public:
+ AliVParticle() { }
+ virtual ~AliVParticle() { }
+ AliVParticle(const AliVParticle& vPart);
+ AliVParticle& operator=(const AliVParticle& vPart);
+
+ // kinematics
+ virtual Double_t Px() const = 0;
+ virtual Double_t Py() const = 0;
+ virtual Double_t Pz() const = 0;
+ virtual Double_t Pt() const = 0;
+ virtual Double_t P() const = 0;
+
+ virtual Double_t OneOverPt() const = 0;
+ virtual Double_t Phi() const = 0;
+ virtual Double_t Theta() const = 0;
+
+
+ virtual Double_t E() const = 0;
+ virtual Double_t M() const = 0;
+
+ virtual Double_t Eta() const = 0;
+ virtual Double_t Y() const = 0;
+
+ virtual Short_t Charge() const = 0;
+
+ // PID
+ virtual const Double_t *PID() const = 0; // return PID object (to be defined, still)
+
+
+ ClassDef(AliVParticle,0) // base class for particles
+};
+
+#endif
--- /dev/null
+#! /bin/sh
+
+make
--- /dev/null
+void SETUP()
+{
+ // Load the ESD library
+ gSystem->Load("libSTEERBase");
+
+ // Set the Inlucde paths
+ gSystem->SetIncludePath("-I$ROOTSYS/include -ISTEERBase");
+ gROOT->ProcessLine(".include STEERBase");
+
+ // Set our location, so that other packages can find us
+ gSystem->Setenv("STEERBase_INCLUDE", "STEERBase");
+}
--- /dev/null
+#ifdef __CINT__
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class AliVParticle+;
+#pragma link C++ class AliVEvent+;
+#pragma link C++ class AliVHeader+;
+#pragma link C++ class AliVEventHandler+;
+
+#endif
--- /dev/null
+SRCS = AliVParticle.cxx \
+ AliVEvent.cxx \
+ AliVHeader.cxx \
+ AliVEventHandler.cxx \
+
+HDRS:= $(SRCS:.cxx=.h)
+
+DHDR= STEERBaseLinkDef.h
+
+EXPORT:=$(SRCS:.cxx=.h)