4#ifndef ANALYSISTREE_INFRA_CHAIN_TEST_HPP_
5#define ANALYSISTREE_INFRA_CHAIN_TEST_HPP_
7#include <gtest/gtest.h>
9#include <infra/Chain.hpp>
15TEST(Test_AnalysisTreeInfra, Test_Chain) {
17 auto* chain =
new Chain({
"fl_toy_mc.txt"}, {
"tTree"});
19 EXPECT_EQ(chain->GetNtrees(), 1);
20 EXPECT_EQ(chain->GetEntries(), 1000);
22 chain->InitPointersToBranches({});
23 auto branches_map = chain->GetBranchPointers();
25 auto n_px = chain->Draw(
"SimParticles.px",
"");
28 auto* particles = std::get<Particles*>(chain->GetPointerToBranch(
"SimParticles"));
29 auto* tracks = std::get<TrackDetector*>(chain->GetPointerToBranch(
"RecTracks"));
31 for (ULong64_t i = 0; i < 10; ++i) {
34 const auto Ms = particles->GetNumberOfChannels();
35 const auto Mr = tracks->GetNumberOfChannels();
Cuts keep list of SimpleCuts. Logical AND is applied for all SimpleCut in the Cuts object.
Definition BranchConfig.cpp:10