]>
Commit | Line | Data |
---|---|---|
05118fd5 | 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 | ||
acd84897 | 16 | /* $Id$ */ |
05118fd5 | 17 | |
18 | //////////////////////////////////////////////////////////////////////// | |
19 | // | |
20 | // AliMergeCombi.cxx | |
116cbefd | 21 | // class to |
22 | // return combinations of input event numbers | |
05118fd5 | 23 | // |
24 | //////////////////////////////////////////////////////////////////////// | |
25 | ||
26 | #include "AliMergeCombi.h" | |
27 | ||
28 | ClassImp(AliMergeCombi) | |
29 | ||
e2afb3b6 | 30 | //_______________________________________________________________________ |
31 | AliMergeCombi::AliMergeCombi(): | |
32 | fDim(1), | |
33 | fSperb(1), | |
34 | fCounter(0) | |
05118fd5 | 35 | { |
e2afb3b6 | 36 | // |
37 | // default ctor | |
38 | // | |
05118fd5 | 39 | } |
40 | ||
e2afb3b6 | 41 | //_______________________________________________________________________ |
42 | AliMergeCombi::AliMergeCombi(Int_t dim, Int_t sperb): | |
43 | fDim(dim), | |
44 | fSperb(sperb), | |
45 | fCounter(0) | |
05118fd5 | 46 | { |
e2afb3b6 | 47 | // |
48 | // Standard ctor | |
49 | // | |
05118fd5 | 50 | } |
51 | ||
e2afb3b6 | 52 | //_______________________________________________________________________ |
05118fd5 | 53 | AliMergeCombi::~AliMergeCombi() |
54 | { | |
e2afb3b6 | 55 | // default dtor |
05118fd5 | 56 | } |
57 | ||
e2afb3b6 | 58 | //_______________________________________________________________________ |
59 | Bool_t AliMergeCombi::Combination(Int_t /* evNumber */ [], Int_t delta[]) | |
05118fd5 | 60 | { |
116cbefd | 61 | // |
62 | // Combination method | |
63 | // | |
e49dbcf7 | 64 | delta[0] = 1; |
65 | for (Int_t i=1; i<fDim; i++) { | |
66 | if (fCounter%fSperb == 0) { | |
67 | delta[i] = 1; | |
68 | } else { | |
69 | delta[i] = 0; | |
70 | } | |
71 | fCounter++; | |
72 | } | |
73 | return kTRUE; | |
05118fd5 | 74 | } |