The Gaudi Framework  master (82fdf313)
Loading...
Searching...
No Matches
BranchWrapper.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12
13#include <Gaudi/Algorithm.h>
15#include <TTree.h>
16#include <gsl/pointers>
17#include <string>
18
19namespace Gaudi {
20 namespace details {
26
27 private:
28 void const* m_dataBuffer = nullptr; // Data buffer for branch creation
29 TBranch* m_branch = nullptr; // TBranch object
30 std::string m_className; // Class name of the data
31 std::string m_branchName; // Branch name in the TTree
32 std::string m_location; // Location of the data in the data store
33 std::string m_algName; // Reference to the Gaudi algorithm using this wrapper
34 void ( *setBranchAddress )( gsl::not_null<TBranch*>,
35 const void** ); // Function pointer for the method used to set the address of the data
36 // buffer
37
38 public:
39 BranchWrapper( const gsl::not_null<TTree*> tree, const std::string& className, const std::string& branchName,
40 const std::string& location, const std::string& algName );
41
42 void setDataPtr( void const* dataPtr );
43
44 void setBranchData( const gsl::not_null<DataObject*> pObj );
45
46 const std::string& getLocation() const;
47
48 const std::string& getClassName() const;
49 };
50
51 } // namespace details
52} // namespace Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
BranchWrapper(const gsl::not_null< TTree * > tree, const std::string &className, const std::string &branchName, const std::string &location, const std::string &algName)
void(* setBranchAddress)(gsl::not_null< TBranch * >, const void **)
const std::string & getClassName() const
void setDataPtr(void const *dataPtr)
const std::string & getLocation() const
void setBranchData(const gsl::not_null< DataObject * > pObj)