CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
FakeCPE::Map Class Reference

#include <FakeCPE.h>

Public Types

using LocalValues = std::pair< LocalPoint, LocalError >
 

Public Member Functions

template<typename Cluster >
void add (const Cluster &cluster, const GeomDetUnit &gd, LocalValues const &lv)
 
void clear ()
 
void error (const GeomDetUnit &gd) const
 
template<typename Cluster >
LocalValues const & get (const Cluster &cluster, const GeomDetUnit &gd) const
 

Static Public Member Functions

static uint64_t encode (const SiPixelCluster &cluster, const GeomDetUnit &det)
 
static uint64_t encode (const SiStripCluster &cluster, const GeomDetUnit &det)
 

Private Attributes

LocalValues dummy
 
std::unordered_map< uint64_t, LocalValuesm_map
 

Detailed Description

Definition at line 22 of file FakeCPE.h.

Member Typedef Documentation

◆ LocalValues

Definition at line 24 of file FakeCPE.h.

Member Function Documentation

◆ add()

template<typename Cluster >
void FakeCPE::Map::add ( const Cluster &  cluster,
const GeomDetUnit gd,
LocalValues const &  lv 
)
inline

Definition at line 30 of file FakeCPE.h.

30  {
31  m_map[encode(cluster, gd)] = lv;
32  }

References encode(), and m_map.

Referenced by counter.Counter::register().

◆ clear()

void FakeCPE::Map::clear ( void  )
inline

Definition at line 25 of file FakeCPE.h.

25 { m_map.clear(); }

References m_map.

◆ encode() [1/2]

static uint64_t FakeCPE::Map::encode ( const SiPixelCluster cluster,
const GeomDetUnit det 
)
inlinestatic

Definition at line 44 of file FakeCPE.h.

44  {
45  uint64_t u1 = det.geographicalId().rawId();
46  uint64_t u2 = cluster.minPixelRow();
47  uint64_t u3 = cluster.minPixelCol();
48  return (u1 << 32) | (u2 << 16) | u3;
49  }

References GeomDet::geographicalId(), SiPixelCluster::minPixelCol(), SiPixelCluster::minPixelRow(), DetId::rawId(), testProducerWithPsetDescEmpty_cfi::u1, MetAnalyzer::u2, and testProducerWithPsetDescEmpty_cfi::u3.

Referenced by add(), and get().

◆ encode() [2/2]

static uint64_t FakeCPE::Map::encode ( const SiStripCluster cluster,
const GeomDetUnit det 
)
inlinestatic

Definition at line 50 of file FakeCPE.h.

50  {
51  uint64_t u1 = det.geographicalId().rawId();
52  uint64_t u2 = cluster.firstStrip();
53  return (u1 << 32) | u2;
54  }

References SiStripCluster::firstStrip(), GeomDet::geographicalId(), DetId::rawId(), testProducerWithPsetDescEmpty_cfi::u1, and MetAnalyzer::u2.

◆ error()

void FakeCPE::Map::error ( const GeomDetUnit gd) const
inline

Definition at line 26 of file FakeCPE.h.

26  {
27  edm::LogError("FakeCPE") << "hit not found in det " << gd.geographicalId().rawId();
28  }

References GeomDet::geographicalId(), and DetId::rawId().

Referenced by Page1Parser.Page1Parser::check_for_whole_start_tag(), and get().

◆ get()

template<typename Cluster >
LocalValues const& FakeCPE::Map::get ( const Cluster &  cluster,
const GeomDetUnit gd 
) const
inline

Member Data Documentation

◆ dummy

LocalValues FakeCPE::Map::dummy
private

Definition at line 58 of file FakeCPE.h.

Referenced by get().

◆ m_map

std::unordered_map<uint64_t, LocalValues> FakeCPE::Map::m_map
private

Definition at line 57 of file FakeCPE.h.

Referenced by add(), clear(), and get().

SiPixelCluster::minPixelCol
int minPixelCol() const
Definition: SiPixelCluster.h:144
FakeCPE::Map::dummy
LocalValues dummy
Definition: FakeCPE.h:58
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
SiStripCluster::firstStrip
uint16_t firstStrip() const
Definition: SiStripCluster.h:46
SiPixelCluster::minPixelRow
int minPixelRow() const
Definition: SiPixelCluster.h:142
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
FakeCPE::Map::m_map
std::unordered_map< uint64_t, LocalValues > m_map
Definition: FakeCPE.h:57
FakeCPE::Map::error
void error(const GeomDetUnit &gd) const
Definition: FakeCPE.h:26
testProducerWithPsetDescEmpty_cfi.u3
u3
Definition: testProducerWithPsetDescEmpty_cfi.py:50
testProducerWithPsetDescEmpty_cfi.u1
u1
Definition: testProducerWithPsetDescEmpty_cfi.py:49
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
FakeCPE::Map::encode
static uint64_t encode(const SiPixelCluster &cluster, const GeomDetUnit &det)
Definition: FakeCPE.h:44
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
MetAnalyzer.u2
u2
Definition: MetAnalyzer.py:61