CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

CastorHardcodeCalibrations Class Reference

#include <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)
std::auto_ptr< CastorRecoParamsproduceRecoParams (const CastorRecoParamsRcd &rcd)
std::auto_ptr
< CastorSaturationCorrs
produceSaturationCorrs (const CastorSaturationCorrsRcd &rcd)
virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Protected Attributes

bool h2mode_

Detailed Description

Definition at line 23 of file CastorHardcodeCalibrations.h.


Constructor & Destructor Documentation

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

Definition at line 72 of file CastorHardcodeCalibrations.cc.

References cond::ecalcond::all, edm::ParameterSet::getUntrackedParameter(), summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceElectronicsMap(), produceGains(), produceGainWidths(), producePedestals(), producePedestalWidths(), produceQIEData(), produceRecoParams(), produceSaturationCorrs(), and convertSQLitetoXML_cfg::toGet.

{
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::CastorHardcodeCalibrations->...";
  //parsing record parameters
  h2mode_=iConfig.getUntrackedParameter<bool>("H2Mode",false);
  std::vector <std::string> toGet = iConfig.getUntrackedParameter <std::vector <std::string> > ("toGet");
  for(std::vector <std::string>::iterator objectName = toGet.begin(); objectName != toGet.end(); ++objectName ) {
    bool all = *objectName == "all";
    if ((*objectName == "Pedestals") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::producePedestals);
      findingRecord <CastorPedestalsRcd> ();
    }
    if ((*objectName == "PedestalWidths") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::producePedestalWidths);
      findingRecord <CastorPedestalWidthsRcd> ();
    }
    if ((*objectName == "Gains") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceGains);
      findingRecord <CastorGainsRcd> ();
    }
    if ((*objectName == "GainWidths") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceGainWidths);
      findingRecord <CastorGainWidthsRcd> ();
    }
    if ((*objectName == "QIEData") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceQIEData);
      findingRecord <CastorQIEDataRcd> ();
    }
    if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceChannelQuality);
      findingRecord <CastorChannelQualityRcd> ();
    }
    if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceElectronicsMap);
      findingRecord <CastorElectronicsMapRcd> ();
    }
    if ((*objectName == "RecoParams") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceRecoParams);
      findingRecord <CastorRecoParamsRcd> ();
    }
    if ((*objectName == "SaturationCorrs") || all) {
      setWhatProduced (this, &CastorHardcodeCalibrations::produceSaturationCorrs);
      findingRecord <CastorSaturationCorrsRcd> ();
    }
  }
}
CastorHardcodeCalibrations::~CastorHardcodeCalibrations ( )

Definition at line 121 of file CastorHardcodeCalibrations.cc.

{
}

Member Function Documentation

void CastorHardcodeCalibrations::produce ( ) [inline]

Definition at line 30 of file CastorHardcodeCalibrations.h.

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

Definition at line 191 of file CastorHardcodeCalibrations.cc.

References pat::GOOD, DetId::rawId(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                                       {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceChannelQuality-> ...";
  std::auto_ptr<CastorChannelQuality> result (new CastorChannelQuality ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorChannelStatus item(cell->rawId(),CastorChannelStatus::GOOD);
    result->addValues(item);
  }
  return result;
}
std::auto_ptr< CastorElectronicsMap > CastorHardcodeCalibrations::produceElectronicsMap ( const CastorElectronicsMapRcd rcd) [protected]

Definition at line 202 of file CastorHardcodeCalibrations.cc.

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

Referenced by CastorHardcodeCalibrations().

                                                                                                                       {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceElectronicsMap-> ...";

  std::auto_ptr<CastorElectronicsMap> result (new CastorElectronicsMap ());
  CastorDbHardcode::makeHardcodeMap(*result);
  return result;
}
std::auto_ptr< CastorGains > CastorHardcodeCalibrations::produceGains ( const CastorGainsRcd rcd) [protected]

Definition at line 158 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeGain(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                        {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGains-> ...";
  std::auto_ptr<CastorGains> result (new CastorGains ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorGain item = CastorDbHardcode::makeGain (*cell);
    result->addValues(item);
  }
  return result;
}
std::auto_ptr< CastorGainWidths > CastorHardcodeCalibrations::produceGainWidths ( const CastorGainWidthsRcd rcd) [protected]

Definition at line 169 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeGainWidth(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                       {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceGainWidths-> ...";
  std::auto_ptr<CastorGainWidths> result (new CastorGainWidths ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorGainWidth item = CastorDbHardcode::makeGainWidth (*cell);
    result->addValues(item);
  }
  return result;
}
std::auto_ptr< CastorPedestals > CastorHardcodeCalibrations::producePedestals ( const CastorPedestalsRcd rcd) [protected]

Definition at line 136 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makePedestal(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                    {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestals-> ...";
  std::auto_ptr<CastorPedestals> result (new CastorPedestals (false));
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorPedestal item = CastorDbHardcode::makePedestal (*cell);
    result->addValues(item);
  }
  return result;
}
std::auto_ptr< CastorPedestalWidths > CastorHardcodeCalibrations::producePedestalWidths ( const CastorPedestalWidthsRcd rcd) [protected]

Definition at line 147 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makePedestalWidth(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                                   {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::producePedestalWidths-> ...";
  std::auto_ptr<CastorPedestalWidths> result (new CastorPedestalWidths (false));
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorPedestalWidth item = CastorDbHardcode::makePedestalWidth (*cell);
    result->addValues(item);
  }
  return result;
}
std::auto_ptr< CastorQIEData > CastorHardcodeCalibrations::produceQIEData ( const CastorQIEDataRcd rcd) [protected]

Definition at line 180 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeQIECoder(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                  {
  edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceQIEData-> ...";
  std::auto_ptr<CastorQIEData> result (new CastorQIEData ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    CastorQIECoder coder = CastorDbHardcode::makeQIECoder (*cell);
    result->addCoder(coder);
  }
  return result;
}
std::auto_ptr< CastorRecoParams > CastorHardcodeCalibrations::produceRecoParams ( const CastorRecoParamsRcd rcd) [protected]

Definition at line 210 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeRecoParam(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                           {
        edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceRecoParams-> ...";
        std::auto_ptr<CastorRecoParams> result (new CastorRecoParams ());
        std::vector <HcalGenericDetId> cells = allCells(h2mode_);
        for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
                CastorRecoParam item = CastorDbHardcode::makeRecoParam (*cell);
                result->addValues(item);
        }
        return result;
}
std::auto_ptr< CastorSaturationCorrs > CastorHardcodeCalibrations::produceSaturationCorrs ( const CastorSaturationCorrsRcd rcd) [protected]

Definition at line 221 of file CastorHardcodeCalibrations.cc.

References CastorDbHardcode::makeSaturationCorr(), and query::result.

Referenced by CastorHardcodeCalibrations().

                                                                                                                          {
        edm::LogInfo("HCAL") << "CastorHardcodeCalibrations::produceSaturationCorrs-> ...";
        std::auto_ptr<CastorSaturationCorrs> result (new CastorSaturationCorrs ());
        std::vector <HcalGenericDetId> cells = allCells(h2mode_);
        for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
                CastorSaturationCorr item = CastorDbHardcode::makeSaturationCorr (*cell);
                result->addValues(item);
        }
        return result;
}
void CastorHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
) [protected, virtual]

Member Data Documentation

Definition at line 46 of file CastorHardcodeCalibrations.h.