Class moved from AliGenCocktail.h
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Jun 2000 20:30:34 +0000 (20:30 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Jun 2000 20:30:34 +0000 (20:30 +0000)
EVGEN/AliGenCocktailEntry.cxx [new file with mode: 0644]
EVGEN/AliGenCocktailEntry.h [new file with mode: 0644]

diff --git a/EVGEN/AliGenCocktailEntry.cxx b/EVGEN/AliGenCocktailEntry.cxx
new file mode 100644 (file)
index 0000000..fde8910
--- /dev/null
@@ -0,0 +1,67 @@
+/**************************************************************************
+ * 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 "AliGenCocktailEntry.h"
+#include "AliRun.h"
+#include <stdlib.h>
+
+ClassImp(AliGenCocktailEntry)
+
+
+AliGenCocktailEntry::AliGenCocktailEntry()
+{
+// Default constructor
+    fGenerator =0;
+    fNGenerated=0;
+    fFirst=-1;
+    fLast=-1;
+    fRate=0;
+    fKineBias=1;
+    fBias=1;
+    fName="unknown";
+}
+
+AliGenCocktailEntry:: AliGenCocktailEntry
+(AliGenerator* Generator, TString Name, Float_t RateExp)
+{
+// Constructor using generator type, name and rate per event
+    fGenerator=Generator;
+    fNGenerated=0;
+    fFirst=-1;
+    fLast=-1;
+    fRate=RateExp;
+    fName=Name;
+//         
+    fKineBias=1;
+    fBias=1;
+}
+
+void AliGenCocktailEntry::PrintInfo()
+{
+// Print out information about generator entry
+printf("\n Generator: %s Generated Events: %d First: %d Last: %d",
+       (const char *) fName, fGenerator->NumberParticles(), fFirst, fLast);
+}
+AliGenCocktailEntry& AliGenCocktailEntry::operator
+=(const  AliGenCocktailEntry& rhs)
+{
+// Assignment operator
+    return *this;
+}
diff --git a/EVGEN/AliGenCocktailEntry.h b/EVGEN/AliGenCocktailEntry.h
new file mode 100644 (file)
index 0000000..daed7d6
--- /dev/null
@@ -0,0 +1,49 @@
+#ifndef ALIGENCOCKTAILENTRY_H
+#define ALIGENCOCKTAILENTRY_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+
+#include <TObject.h>
+#include <TString.h>
+
+class AliGenerator;
+
+
+class AliGenCocktailEntry : public TObject
+{
+ public:
+    AliGenCocktailEntry();
+    AliGenCocktailEntry(const AliGenCocktailEntry &entry);
+    AliGenCocktailEntry
+       (AliGenerator* Generator, TString Name, Float_t RateExp);
+    ~AliGenCocktailEntry(){;}
+    AliGenerator* Generator() {return fGenerator;}
+    void SetGenerator(AliGenerator* generator){fGenerator=generator;}
+    void SetFirst(Int_t first){fFirst=first;}
+    void SetLast (Int_t last ){fLast =last;}
+    Int_t GetFirst(){return fFirst;}
+    Int_t GetLast (){return fLast;}
+    Float_t Rate(){return fRate;}
+    void  PrintInfo();
+    AliGenCocktailEntry & operator =(const AliGenCocktailEntry & rhs);
+ protected:
+    AliGenerator *fGenerator;   // Pointer to generator
+    Int_t fNGenerated;          // Number of primaries generated
+    Int_t fFirst;               // First index in list of primaries
+    Int_t fLast;                // Last index in list of primaries
+    Float_t fRate;              // Rate per event
+    Float_t fKineBias;          // Bias due to kinematic selecion
+    Float_t fBias;              // Bias
+    TString fName;              // Name of generator
+ private:
+    ClassDef(AliGenCocktailEntry,1) // Generator entry of AliGenCocktail
+};
+#endif
+
+
+
+
+