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

Macros

#define DOXYGEN_SHOULD_SKIP_THIS
 
#define BOOST_TEST_MODULE   Looper
 

Functions

 BOOST_AUTO_TEST_CASE (shared)
 
 BOOST_AUTO_TEST_CASE (unique)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Looper

◆ DOXYGEN_SHOULD_SKIP_THIS

#define DOXYGEN_SHOULD_SKIP_THIS

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/2]

BOOST_AUTO_TEST_CASE ( shared  )
16  {
17  auto t = make_shared<TTree>("events", "events");
18 
19  // call empty tree
20  BOOST_REQUIRE_THROW( Looper looper(t), boost::wrapexcept<invalid_argument> );
21 
22  // normal call (filling 100 events in two steps)
23  for (Looper looper(100ll); looper(); ++looper) t->Fill();
24 
25  BOOST_REQUIRE( t->GetEntries() == 100 );
26  BOOST_REQUIRE_NO_THROW( Looper looper(t) );
27  }

◆ BOOST_AUTO_TEST_CASE() [2/2]

BOOST_AUTO_TEST_CASE ( unique  )
30  {
31  // Test constructor with a unique_ptr argument
32  auto t = make_unique<TTree>("events", "events");
33  BOOST_REQUIRE_THROW( Looper looper(t), boost::wrapexcept<invalid_argument> );
34  }
Darwin::Tools::Looper
Facility to loop over a n-tuple, including parallelisation and printing.
Definition: Looper.h:22