From e20ef457def2da971fb2cecc07518049cecde00e Mon Sep 17 00:00:00 2001 From: morsch Date: Fri, 9 Nov 2001 09:09:59 +0000 Subject: [PATCH] Base class with responsibility to read events and particles from a file. To be used with AliGenExtFile. --- EVGEN/AliGenReader.cxx | 34 ++++++++++++++++++++++++++++++++++ EVGEN/AliGenReader.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 EVGEN/AliGenReader.cxx create mode 100644 EVGEN/AliGenReader.h diff --git a/EVGEN/AliGenReader.cxx b/EVGEN/AliGenReader.cxx new file mode 100644 index 00000000000..dee0eb0b14b --- /dev/null +++ b/EVGEN/AliGenReader.cxx @@ -0,0 +1,34 @@ +/************************************************************************** + * Copyright(c) 1998-1999, 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. * + **************************************************************************/ + +/* +$Log$ +*/ +#include "AliGenReader.h" +ClassImp(AliGenReader) + + +AliGenReader& AliGenReader::operator=(const AliGenReader& rhs) +{ +// Assignment operator + return *this; +} + + + + + + + diff --git a/EVGEN/AliGenReader.h b/EVGEN/AliGenReader.h new file mode 100644 index 00000000000..dbfdbb372c7 --- /dev/null +++ b/EVGEN/AliGenReader.h @@ -0,0 +1,42 @@ +#ifndef ALIGENREADER_H +#define ALIGENREADER_H +/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * + * See cxx source for full Copyright notice */ + +/* $Id$ */ + +#include "TObject.h" + +class TParticle; + +class AliGenReader : public TObject +{ + public: + AliGenReader(){;} + AliGenReader(const AliGenReader &reader){;} + + virtual ~AliGenReader(){;} + // Initialise + virtual void Init() {} + // set file name of data file + virtual void SetFileName(const Text_t *filname) {fFileName=filname;} + // Read + virtual Int_t NextEvent(){return 0;} + enum Code_t {kPDG, kGEANT3}; + void SetParticleCode(Code_t code) {fCode = code;} + virtual TParticle* NextParticle(){return NULL;} + + AliGenReader & operator=(const AliGenReader & rhs); + protected: + const Text_t *fFileName; // Name of file to read from + Code_t fCode; // Particle code type + + ClassDef(AliGenReader,1) //Generate particles from external file +}; +#endif + + + + + + -- 2.31.1