CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
edm::roottree::BranchMap Class Reference

#include <RootTree.h>

Public Types

using Map = std::unordered_map< unsigned int, BranchInfo >
 

Public Member Functions

BranchInfo const * find (BranchID const &iKey) const
 
void insert (edm::BranchID const &iKey, BranchInfo const &iInfo)
 
void reserve (Map::size_type iSize)
 

Private Attributes

Map map_
 

Detailed Description

Definition at line 53 of file RootTree.h.

Member Typedef Documentation

◆ Map

using edm::roottree::BranchMap::Map = std::unordered_map<unsigned int, BranchInfo>

Definition at line 55 of file RootTree.h.

Member Function Documentation

◆ find()

BranchInfo const* edm::roottree::BranchMap::find ( BranchID const &  iKey) const
inline

Definition at line 59 of file RootTree.h.

References edm::BranchID::id(), and map_.

Referenced by edm::RootDelayedReader::getBranchInfo().

59  {
60  auto itFound = map_.find(iKey.id());
61  if (itFound == map_.end()) {
62  return nullptr;
63  }
64  return &itFound->second;
65  }

◆ insert()

void edm::roottree::BranchMap::insert ( edm::BranchID const &  iKey,
BranchInfo const &  iInfo 
)
inline

Definition at line 58 of file RootTree.h.

References edm::BranchID::id(), and map_.

Referenced by edm::RootTree::addBranch().

58 { map_.emplace(iKey.id(), iInfo); }

◆ reserve()

void edm::roottree::BranchMap::reserve ( Map::size_type  iSize)
inline

Definition at line 57 of file RootTree.h.

References map_.

Referenced by edm::RootTree::numberOfBranchesToAdd().

57 { map_.reserve(iSize); }

Member Data Documentation

◆ map_

Map edm::roottree::BranchMap::map_
private

Definition at line 68 of file RootTree.h.

Referenced by find(), insert(), and reserve().