FEDRA emulsion software from the OPERA Collaboration
EdbCombGen.h
Go to the documentation of this file.
1 #ifndef ROOT_EdbCombGen
2 #define ROOT_EdbCombGen
3 
4 #include <vector>
5 #include <iostream>
6 #include <algorithm>
7 #include <bitset>
8 
9 using namespace std;
10 
11 #include "TObject.h"
12 #include "TObjArray.h"
13 
14 //______________________________________________________________________________
15 class EdbCombGen : public TObject {
16 
17  private:
18  TObjArray eElements; // objects to be combinated
19  vector<bool> eBits; // bits array
20  Int_t eSize; // total number of items
21  Int_t eItems; // number of items to be selected
22  Bool_t eNext;
23 
24  public:
26  EdbCombGen( TObjArray &elements, // Original items
27  int nitems=-1);// : // Number of items to choose
28  //eElements(elements), eNext(true);
30 
31  bool NextCombination(TObjArray &selected, TObjArray &regected);
32 
33  ClassDef(EdbCombGen,1) // objects combinations generator
34 };
35 
36 #endif /* ROOT_EdbCombGen */
Definition: EdbCombGen.h:15
Bool_t eNext
Definition: EdbCombGen.h:22
EdbCombGen()
Definition: EdbCombGen.h:25
Int_t eSize
Definition: EdbCombGen.h:20
EdbCombGen(TObjArray &elements, int nitems=-1)
vector< bool > eBits
Definition: EdbCombGen.h:19
TObjArray eElements
Definition: EdbCombGen.h:18
Int_t eItems
Definition: EdbCombGen.h:21
~EdbCombGen()
Definition: EdbCombGen.h:29