KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVEventClassifier.cpp
Go to the documentation of this file.
1 #include "KVEventClassifier.h"
2 
3 #ifndef WITH_CPP11
4 
6 
7 struct test_var {
8  double VAR;
9  bool operator()(double x)
10  {
11  return x > VAR;
12  }
13  test_var(double v)
14  {
15  VAR = v;
16  }
17 };
18 
19 #endif
20 
21 
23 
25 {
26  std::vector<double>::const_iterator result = std::find_if(fCuts.begin(), fCuts.end(),
27 #ifndef WITH_CPP11
28  test_var(fVar->GetValue())
29 #else
30  [&](double x) {
31  return x > fVar->GetValue();
32  }
33 #endif
34  );
35  return std::distance(fCuts.begin(), result);
36 }
37 
38 
40 
41 
42 
ClassImp(KVPartitionList) void KVPartitionList
Initialisation.
TRObject operator()(const T1 &t1) const
Simple class for sorting events according to global variables.
std::vector< double > fCuts
cuts in variable to define event classes
KVVarGlob * fVar
variable used for event classification
Double_t GetValue(void) const
Definition: KVVarGlob.h:412
Double_t x[n]
v