CMS 3D CMS Logo

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, std::shared_ptr< AbsOOTPileupCorrection > ptr)
 
void clear ()
 
bool empty () const
 
bool exists (const std::string &name, const std::string &category) const
 
std::shared_ptr< AbsOOTPileupCorrectionget (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, PtrMapDataMap
 
typedef std::map< std::string, std::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

◆ DataMap

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

Definition at line 31 of file OOTPileupCorrectionColl.h.

◆ PtrMap

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

Definition at line 30 of file OOTPileupCorrectionColl.h.

Member Function Documentation

◆ add()

void OOTPileupCorrectionColl::add ( const std::string &  name,
const std::string &  category,
std::shared_ptr< AbsOOTPileupCorrection ptr 
)
inline

◆ clear()

void OOTPileupCorrectionColl::clear ( void  )
inline

Definition at line 17 of file OOTPileupCorrectionColl.h.

17 { data_.clear(); }

References data_.

Referenced by BeautifulSoup.Tag::setString().

◆ empty()

bool OOTPileupCorrectionColl::empty ( ) const
inline

Definition at line 19 of file OOTPileupCorrectionColl.h.

19 { return data_.empty(); }

References data_.

◆ exists()

bool OOTPileupCorrectionColl::exists ( const std::string &  name,
const std::string &  category 
) const

Definition at line 5 of file OOTPileupCorrectionColl.cc.

5  {
6  DataMap::const_iterator dit = data_.find(category);
7  if (dit == data_.end())
8  return false;
9  else
10  return !(dit->second.find(name) == dit->second.end());
11 }

References taus_updatedMVAIds_cff::category, data_, and Skims_PA_cff::name.

◆ get()

std::shared_ptr< AbsOOTPileupCorrection > OOTPileupCorrectionColl::get ( const std::string &  name,
const std::string &  category 
) const

◆ operator!=()

bool OOTPileupCorrectionColl::operator!= ( const OOTPileupCorrectionColl r) const
inline

Definition at line 27 of file OOTPileupCorrectionColl.h.

27 { return !(*this == r); }

References alignCSCRings::r.

◆ operator==()

bool OOTPileupCorrectionColl::operator== ( const OOTPileupCorrectionColl r) const

Definition at line 24 of file OOTPileupCorrectionColl.cc.

24  {
25  if (data_.size() != r.data_.size())
26  return false;
27  DataMap::const_iterator dit = data_.begin();
28  const DataMap::const_iterator end = data_.end();
29  DataMap::const_iterator rit = r.data_.begin();
30  for (; dit != end; ++dit, ++rit) {
31  if (dit->first != rit->first)
32  return false;
33  if (dit->second.size() != rit->second.size())
34  return false;
35  PtrMap::const_iterator pit = dit->second.begin();
36  const PtrMap::const_iterator pend = dit->second.end();
37  PtrMap::const_iterator rpit = rit->second.begin();
38  for (; pit != pend; ++pit, ++rpit) {
39  if (pit->first != rpit->first)
40  return false;
41  if (*(pit->second) != *(rpit->second))
42  return false;
43  }
44  }
45  return true;
46 }

References data_, mps_fire::end, and alignCSCRings::r.

◆ serialize()

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

Definition at line 37 of file OOTPileupCorrectionColl.h.

37  {
38  ar& data_;
39  }

References data_.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 34 of file OOTPileupCorrectionColl.h.

Member Data Documentation

◆ data_

DataMap OOTPileupCorrectionColl::data_
private

Definition at line 32 of file OOTPileupCorrectionColl.h.

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

taus_updatedMVAIds_cff.category
category
Definition: taus_updatedMVAIds_cff.py:31
mps_fire.end
end
Definition: mps_fire.py:242
alignCSCRings.r
r
Definition: alignCSCRings.py:93
OOTPileupCorrectionColl::data_
DataMap data_
Definition: OOTPileupCorrectionColl.h:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cms::Exception
Definition: Exception.h:70