DAS  3.0
Das Analysis System
Weight.cc File Reference
#include <Weight.h>
#include <boost/test/included/unit_test.hpp>
+ Include dependency graph for Weight.cc:

Macros

#define BOOST_TEST_MODULE   Weight
 

Functions

 BOOST_AUTO_TEST_CASE (weight)
 
 BOOST_AUTO_TEST_CASE (weights)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Weight

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( weight  )
13 {
14  Weight weight;
15  BOOST_TEST( weight == 1 );
16  BOOST_TEST( weight == weight.v );
17  BOOST_TEST( weight.i == 0 );
18 
19  weight *= 2;
20  BOOST_TEST( weight == 2 );
21  BOOST_TEST( weight.i == 0 );
22 
23  weight = 3;
24  BOOST_TEST( weight == 3 );
25  BOOST_TEST( weight.i == 0 );
26 
27  Weight another_weight = {2,0};
28  BOOST_TEST( weight * another_weight == 6 ); }

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( weights  )
31 {
32  Weights weights {{1.,0}, {2.,0}, {3.,0}};
33 
34  weights *= 2;
35  BOOST_TEST( weights[0] == 2 );
36  BOOST_TEST( weights[1] == 4 );
37  BOOST_TEST( weights[2] == 6 );
38 
39  Weights copy_weights = weights;
40  BOOST_TEST( weights == copy_weights );
41  copy_weights.back().i = 1;
42  BOOST_TEST( weights != copy_weights );
43 }
Darwin::Physics::Weight
Definition: Weight.h:17
BOOST_TEST
BOOST_TEST(gendijet.Rapidity()==1.3573785791881385)
Darwin::Physics::Weights
std::vector< Weight > Weights
Definition: Weight.h:42
DAS::Weight::v
double v
value
Definition: Weight.h:17
weight
DAS::Weight weight
Definition: classes.h:11
DAS::Weight::i
int i
correlation index
Definition: Weight.h:18
weights
DAS::Weights weights
Definition: classes.h:12