CMS 3D CMS Logo

CastorCalibrationQIEData Class Reference

Author:
Panos Katsas (UoA) POOL object to store calibration mode QIE parameters $Id
More...

#include <CondFormats/CastorObjects/interface/CastorCalibrationQIEData.h>

List of all members.

Public Types

typedef std::vector< ItemContainer
typedef CastorCalibrationQIECoder Item

Public Member Functions

bool addCoder (DetId fId, const CastorCalibrationQIECoder &fCoder)
 CastorCalibrationQIEData ()
std::vector< DetIdgetAllChannels () const
const CastorCalibrationQIECodergetCoder (DetId fId) const
 get QIE parameters
void sort ()
bool sorted () const
 ~CastorCalibrationQIEData ()

Private Attributes

Container mItems
bool mSorted


Detailed Description

Author:
Panos Katsas (UoA) POOL object to store calibration mode QIE parameters $Id

Author:
Panos Katsas (UoA) POOL object to store pedestal values 4xCapId

Definition at line 19 of file CastorCalibrationQIEData.h.


Member Typedef Documentation

typedef std::vector<Item> CastorCalibrationQIEData::Container

Definition at line 36 of file CastorCalibrationQIEData.h.

typedef CastorCalibrationQIECoder CastorCalibrationQIEData::Item

Definition at line 35 of file CastorCalibrationQIEData.h.


Constructor & Destructor Documentation

CastorCalibrationQIEData::CastorCalibrationQIEData (  ) 

Definition at line 31 of file CastorCalibrationQIEData.cc.

00032   : mSorted (true) {}

CastorCalibrationQIEData::~CastorCalibrationQIEData (  ) 

Definition at line 34 of file CastorCalibrationQIEData.cc.

00034 {}


Member Function Documentation

bool CastorCalibrationQIEData::addCoder ( DetId  fId,
const CastorCalibrationQIECoder fCoder 
)

Definition at line 59 of file CastorCalibrationQIEData.cc.

References CastorCalibrationQIECoder::minCharges(), mItems, mSorted, and DetId::rawId().

00059                                                                                            {
00060   CastorCalibrationQIECoder newCoder (fId.rawId ());
00061   newCoder.setMinCharges (fCoder.minCharges ());
00062   mItems.push_back (newCoder);
00063   mSorted = false;
00064   return true; 
00065 }

std::vector< DetId > CastorCalibrationQIEData::getAllChannels (  )  const

Definition at line 51 of file CastorCalibrationQIEData.cc.

References mItems, and HLT_VtxMuL3::result.

00051                                                                  {
00052   std::vector<DetId> result;
00053   for (std::vector<CastorCalibrationQIECoder>::const_iterator item = mItems.begin (); item != mItems.end (); item++) {
00054     result.push_back (DetId (item->rawId ()));
00055   }
00056   return result;
00057 }

const CastorCalibrationQIECoder * CastorCalibrationQIEData::getCoder ( DetId  fId  )  const

get QIE parameters

Definition at line 36 of file CastorCalibrationQIEData.cc.

References TestMuL1L2Filter_cff::cerr, lat::endl(), find(), mItems, DetId::rawId(), sorted(), and target.

00036                                                                                     {
00037   CastorCalibrationQIECoder target (fId.rawId ());
00038   std::vector<CastorCalibrationQIECoder>::const_iterator cell;
00039   if (sorted ()) {
00040     cell = std::lower_bound (mItems.begin(), mItems.end(), target, compareItems ());
00041   }
00042   else {
00043     std::cerr << "CastorCalibrationQIEData::getValues-> container is not sorted. Please sort it to search effectively" << std::endl;
00044     cell = find (mItems, target.rawId ());
00045   }
00046   if (cell == mItems.end() || cell->rawId () != fId.rawId ()) 
00047     throw cms::Exception ("Conditions not found") << "Unavailable Coder for cell " << HcalGenericDetId(fId);
00048   return &(*cell);
00049 }

void CastorCalibrationQIEData::sort (  ) 

Definition at line 67 of file CastorCalibrationQIEData.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), mItems, mSorted, and python::multivaluedict::sort().

00067                                      {
00068   if (!mSorted) {
00069     std::sort (mItems.begin(), mItems.end(), compareItems ());
00070     mSorted = true;
00071     std::cout << "CastorCalibrationQIEData::sort ()->" << mItems.size () << std::endl; 
00072   }
00073 }

bool CastorCalibrationQIEData::sorted (  )  const [inline]

Definition at line 30 of file CastorCalibrationQIEData.h.

References mSorted.

Referenced by getCoder().

00030 {return mSorted;}


Member Data Documentation

Container CastorCalibrationQIEData::mItems [private]

Definition at line 38 of file CastorCalibrationQIEData.h.

Referenced by addCoder(), getAllChannels(), getCoder(), and sort().

bool CastorCalibrationQIEData::mSorted [private]

Definition at line 39 of file CastorCalibrationQIEData.h.

Referenced by addCoder(), sort(), and sorted().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:08 2009 for CMSSW by  doxygen 1.5.4