CMS 3D CMS Logo

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

#include <RootTree.h>

Public Member Functions

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

Private Types

enum  { kKeys, kInfos }
 

Private Attributes

std::unordered_map< unsigned int, BranchInfomap_
 

Detailed Description

Definition at line 67 of file RootTree.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
kKeys 
kInfos 

Definition at line 68 of file RootTree.h.

68  {
69  kKeys,
70  kInfos,
71  };

Member Function Documentation

◆ find() [1/2]

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

Definition at line 83 of file RootTree.h.

83  {
84  auto itFound = map_.find(iKey.id());
85  if (itFound == map_.end()) {
86  return nullptr;
87  }
88  return &itFound->second;
89  }

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

◆ find() [2/2]

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

Definition at line 76 of file RootTree.h.

76  {
77  auto itFound = map_.find(iKey.id());
78  if (itFound == map_.end()) {
79  return nullptr;
80  }
81  return &itFound->second;
82  }

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

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

◆ insert()

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

Definition at line 75 of file RootTree.h.

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

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

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

◆ reserve()

void edm::roottree::BranchMap::reserve ( size_t  iSize)
inline

Definition at line 74 of file RootTree.h.

74 { map_.reserve(iSize); }

References map_.

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

Member Data Documentation

◆ map_

std::unordered_map<unsigned int, BranchInfo> edm::roottree::BranchMap::map_
private

Definition at line 92 of file RootTree.h.

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

edm::roottree::BranchMap::map_
std::unordered_map< unsigned int, BranchInfo > map_
Definition: RootTree.h:92
edm::roottree::BranchMap::kInfos
Definition: RootTree.h:70
edm::roottree::BranchMap::kKeys
Definition: RootTree.h:69