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

BranchInfo const * find (BranchID const &iKey) const
 
BranchInfofind (BranchID const &iKey)
 
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 65 of file RootTree.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
kKeys 
kInfos 

Definition at line 66 of file RootTree.h.

Member Function Documentation

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

Definition at line 74 of file RootTree.h.

References edm::BranchID::id().

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

74  {
75  auto itFound = map_.find(iKey.id());
76  if (itFound == map_.end()) {
77  return nullptr;
78  }
79  return &itFound->second;
80  }
std::unordered_map< unsigned int, BranchInfo > map_
Definition: RootTree.h:90
BranchInfo* edm::roottree::BranchMap::find ( BranchID const &  iKey)
inline

Definition at line 81 of file RootTree.h.

References edm::BranchID::id().

81  {
82  auto itFound = map_.find(iKey.id());
83  if (itFound == map_.end()) {
84  return nullptr;
85  }
86  return &itFound->second;
87  }
std::unordered_map< unsigned int, BranchInfo > map_
Definition: RootTree.h:90
void edm::roottree::BranchMap::insert ( edm::BranchID const &  iKey,
BranchInfo const &  iInfo 
)
inline

Definition at line 73 of file RootTree.h.

References edm::BranchID::id().

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

73 { map_.emplace(iKey.id(), iInfo); }
std::unordered_map< unsigned int, BranchInfo > map_
Definition: RootTree.h:90
void edm::roottree::BranchMap::reserve ( size_t  iSize)
inline

Definition at line 72 of file RootTree.h.

72 { map_.reserve(iSize); }
std::unordered_map< unsigned int, BranchInfo > map_
Definition: RootTree.h:90

Member Data Documentation

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

Definition at line 90 of file RootTree.h.