CMS 3D CMS Logo

CastorHardcodeCalibrations Class Reference

#include <CalibCalorimetry/CastorCalib/plugins/CastorHardcodeCalibrations.h>

Inheritance diagram for CastorHardcodeCalibrations:

edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 CastorHardcodeCalibrations (const edm::ParameterSet &)
void produce ()
 ~CastorHardcodeCalibrations ()

Protected Member Functions

std::auto_ptr
< CastorChannelQuality
produceChannelQuality (const CastorChannelQualityRcd &rcd)
std::auto_ptr
< CastorElectronicsMap
produceElectronicsMap (const CastorElectronicsMapRcd &rcd)
std::auto_ptr< CastorGainsproduceGains (const CastorGainsRcd &rcd)
std::auto_ptr< CastorGainWidthsproduceGainWidths (const CastorGainWidthsRcd &rcd)
std::auto_ptr< CastorPedestalsproducePedestals (const CastorPedestalsRcd &rcd)
std::auto_ptr
< CastorPedestalWidths
producePedestalWidths (const CastorPedestalWidthsRcd &rcd)
std::auto_ptr< CastorQIEDataproduceQIEData (const CastorQIEDataRcd &rcd)
virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Protected Attributes

bool h2mode_


Detailed Description

Definition at line 28 of file CastorHardcodeCalibrations.h.


Constructor & Destructor Documentation

CastorHardcodeCalibrations::CastorHardcodeCalibrations ( const edm::ParameterSet iConfig  ) 

Definition at line 70 of file CastorHardcodeCalibrations.cc.

References python::cmstools::all(), edm::ParameterSet::getUntrackedParameter(), h2mode_, produceChannelQuality(), produceElectronicsMap(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), produceQIEData(), edm::ESProducer::setWhatProduced(), and HLT_VtxMuL3::toGet.

00072 {
00073   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
00074   //parsing record parameters
00075   h2mode_=iConfig.getUntrackedParameter<bool>("H2Mode",false);
00076   std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
00077   for(std::vector <std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName ) {
00078     bool all = *objectName == "all";
00079     if ((*objectName == "Pedestals") || all) {
00080       setWhatProduced (this, &CastorHardcodeCalibrations::producePedestals);
00081       findingRecord <CastorPedestalsRcd> ();
00082     }
00083     if ((*objectName == "PedestalWidths") || all) {
00084       setWhatProduced (this, &CastorHardcodeCalibrations::producePedestalWidths);
00085       findingRecord <CastorPedestalWidthsRcd> ();
00086     }
00087     if ((*objectName == "Gains") || all) {
00088       setWhatProduced (this, &CastorHardcodeCalibrations::produceGains);
00089       findingRecord <CastorGainsRcd> ();
00090     }
00091     if ((*objectName == "GainWidths") || all) {
00092       setWhatProduced (this, &CastorHardcodeCalibrations::produceGainWidths);
00093       findingRecord <CastorGainWidthsRcd> ();
00094     }
00095     if ((*objectName == "QIEData") || all) {
00096       setWhatProduced (this, &CastorHardcodeCalibrations::produceQIEData);
00097       findingRecord <CastorQIEDataRcd> ();
00098     }
00099     if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
00100       setWhatProduced (this, &CastorHardcodeCalibrations::produceChannelQuality);
00101       findingRecord <CastorChannelQualityRcd> ();
00102     }
00103     if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
00104       setWhatProduced (this, &CastorHardcodeCalibrations::produceElectronicsMap);
00105       findingRecord <CastorElectronicsMapRcd> ();
00106     }
00107 
00108   }
00109 }

CastorHardcodeCalibrations::~CastorHardcodeCalibrations (  ) 

Definition at line 112 of file CastorHardcodeCalibrations.cc.

00113 {
00114 }


Member Function Documentation

void CastorHardcodeCalibrations::produce (  )  [inline]

Definition at line 35 of file CastorHardcodeCalibrations.h.

00035 {};

std::auto_ptr< CastorChannelQuality > CastorHardcodeCalibrations::produceChannelQuality ( const CastorChannelQualityRcd rcd  )  [protected]

Definition at line 187 of file CastorHardcodeCalibrations.cc.

References allCells(), CastorChannelQuality::GOOD, h2mode_, and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00187                                                                                                                        {
00188   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
00189   std::auto_ptr<CastorChannelQuality> result (new CastorChannelQuality ());
00190   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00191   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00192     result->setChannel (cell->rawId (), CastorChannelQuality::GOOD);
00193   }
00194   result->sort ();
00195   return result;
00196 }

std::auto_ptr< CastorElectronicsMap > CastorHardcodeCalibrations::produceElectronicsMap ( const CastorElectronicsMapRcd rcd  )  [protected]

Definition at line 198 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeHardcodeMap(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00198                                                                                                                        {
00199   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";
00200 
00201   std::auto_ptr<CastorElectronicsMap> result (new CastorElectronicsMap ());
00202   CastorDbHardcode::makeHardcodeMap(*result);
00203   return result;
00204 }

std::auto_ptr< CastorGains > CastorHardcodeCalibrations::produceGains ( const CastorGainsRcd rcd  )  [protected]

Definition at line 151 of file CastorHardcodeCalibrations.cc.

References allCells(), CastorGain::getValues(), h2mode_, CastorDbHardcode::makeGain(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00151                                                                                         {
00152   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGains-> ...";
00153   std::auto_ptr<CastorGains> result (new CastorGains ());
00154   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00155   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00156     CastorGain item = CastorDbHardcode::makeGain (*cell);
00157     result->addValue (*cell, item.getValues ());
00158   }
00159   result->sort ();
00160   return result;
00161 }

std::auto_ptr< CastorGainWidths > CastorHardcodeCalibrations::produceGainWidths ( const CastorGainWidthsRcd rcd  )  [protected]

Definition at line 163 of file CastorHardcodeCalibrations.cc.

References allCells(), CastorGainWidth::getValues(), h2mode_, CastorDbHardcode::makeGainWidth(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00163                                                                                                        {
00164   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
00165   std::auto_ptr<CastorGainWidths> result (new CastorGainWidths ());
00166   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00167   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00168     CastorGainWidth item = CastorDbHardcode::makeGainWidth (*cell);
00169     result->addValue (*cell, item.getValues ());
00170   }
00171   result->sort ();
00172   return result;
00173 }

std::auto_ptr< CastorPedestals > CastorHardcodeCalibrations::producePedestals ( const CastorPedestalsRcd rcd  )  [protected]

Definition at line 127 of file CastorHardcodeCalibrations.cc.

References allCells(), CastorPedestal::getValues(), h2mode_, CastorDbHardcode::makePedestal(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00127                                                                                                     {
00128   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestals-> ...";
00129   std::auto_ptr<CastorPedestals> result (new CastorPedestals ());
00130   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00131   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00132     CastorPedestal item = CastorDbHardcode::makePedestal (*cell);
00133     result->addValue (*cell, item.getValues ());
00134   }
00135   result->sort ();
00136   return result;
00137 }

std::auto_ptr< CastorPedestalWidths > CastorHardcodeCalibrations::producePedestalWidths ( const CastorPedestalWidthsRcd rcd  )  [protected]

Definition at line 139 of file CastorHardcodeCalibrations.cc.

References allCells(), h2mode_, CastorDbHardcode::makePedestalWidth(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00139                                                                                                                    {
00140   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
00141   std::auto_ptr<CastorPedestalWidths> result (new CastorPedestalWidths ());
00142   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00143   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00144     CastorPedestalWidth item = CastorDbHardcode::makePedestalWidth (*cell);
00145     result->setWidth (item);
00146   }
00147   result->sort ();
00148   return result;
00149 }

std::auto_ptr< CastorQIEData > CastorHardcodeCalibrations::produceQIEData ( const CastorQIEDataRcd rcd  )  [protected]

Definition at line 175 of file CastorHardcodeCalibrations.cc.

References allCells(), h2mode_, CastorDbHardcode::makeQIECoder(), and HLT_VtxMuL3::result.

Referenced by CastorHardcodeCalibrations().

00175                                                                                                   {
00176   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
00177   std::auto_ptr<CastorQIEData> result (new CastorQIEData ());
00178   std::vector <HcalGenericDetId> cells = allCells(h2mode_);
00179   for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
00180     CastorQIECoder coder = CastorDbHardcode::makeQIECoder (*cell);
00181     result->addCoder (*cell, coder);
00182   }
00183   result->sort ();
00184   return result;
00185 }

void CastorHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
) [protected, virtual]

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 121 of file CastorHardcodeCalibrations.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), edm::IOVSyncValue::eventID(), edm::eventsetup::EventSetupRecordKey::name(), ecalRecalibSequence_cff::record, and edm::IOVSyncValue::time().

00121                                                                                                                                                        {
00122   std::string record = iKey.name ();
00123   edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::setIntervalFor-> key: " << record << " time: " << iTime.eventID() << '/' << iTime.time ().value ();
00124   oInterval = edm::ValidityInterval (edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime()); //infinite
00125 }


Member Data Documentation

bool CastorHardcodeCalibrations::h2mode_ [protected]

Definition at line 49 of file CastorHardcodeCalibrations.h.

Referenced by CastorHardcodeCalibrations(), produceChannelQuality(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), and produceQIEData().


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