BOSS 7.0.9
BESIII Offline Software System
Loading...
Searching...
No Matches
EvtAmpIndex Class Reference

#include <EvtAmpIndex.hh>

Public Member Functions

 EvtAmpIndex (std::vector< int > ind)
 
virtual ~EvtAmpIndex ()
 
void reset ()
 
bool next ()
 
int index ()
 
 EvtAmpIndex (std::vector< int > ind)
 
virtual ~EvtAmpIndex ()
 
void reset ()
 
bool next ()
 
int index ()
 

Friends

class EvtAmpSubIndex
 

Detailed Description

Constructor & Destructor Documentation

◆ EvtAmpIndex() [1/2]

EvtAmpIndex::EvtAmpIndex ( std::vector< int >  ind)

Definition at line 27 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAmpIndex.cc.

27 :
28 _ind(ind),
29 _size(ind.size()),
30 _state(ind.size()),
31 _nstate(ind.size())
32{
33 int i;
34
35 for(i=0;i<_size;i++) {
36 _state[i]=0;
37 if (i==0){
38 _nstate[i]=1;
39 }
40 else{
41 _nstate[i]=_nstate[i-1]*_ind[i];
42 }
43 }
44}

◆ ~EvtAmpIndex() [1/2]

virtual EvtAmpIndex::~EvtAmpIndex ( )
inlinevirtual

◆ EvtAmpIndex() [2/2]

EvtAmpIndex::EvtAmpIndex ( std::vector< int >  ind)

◆ ~EvtAmpIndex() [2/2]

virtual EvtAmpIndex::~EvtAmpIndex ( )
inlinevirtual

Member Function Documentation

◆ index() [1/2]

int EvtAmpIndex::index ( )

Definition at line 68 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAmpIndex.cc.

68 {
69
70 int i;
71 int ind=0;
72
73 for(i=0;i<_size;i++) {
74 ind+=_state[i]*_nstate[i];
75 }
76
77 return ind;
78
79}

◆ index() [2/2]

int EvtAmpIndex::index ( )

◆ next() [1/2]

bool EvtAmpIndex::next ( )

Definition at line 54 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAmpIndex.cc.

54 {
55 int i;
56 for(i=0;i<_size;i++) {
57 _state[i]++;
58 if (_state[i]<_ind[i]){
59 return true;
60 }
61 else{
62 _state[i]=0;
63 }
64 }
65 return false;
66}

◆ next() [2/2]

bool EvtAmpIndex::next ( )

◆ reset() [1/2]

void EvtAmpIndex::reset ( )

Definition at line 47 of file bak-BesEvtGen-00-04-08/src/EvtGen/EvtGenBase/EvtAmpIndex.cc.

47 {
48 int i;
49 for(i=0;i<_size;i++) {
50 _state[i]=0;
51 }
52}

◆ reset() [2/2]

void EvtAmpIndex::reset ( )

Friends And Related Function Documentation

◆ EvtAmpSubIndex


The documentation for this class was generated from the following files: