21 BranchChannel() =
default;
22 BranchChannel(ChannelPointer data_ptr,
const Branch* branch =
nullptr,
size_t i_channel = 0)
23 : data_ptr_(std::move(data_ptr)),
25 i_channel_(i_channel) {}
28 [[nodiscard]]
double Value(
const Field& v)
const;
29 [[nodiscard]]
double operator[](
const Field& v)
const;
30 [[nodiscard]]
inline std::size_t GetChannelNumber()
const {
return i_channel_; }
31 [[nodiscard]] std::size_t GetId()
const;
33 void SetValue(
const Field& v,
double value);
36 T*& Data() {
return ANALYSISTREE_UTILS_GET<T*>(data_ptr_); }
38 const T* Data()
const {
return ANALYSISTREE_UTILS_GET<T*>(data_ptr_); }
45 void CopyContent(
const BranchChannel& other, std::string branch_name_prefix =
"");
47 void MergeContentFromTwoChannels(
const BranchChannel& first,
const BranchChannel& second);
49 void CopyContentRaw(
const BranchChannel& other);
51 void Print(std::ostream& os = std::cout)
const;
53 [[nodiscard]]
bool IsNullChannel()
const {
return branch_ ==
nullptr; }
59 BranchChannel(
const Branch* branch, std::size_t i_channel);
61 void UpdateChannel(std::size_t new_channel);
63 ChannelPointer data_ptr_;
64 const Branch* branch_{
nullptr};
65 std::size_t i_channel_{0};
AnalysisEntry keeps list of Variables from one or more branches. Before each event AnalysisEntry eval...
Definition AnalysisEntry.hpp:20
void CopyContent(const BranchChannel &other, std::string branch_name_prefix="")
Copy contents of other branch channel.
Definition BranchChannel.cpp:27