ATLAS Offline Software
Loading...
Searching...
No Matches
LArConditionsChannelSet< T > Class Template Reference

template class for use for I/O of conditions data correction sets More...

#include <LArConditionsChannelSet.h>

Collaboration diagram for LArConditionsChannelSet< T >:

Classes

class  PairSort

Public Types

typedef unsigned int ChannelId
 Public typedefs.
typedef std::pair< ChannelId, T > ChanIdTPair
typedef std::vector< ChanIdTPairChannelVector
typedef ChannelVector::const_iterator ConstChannelIt
typedef ChannelVector::iterator ChannelIt

Public Member Functions

 LArConditionsChannelSet ()
 Default constructor.
virtual ~LArConditionsChannelSet ()
 destructor
ConstChannelIt find (ChannelId id) const
 Access to a conditions object pair for a given channel id.
ConstChannelIt begin () const
 Iterators over channel set.
ConstChannelIt end () const
size_t size () const
 Size of channel set.
void insert (ChannelId id, const T &cond)
 Insert a new channel id / T pair.

Private Attributes

ChannelVector m_channelVec

Detailed Description

template<class T>
class LArConditionsChannelSet< T >

template class for use for I/O of conditions data correction sets

This class contains a vector of pairs of hardware channels ids and a conditions object T. This class allows to store the conditions for a subset of channels. It's original purpose is to allow correction sets to be saved with corrections on a channel by channel basis. The LArConditionsSubset is the corresponding primary conditions container which is more optimal on space.

Definition at line 36 of file LArConditionsChannelSet.h.

Member Typedef Documentation

◆ ChanIdTPair

template<class T>
typedef std::pair<ChannelId, T> LArConditionsChannelSet< T >::ChanIdTPair

Definition at line 42 of file LArConditionsChannelSet.h.

◆ ChannelId

template<class T>
typedef unsigned int LArConditionsChannelSet< T >::ChannelId

Public typedefs.

Definition at line 41 of file LArConditionsChannelSet.h.

◆ ChannelIt

template<class T>
typedef ChannelVector::iterator LArConditionsChannelSet< T >::ChannelIt

Definition at line 45 of file LArConditionsChannelSet.h.

◆ ChannelVector

template<class T>
typedef std::vector<ChanIdTPair> LArConditionsChannelSet< T >::ChannelVector

Definition at line 43 of file LArConditionsChannelSet.h.

◆ ConstChannelIt

template<class T>
typedef ChannelVector::const_iterator LArConditionsChannelSet< T >::ConstChannelIt

Definition at line 44 of file LArConditionsChannelSet.h.

Constructor & Destructor Documentation

◆ LArConditionsChannelSet()

template<class T>
LArConditionsChannelSet< T >::LArConditionsChannelSet ( )
inline

Default constructor.

Definition at line 92 of file LArConditionsChannelSet.h.

93{}

◆ ~LArConditionsChannelSet()

template<class T>
LArConditionsChannelSet< T >::~LArConditionsChannelSet ( )
inlinevirtual

destructor

Definition at line 98 of file LArConditionsChannelSet.h.

99{}

Member Function Documentation

◆ begin()

template<class T>
LArConditionsChannelSet< T >::ConstChannelIt LArConditionsChannelSet< T >::begin ( ) const
inline

Iterators over channel set.

Definition at line 125 of file LArConditionsChannelSet.h.

126{
127 return (m_channelVec.begin());
128}

◆ end()

template<class T>
LArConditionsChannelSet< T >::ConstChannelIt LArConditionsChannelSet< T >::end ( ) const
inline

Definition at line 133 of file LArConditionsChannelSet.h.

134{
135 return (m_channelVec.end());
136}

◆ find()

template<class T>
LArConditionsChannelSet< T >::ConstChannelIt LArConditionsChannelSet< T >::find ( ChannelId id) const
inline

Access to a conditions object pair for a given channel id.

Definition at line 105 of file LArConditionsChannelSet.h.

106{
108 m_channelVec.end(),
109 id,
110 PairSort());
111
112 if (result == m_channelVec.end()) return (result);
113 if ((*result).first == id) {
114 return (result);
115 } else {
116 return m_channelVec.end() ;
117 }
118}
template class for use for I/O of conditions data correction sets
ChannelVector::const_iterator ConstChannelIt

◆ insert()

template<class T>
void LArConditionsChannelSet< T >::insert ( ChannelId id,
const T & cond )
inline

Insert a new channel id / T pair.

If new channel id is the same as an existing one, the new T replaces the old T

Definition at line 151 of file LArConditionsChannelSet.h.

152{
153 m_channelVec.push_back(ChanIdTPair(id,cond));
154 std::sort(m_channelVec.begin(), m_channelVec.end(), PairSort());
155}
std::pair< ChannelId, T > ChanIdTPair
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.

◆ size()

template<class T>
size_t LArConditionsChannelSet< T >::size ( ) const
inline

Size of channel set.

Definition at line 143 of file LArConditionsChannelSet.h.

144{
145 return (m_channelVec.size());
146}

Member Data Documentation

◆ m_channelVec

template<class T>
ChannelVector LArConditionsChannelSet< T >::m_channelVec
private

Definition at line 83 of file LArConditionsChannelSet.h.


The documentation for this class was generated from the following file: