CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
l1t::RegionalOutput< T > Class Template Reference

#include <RegionalOutput.h>

Classes

class  iterator
 
class  Region
 

Public Types

typedef iterator const_iterator
 
typedef edm::Ref< Tref
 
typedef edm::RefProd< Trefprod
 
typedef T::value_type value_type
 

Public Member Functions

void addRegion (const std::vector< int > &indices, const float eta, const float phi)
 
const_iterator begin () const
 
void clear ()
 
bool empty () const
 
const_iterator end () const
 
const float eta (unsigned int ireg) const
 
edm::ProductID id () const
 
unsigned int nRegions () const
 
const value_typeobjAt (unsigned int idx) const
 
const float phi (unsigned int ireg) const
 
ref refAt (unsigned int idx) const
 
Region region (unsigned int ireg) const
 
 RegionalOutput ()
 
 RegionalOutput (const edm::RefProd< T > &prod)
 
void shrink_to_fit ()
 
unsigned int size () const
 

Static Public Member Functions

static short Class_Version ()
 

Protected Attributes

std::vector< float > etas_
 
std::vector< float > phis_
 
refprod refprod_
 
std::vector< unsigned int > regions_
 
std::vector< unsigned int > values_
 

Detailed Description

template<typename T>
class l1t::RegionalOutput< T >

Definition at line 11 of file RegionalOutput.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef iterator l1t::RegionalOutput< T >::const_iterator

Definition at line 69 of file RegionalOutput.h.

◆ ref

template<typename T>
typedef edm::Ref<T> l1t::RegionalOutput< T >::ref

Definition at line 14 of file RegionalOutput.h.

◆ refprod

template<typename T>
typedef edm::RefProd<T> l1t::RegionalOutput< T >::refprod

Definition at line 15 of file RegionalOutput.h.

◆ value_type

template<typename T>
typedef T::value_type l1t::RegionalOutput< T >::value_type

Definition at line 13 of file RegionalOutput.h.

Constructor & Destructor Documentation

◆ RegionalOutput() [1/2]

template<typename T>
l1t::RegionalOutput< T >::RegionalOutput ( )
inline

Definition at line 96 of file RegionalOutput.h.

96 : refprod_(), values_(), regions_(), etas_(), phis_() {}
std::vector< float > etas_
std::vector< unsigned int > regions_
std::vector< float > phis_
std::vector< unsigned int > values_

◆ RegionalOutput() [2/2]

template<typename T>
l1t::RegionalOutput< T >::RegionalOutput ( const edm::RefProd< T > &  prod)
inline

Definition at line 97 of file RegionalOutput.h.

97 : refprod_(prod), values_(), regions_(), etas_(), phis_() {}
std::vector< float > etas_
std::vector< unsigned int > regions_
std::vector< float > phis_
std::vector< unsigned int > values_

Member Function Documentation

◆ addRegion()

template<typename T>
void l1t::RegionalOutput< T >::addRegion ( const std::vector< int > &  indices,
const float  eta,
const float  phi 
)
inline

Definition at line 99 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::eta(), l1t::RegionalOutput< T >::etas_, dqmdumpme::indices, l1t::RegionalOutput< T >::phi(), l1t::RegionalOutput< T >::phis_, l1t::RegionalOutput< T >::regions_, and l1t::RegionalOutput< T >::values_.

99  {
100  regions_.emplace_back((regions_.empty() ? 0 : regions_.back()) + indices.size());
101  values_.insert(values_.end(), indices.begin(), indices.end());
102  etas_.push_back(eta);
103  phis_.push_back(phi);
104  }
const float eta(unsigned int ireg) const
std::vector< float > etas_
std::vector< unsigned int > regions_
std::vector< float > phis_
std::vector< unsigned int > values_
const float phi(unsigned int ireg) const

◆ begin()

template<typename T>
const_iterator l1t::RegionalOutput< T >::begin ( void  ) const
inline

Definition at line 123 of file RegionalOutput.h.

123 { return const_iterator(this, 0); }

◆ Class_Version()

template<typename T>
static short l1t::RegionalOutput< T >::Class_Version ( )
inlinestatic

Definition at line 139 of file RegionalOutput.h.

141 :
edm::RefProd< T > refprod

◆ clear()

template<typename T>
void l1t::RegionalOutput< T >::clear ( void  )
inline

Definition at line 110 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::etas_, l1t::RegionalOutput< T >::phis_, l1t::RegionalOutput< T >::regions_, and l1t::RegionalOutput< T >::values_.

Referenced by BeautifulSoup.Tag::setString().

110  {
111  values_.clear();
112  regions_.clear();
113  etas_.clear();
114  phis_.clear();
115  }
std::vector< float > etas_
std::vector< unsigned int > regions_
std::vector< float > phis_
std::vector< unsigned int > values_

◆ empty()

template<typename T>
bool l1t::RegionalOutput< T >::empty ( ) const
inline

Definition at line 109 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::values_.

109 { return values_.empty(); }
std::vector< unsigned int > values_

◆ end()

template<typename T>
const_iterator l1t::RegionalOutput< T >::end ( void  ) const
inline

Definition at line 124 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::values_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

124 { return const_iterator(this, values_.size()); }
std::vector< unsigned int > values_

◆ eta()

template<typename T>
const float l1t::RegionalOutput< T >::eta ( unsigned int  ireg) const
inline

◆ id()

template<typename T>
edm::ProductID l1t::RegionalOutput< T >::id ( ) const
inline

Definition at line 106 of file RegionalOutput.h.

References edm::RefProd< C >::id(), and l1t::RegionalOutput< T >::refprod_.

106 { return refprod_.id(); }
ProductID id() const
Accessor for product ID.
Definition: RefProd.h:124

◆ nRegions()

template<typename T>
unsigned int l1t::RegionalOutput< T >::nRegions ( ) const
inline

Definition at line 108 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::regions_.

108 { return regions_.size(); }
std::vector< unsigned int > regions_

◆ objAt()

template<typename T>
const value_type& l1t::RegionalOutput< T >::objAt ( unsigned int  idx) const
inline

◆ phi()

template<typename T>
const float l1t::RegionalOutput< T >::phi ( unsigned int  ireg) const
inline

◆ refAt()

template<typename T>
ref l1t::RegionalOutput< T >::refAt ( unsigned int  idx) const
inline

◆ region()

template<typename T>
Region l1t::RegionalOutput< T >::region ( unsigned int  ireg) const
inline

Definition at line 126 of file RegionalOutput.h.

References g4SimHits_cfi::Region, and l1t::RegionalOutput< T >::regions_.

126  {
127  if (ireg >= regions_.size())
128  throw cms::Exception("Region index out of bounds");
129  return Region(this, ireg == 0 ? 0 : regions_[ireg - 1], regions_[ireg]);
130  }
std::vector< unsigned int > regions_

◆ shrink_to_fit()

template<typename T>
void l1t::RegionalOutput< T >::shrink_to_fit ( )
inline

Definition at line 116 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::etas_, l1t::RegionalOutput< T >::phis_, l1t::RegionalOutput< T >::regions_, and l1t::RegionalOutput< T >::values_.

116  {
117  values_.shrink_to_fit();
118  regions_.shrink_to_fit();
119  etas_.shrink_to_fit();
120  phis_.shrink_to_fit();
121  }
std::vector< float > etas_
std::vector< unsigned int > regions_
std::vector< float > phis_
std::vector< unsigned int > values_

◆ size()

template<typename T>
unsigned int l1t::RegionalOutput< T >::size ( void  ) const
inline

Definition at line 107 of file RegionalOutput.h.

References l1t::RegionalOutput< T >::values_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

107 { return values_.size(); }
std::vector< unsigned int > values_

Member Data Documentation

◆ etas_

template<typename T>
std::vector<float> l1t::RegionalOutput< T >::etas_
protected

◆ phis_

template<typename T>
std::vector<float> l1t::RegionalOutput< T >::phis_
protected

◆ refprod_

template<typename T>
refprod l1t::RegionalOutput< T >::refprod_
protected

◆ regions_

template<typename T>
std::vector<unsigned int> l1t::RegionalOutput< T >::regions_
protected

◆ values_

template<typename T>
std::vector<unsigned int> l1t::RegionalOutput< T >::values_
protected