test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
OOTPileupCorrectionColl Class Reference

#include <OOTPileupCorrectionColl.h>

Public Member Functions

void add (const std::string &name, const std::string &category, boost::shared_ptr< AbsOOTPileupCorrection > ptr)
 
void clear ()
 
bool empty () const
 
bool exists (const std::string &name, const std::string &category) const
 
boost::shared_ptr
< AbsOOTPileupCorrection
get (const std::string &name, const std::string &category) const
 
bool operator!= (const OOTPileupCorrectionColl &r) const
 
bool operator== (const OOTPileupCorrectionColl &r) const
 

Private Types

typedef std::map< std::string,
PtrMap
DataMap
 
typedef std::map< std::string,
boost::shared_ptr
< AbsOOTPileupCorrection > > 
PtrMap
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, unsigned)
 

Private Attributes

DataMap data_
 

Friends

class boost::serialization::access
 

Detailed Description

Definition at line 11 of file OOTPileupCorrectionColl.h.

Member Typedef Documentation

typedef std::map<std::string, PtrMap> OOTPileupCorrectionColl::DataMap
private

Definition at line 36 of file OOTPileupCorrectionColl.h.

typedef std::map<std::string, boost::shared_ptr<AbsOOTPileupCorrection> > OOTPileupCorrectionColl::PtrMap
private

Definition at line 35 of file OOTPileupCorrectionColl.h.

Member Function Documentation

void OOTPileupCorrectionColl::add ( const std::string &  name,
const std::string &  category,
boost::shared_ptr< AbsOOTPileupCorrection ptr 
)
inline
void OOTPileupCorrectionColl::clear ( void  )
inline
bool OOTPileupCorrectionColl::empty ( ) const
inline
bool OOTPileupCorrectionColl::exists ( const std::string &  name,
const std::string &  category 
) const

Definition at line 5 of file OOTPileupCorrectionColl.cc.

References data_.

7 {
8  DataMap::const_iterator dit = data_.find(category);
9  if (dit == data_.end())
10  return false;
11  else
12  return !(dit->second.find(name) == dit->second.end());
13 }
boost::shared_ptr< AbsOOTPileupCorrection > OOTPileupCorrectionColl::get ( const std::string &  name,
const std::string &  category 
) const
bool OOTPileupCorrectionColl::operator!= ( const OOTPileupCorrectionColl r) const
inline

Definition at line 31 of file OOTPileupCorrectionColl.h.

References alignCSCRings::r.

32  {return !(*this == r);}
bool OOTPileupCorrectionColl::operator== ( const OOTPileupCorrectionColl r) const

Definition at line 27 of file OOTPileupCorrectionColl.cc.

References data_, and end.

28 {
29  if (data_.size() != r.data_.size())
30  return false;
31  DataMap::const_iterator dit = data_.begin();
32  const DataMap::const_iterator end = data_.end();
33  DataMap::const_iterator rit = r.data_.begin();
34  for (; dit != end; ++dit, ++rit)
35  {
36  if (dit->first != rit->first)
37  return false;
38  if (dit->second.size() != rit->second.size())
39  return false;
40  PtrMap::const_iterator pit = dit->second.begin();
41  const PtrMap::const_iterator pend = dit->second.end();
42  PtrMap::const_iterator rpit = rit->second.begin();
43  for (; pit != pend; ++pit, ++rpit)
44  {
45  if (pit->first != rpit->first)
46  return false;
47  if (*(pit->second) != *(rpit->second))
48  return false;
49  }
50  }
51  return true;
52 }
#define end
Definition: vmac.h:37
template<class Archive >
void OOTPileupCorrectionColl::serialize ( Archive &  ar,
unsigned   
)
inlineprivate

Definition at line 42 of file OOTPileupCorrectionColl.h.

References data_.

43  {
44  ar & data_;
45  }

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 39 of file OOTPileupCorrectionColl.h.

Member Data Documentation

DataMap OOTPileupCorrectionColl::data_
private

Definition at line 37 of file OOTPileupCorrectionColl.h.

Referenced by add(), clear(), empty(), exists(), get(), operator==(), and serialize().