Belle II Software  release-05-02-19
BranchInterface.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Jakob Lettenbichler (jakob.lettenbichler@oeaw.ac.at) *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <string>
14 #include <TBranch.h>
15 
16 
17 namespace Belle2 {
24  template <class ValueType> struct BranchInterface {
25  std::string name;
26  TBranch* branch;
27  ValueType value;
30  BranchInterface() : name(""), branch(nullptr), value(ValueType(0)) {}
31 
33  void update(Long64_t entry) { branch->GetEntry(entry); }
34  };
36 }
37 
Belle2::BranchInterface::BranchInterface
BranchInterface()
constructor
Definition: BranchInterface.h:38
Belle2::BranchInterface::update
void update(Long64_t entry)
update entry
Definition: BranchInterface.h:41
Belle2::BranchInterface::name
std::string name
carries name of branch.
Definition: BranchInterface.h:33
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BranchInterface::branch
TBranch * branch
carries pointer to branch.
Definition: BranchInterface.h:34
Belle2::BranchInterface::value
ValueType value
carries value of current branchEntry.
Definition: BranchInterface.h:35