]>
Commit | Line | Data |
---|---|---|
8f59d7fe | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
803d1ab0 | 16 | /* $Id$ */ |
8f59d7fe | 17 | |
675e9664 | 18 | // Entry for AliGenCocktail container class. |
19 | // See also comments there. | |
20 | // In addition to the pointer to the generator the class provides some | |
21 | // bookkeeping functionality (weights, links to particle list, ...) | |
22 | // Author: andreas.morsch@cern.ch | |
23 | ||
24 | #include <TString.h> | |
8f59d7fe | 25 | #include "AliGenCocktailEntry.h" |
86d0a743 | 26 | #include "AliGenerator.h" |
27 | ||
8f59d7fe | 28 | |
29 | ClassImp(AliGenCocktailEntry) | |
30 | ||
31 | ||
198bb1c7 | 32 | |
33 | AliGenCocktailEntry::AliGenCocktailEntry() | |
8f59d7fe | 34 | { |
35 | // Default constructor | |
36 | fGenerator =0; | |
37 | fNGenerated=0; | |
38 | fFirst=-1; | |
39 | fLast=-1; | |
40 | fRate=0; | |
41 | fKineBias=1; | |
42 | fBias=1; | |
8f59d7fe | 43 | } |
44 | ||
45 | AliGenCocktailEntry:: AliGenCocktailEntry | |
a764b7de | 46 | (AliGenerator* Generator, const char * Name, Float_t RateExp):TNamed(Name, "Generator Cocktail Entry") |
8f59d7fe | 47 | { |
48 | // Constructor using generator type, name and rate per event | |
49 | fGenerator=Generator; | |
50 | fNGenerated=0; | |
51 | fFirst=-1; | |
52 | fLast=-1; | |
53 | fRate=RateExp; | |
8f59d7fe | 54 | // |
55 | fKineBias=1; | |
56 | fBias=1; | |
57 | } | |
58 | ||
198bb1c7 | 59 | AliGenCocktailEntry::AliGenCocktailEntry(const AliGenCocktailEntry &entry): |
60 | TNamed(entry) | |
c95d0eee | 61 | { |
62 | // Dummy copy constructor | |
198bb1c7 | 63 | entry.Copy(*this); |
c95d0eee | 64 | } |
65 | ||
66 | ||
8f59d7fe | 67 | void AliGenCocktailEntry::PrintInfo() |
68 | { | |
69 | // Print out information about generator entry | |
86d0a743 | 70 | printf("\n Generator: %s Generated Events: %d First: %d Last: %d", |
71 | (const char *) fName, fGenerator->NumberParticles(), fFirst, fLast); | |
8f59d7fe | 72 | } |
73 | ||
74 | AliGenCocktailEntry& AliGenCocktailEntry::operator | |
75 | =(const AliGenCocktailEntry& rhs) | |
76 | { | |
77 | // Assignment operator | |
198bb1c7 | 78 | rhs.Copy(*this); |
79 | return (*this); | |
80 | } | |
81 | ||
dc1d768c | 82 | void AliGenCocktailEntry::Copy(TObject&) const |
198bb1c7 | 83 | { |
84 | // | |
85 | // Copy | |
86 | // | |
87 | Fatal("Copy","Not implemented!\n"); | |
8f59d7fe | 88 | } |