CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edmNew::DetSet< T > Class Template Reference

#include <DetSetNew.h>

Public Types

typedef data_type const * const_iterator
 
typedef DetSetVector< TContainer
 
typedef T data_type
 
typedef std::vector< data_typeDataContainer
 
typedef unsigned int id_type
 
typedef data_typeiterator
 
typedef id_type key_type
 
typedef unsigned int size_type
 
typedef data_type value_type
 

Public Member Functions

iterator begin ()
 
const_iterator begin () const
 
id_type detId () const
 
 DetSet ()
 
 DetSet (id_type i, DataContainer const &idata, size_type ioffset, size_type isize)
 
 DetSet (Container const &icont, typename Container::Item const &item, bool update)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
id_type id () const
 
bool isValid () const
 
template<typename HandleT >
edm::Ref< typename
HandleT::element_type,
typename
HandleT::element_type::value_type::value_type > 
makeRefTo (HandleT const &handle, const_iterator ci) const
 
int offset () const
 
data_typeoperator[] (size_type i)
 
data_type operator[] (size_type i) const
 
void set (Container const &icont, typename Container::Item const &item, bool update=true)
 
size_type size () const
 

Private Member Functions

DataContainer const & container () const
 
data_type const * data () const
 
data_typedata ()
 

Private Attributes

DataContainer const * m_data
 
id_type m_id
 
int m_offset
 
size_type m_size
 

Detailed Description

template<typename T>
class edmNew::DetSet< T >

Definition at line 21 of file DetSetNew.h.

Member Typedef Documentation

template<typename T>
typedef data_type const* edmNew::DetSet< T >::const_iterator

Definition at line 30 of file DetSetNew.h.

template<typename T>
typedef DetSetVector<T> edmNew::DetSet< T >::Container

Definition at line 23 of file DetSetNew.h.

template<typename T>
typedef T edmNew::DetSet< T >::data_type

Definition at line 26 of file DetSetNew.h.

template<typename T>
typedef std::vector<data_type> edmNew::DetSet< T >::DataContainer

Definition at line 28 of file DetSetNew.h.

template<typename T>
typedef unsigned int edmNew::DetSet< T >::id_type

Definition at line 25 of file DetSetNew.h.

template<typename T>
typedef data_type* edmNew::DetSet< T >::iterator

Definition at line 29 of file DetSetNew.h.

template<typename T>
typedef id_type edmNew::DetSet< T >::key_type

Definition at line 33 of file DetSetNew.h.

template<typename T>
typedef unsigned int edmNew::DetSet< T >::size_type

Definition at line 24 of file DetSetNew.h.

template<typename T>
typedef data_type edmNew::DetSet< T >::value_type

Definition at line 32 of file DetSetNew.h.

Constructor & Destructor Documentation

template<typename T>
edmNew::DetSet< T >::DetSet ( )
inline

Definition at line 37 of file DetSetNew.h.

37 : m_id(0), m_data(0), m_offset(-1), m_size(0){}
size_type m_size
Definition: DetSetNew.h:117
DataContainer const * m_data
Definition: DetSetNew.h:115
id_type m_id
Definition: DetSetNew.h:114
template<typename T>
edmNew::DetSet< T >::DetSet ( id_type  i,
DataContainer const &  idata,
size_type  ioffset,
size_type  isize 
)
inline

Definition at line 39 of file DetSetNew.h.

39  :
40  m_id(i), m_data(&idata), m_offset(ioffset), m_size(isize) {}
int i
Definition: DBlmapReader.cc:9
size_type m_size
Definition: DetSetNew.h:117
DataContainer const * m_data
Definition: DetSetNew.h:115
id_type m_id
Definition: DetSetNew.h:114
template<typename T>
edmNew::DetSet< T >::DetSet ( Container const &  icont,
typename Container::Item const &  item,
bool  update 
)
inline

Definition at line 43 of file DetSetNew.h.

References edmNew::DetSet< T >::set().

44  :
45  m_id(0), m_data(0), m_offset(-1), m_size(0){
46  set(icont,item, update);
47  }
void set(Container const &icont, typename Container::Item const &item, bool update=true)
size_type m_size
Definition: DetSetNew.h:117
DataContainer const * m_data
Definition: DetSetNew.h:115
id_type m_id
Definition: DetSetNew.h:114
#define update(a, b)

Member Function Documentation

template<typename T>
iterator edmNew::DetSet< T >::begin ( void  )
inline
template<typename T>
const_iterator edmNew::DetSet< T >::begin ( void  ) const
inline

Definition at line 73 of file DetSetNew.h.

References edmNew::DetSet< T >::data().

73 { return data();}
data_type const * data() const
Definition: DetSetNew.h:104
template<typename T>
DataContainer const& edmNew::DetSet< T >::container ( ) const
inlineprivate

Definition at line 102 of file DetSetNew.h.

References edmNew::DetSet< T >::m_data.

Referenced by edmNew::DetSet< T >::makeRefTo().

102 { return *m_data; }
DataContainer const * m_data
Definition: DetSetNew.h:115
template<typename T>
data_type const* edmNew::DetSet< T >::data ( ) const
inlineprivate

Definition at line 104 of file DetSetNew.h.

References assert(), edmNew::DetSet< T >::m_data, edmNew::DetSet< T >::m_offset, and edmNew::DetSet< T >::m_size.

Referenced by cuy.FindIssue::__init__(), edmNew::DetSet< T >::begin(), edmNew::DetSet< T >::end(), and edmNew::DetSet< T >::operator[]().

104  {
106  return m_data ? (&((*m_data)[m_offset])) : 0;
107  }
assert(m_qm.get())
size_type m_size
Definition: DetSetNew.h:117
DataContainer const * m_data
Definition: DetSetNew.h:115
template<typename T>
data_type* edmNew::DetSet< T >::data ( )
inlineprivate

Definition at line 109 of file DetSetNew.h.

References assert(), edmNew::DetSet< T >::m_data, and edmNew::DetSet< T >::m_offset.

Referenced by cuy.FindIssue::__init__().

109  {
110  assert(m_data);
111  return const_cast<data_type *>(&((*m_data)[m_offset]));
112  }
assert(m_qm.get())
DataContainer const * m_data
Definition: DetSetNew.h:115
template<typename T>
id_type edmNew::DetSet< T >::detId ( ) const
inline
template<typename T>
bool edmNew::DetSet< T >::empty ( ) const
inline
template<typename T>
iterator edmNew::DetSet< T >::end ( void  )
inline
template<typename T>
const_iterator edmNew::DetSet< T >::end ( void  ) const
inline

Definition at line 76 of file DetSetNew.h.

References edmNew::DetSet< T >::data(), and edmNew::DetSet< T >::m_size.

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

76 { return data()+m_size;}
size_type m_size
Definition: DetSetNew.h:117
data_type const * data() const
Definition: DetSetNew.h:104
template<typename T>
id_type edmNew::DetSet< T >::id ( ) const
inline
template<typename T>
bool edmNew::DetSet< T >::isValid ( void  ) const
inline

Definition at line 54 of file DetSetNew.h.

References edmNew::DetSet< T >::m_offset.

Referenced by core.AutoHandle.AutoHandle::ReallyLoad().

54 { return m_offset>=0;}
template<typename T>
template<typename HandleT >
edm::Ref<typename HandleT::element_type, typename HandleT::element_type::value_type::value_type> edmNew::DetSet< T >::makeRefTo ( HandleT const &  handle,
const_iterator  ci 
) const
inline
template<typename T>
int edmNew::DetSet< T >::offset ( ) const
inline

Definition at line 78 of file DetSetNew.h.

References edmNew::DetSet< T >::m_offset.

78 {return m_offset;}
template<typename T>
data_type& edmNew::DetSet< T >::operator[] ( size_type  i)
inline

Definition at line 57 of file DetSetNew.h.

References edmNew::DetSet< T >::data(), and i.

57  {
58  return data()[i];
59  }
int i
Definition: DBlmapReader.cc:9
data_type const * data() const
Definition: DetSetNew.h:104
template<typename T>
data_type edmNew::DetSet< T >::operator[] ( size_type  i) const
inline

Definition at line 62 of file DetSetNew.h.

References edmNew::DetSet< T >::data(), and i.

62  {
63  return data()[i];
64  }
int i
Definition: DBlmapReader.cc:9
data_type const * data() const
Definition: DetSetNew.h:104
template<typename T>
void edmNew::DetSet< T >::set ( Container const &  icont,
typename Container::Item const &  item,
bool  update = true 
)
inline

Definition at line 648 of file DetSetVectorNew.h.

References edmNew::dstvdetails::DetSetVectorTrans::Item::id, edmNew::dstvdetails::DetSetVectorTrans::Item::initializing(), m_id(), edmNew::dstvdetails::DetSetVectorTrans::Item::offset, and edmNew::dstvdetails::DetSetVectorTrans::Item::size.

Referenced by edmNew::DetSet< T >::DetSet(), betterConfigParser.BetterConfigParser::getGeneral(), and edmNew::DetSetVector< T >::IterHelp::operator()().

649  {
650  // if an item is being updated we wait
651  if (update) icont.update(item);
652  while(item.initializing()) nanosleep(0,0);
653  m_data=&icont.data();
654  m_id=item.id;
655  m_offset = item.offset;
656  m_size=item.size;
657  }
size_type m_size
Definition: DetSetNew.h:117
DataContainer const * m_data
Definition: DetSetNew.h:115
id_type m_id
Definition: DetSetNew.h:114
#define update(a, b)
template<typename T>
size_type edmNew::DetSet< T >::size ( void  ) const
inline

Member Data Documentation

template<typename T>
DataContainer const* edmNew::DetSet< T >::m_data
private

Definition at line 115 of file DetSetNew.h.

Referenced by edmNew::DetSet< T >::container(), and edmNew::DetSet< T >::data().

template<typename T>
id_type edmNew::DetSet< T >::m_id
private

Definition at line 114 of file DetSetNew.h.

Referenced by edmNew::DetSet< T >::detId(), and edmNew::DetSet< T >::id().

template<typename T>
int edmNew::DetSet< T >::m_offset
private
template<typename T>
size_type edmNew::DetSet< T >::m_size
private