Belle II Software development
BranchInterface.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <string>
12#include <TBranch.h>
13
14
15namespace Belle2 {
22 template <class ValueType> struct BranchInterface {
23 std::string name;
24 TBranch* branch;
25 ValueType value;
28 BranchInterface() : name(""), branch(nullptr), value(ValueType(0)) {}
29
31 void update(Long64_t entry) { branch->GetEntry(entry); }
32 };
34}
35
Abstract base class for different kinds of events.
simple struct for interfacing the Branch.
void update(Long64_t entry)
update entry
BranchInterface()
constructor
std::string name
carries name of branch.
ValueType value
carries value of current branchEntry.
TBranch * branch
carries pointer to branch.