CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

HcalHardcodeCalibrations Class Reference

#include <HcalHardcodeCalibrations.h>

Inheritance diagram for HcalHardcodeCalibrations:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

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

Protected Member Functions

std::auto_ptr< HcalChannelQualityproduceChannelQuality (const HcalChannelQualityRcd &rcd)
std::auto_ptr< HcalDcsMapproduceDcsMap (const HcalDcsMapRcd &rcd)
std::auto_ptr< HcalDcsValuesproduceDcsValues (const HcalDcsRcd &rcd)
std::auto_ptr< HcalElectronicsMapproduceElectronicsMap (const HcalElectronicsMapRcd &rcd)
std::auto_ptr< HcalGainsproduceGains (const HcalGainsRcd &rcd)
std::auto_ptr< HcalGainWidthsproduceGainWidths (const HcalGainWidthsRcd &rcd)
std::auto_ptr
< HcalL1TriggerObjects
produceL1TriggerObjects (const HcalL1TriggerObjectsRcd &rcd)
std::auto_ptr< HcalLUTCorrsproduceLUTCorrs (const HcalLUTCorrsRcd &rcd)
std::auto_ptr< HcalLutMetadataproduceLutMetadata (const HcalLutMetadataRcd &rcd)
std::auto_ptr< HcalPedestalsproducePedestals (const HcalPedestalsRcd &rcd)
std::auto_ptr< HcalPedestalWidthsproducePedestalWidths (const HcalPedestalWidthsRcd &rcd)
std::auto_ptr< HcalPFCorrsproducePFCorrs (const HcalPFCorrsRcd &rcd)
std::auto_ptr< HcalQIEDataproduceQIEData (const HcalQIEDataRcd &rcd)
std::auto_ptr< HcalRespCorrsproduceRespCorrs (const HcalRespCorrsRcd &rcd)
std::auto_ptr< HcalTimeCorrsproduceTimeCorrs (const HcalTimeCorrsRcd &rcd)
std::auto_ptr
< HcalValidationCorrs
produceValidationCorrs (const HcalValidationCorrsRcd &rcd)
std::auto_ptr< HcalZSThresholdsproduceZSThresholds (const HcalZSThresholdsRcd &rcd)
virtual void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Protected Attributes

bool h2mode_

Detailed Description

Definition at line 35 of file HcalHardcodeCalibrations.h.


Constructor & Destructor Documentation

HcalHardcodeCalibrations::HcalHardcodeCalibrations ( const edm::ParameterSet iConfig)

Definition at line 74 of file HcalHardcodeCalibrations.cc.

References cond::ecalcond::all, edm::ParameterSet::getUntrackedParameter(), summarizeEdmComparisonLogfiles::objectName, produceChannelQuality(), produceDcsMap(), produceDcsValues(), produceElectronicsMap(), produceGains(), produceGainWidths(), produceL1TriggerObjects(), produceLUTCorrs(), produceLutMetadata(), producePedestals(), producePedestalWidths(), producePFCorrs(), produceQIEData(), produceRespCorrs(), produceTimeCorrs(), produceValidationCorrs(), produceZSThresholds(), and align_tpl::toGet.

{
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::HcalHardcodeCalibrations->...";
  //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, &HcalHardcodeCalibrations::producePedestals);
      findingRecord <HcalPedestalsRcd> ();
    }
    if ((*objectName == "PedestalWidths") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::producePedestalWidths);
      findingRecord <HcalPedestalWidthsRcd> ();
    }
    if ((*objectName == "Gains") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceGains);
      findingRecord <HcalGainsRcd> ();
    }
    if ((*objectName == "GainWidths") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceGainWidths);
      findingRecord <HcalGainWidthsRcd> ();
    }
    if ((*objectName == "QIEData") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceQIEData);
      findingRecord <HcalQIEDataRcd> ();
    }
    if ((*objectName == "ChannelQuality") || (*objectName == "channelQuality") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceChannelQuality);
      findingRecord <HcalChannelQualityRcd> ();
    }
    if ((*objectName == "ElectronicsMap") || (*objectName == "electronicsMap") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceElectronicsMap);
      findingRecord <HcalElectronicsMapRcd> ();
    }
    if ((*objectName == "ZSThresholds") || (*objectName == "zsThresholds") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceZSThresholds);
      findingRecord <HcalZSThresholdsRcd> ();
    }
    if ((*objectName == "RespCorrs") || (*objectName == "ResponseCorrection") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceRespCorrs);
      findingRecord <HcalRespCorrsRcd> ();
    }
    if ((*objectName == "LUTCorrs") || (*objectName == "LUTCorrection") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceLUTCorrs);
      findingRecord <HcalLUTCorrsRcd> ();
    }
    if ((*objectName == "PFCorrs") || (*objectName == "PFCorrection") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::producePFCorrs);
      findingRecord <HcalPFCorrsRcd> ();
    }
    if ((*objectName == "TimeCorrs") || (*objectName == "TimeCorrection") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceTimeCorrs);
      findingRecord <HcalTimeCorrsRcd> ();
    }
    if ((*objectName == "L1TriggerObjects") || (*objectName == "L1Trigger") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceL1TriggerObjects);
      findingRecord <HcalL1TriggerObjectsRcd> ();
    }
    if ((*objectName == "ValidationCorrs") || (*objectName == "ValidationCorrection") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceValidationCorrs);
      findingRecord <HcalValidationCorrsRcd> ();
    }
    if ((*objectName == "LutMetadata") || (*objectName == "lutMetadata") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceLutMetadata);
      findingRecord <HcalLutMetadataRcd> ();
    }
    if ((*objectName == "DcsValues") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceDcsValues);
      findingRecord <HcalDcsRcd> ();
    }
    if ((*objectName == "DcsMap") || (*objectName == "dcsMap") || all) {
      setWhatProduced (this, &HcalHardcodeCalibrations::produceDcsMap);
      findingRecord <HcalDcsMapRcd> ();
    }
  }
}
HcalHardcodeCalibrations::~HcalHardcodeCalibrations ( )

Definition at line 155 of file HcalHardcodeCalibrations.cc.

{
}

Member Function Documentation

void HcalHardcodeCalibrations::produce ( ) [inline]

Definition at line 42 of file HcalHardcodeCalibrations.h.

{};
std::auto_ptr< HcalChannelQuality > HcalHardcodeCalibrations::produceChannelQuality ( const HcalChannelQualityRcd rcd) [protected]

Definition at line 225 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                                 {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceChannelQuality-> ...";
  std::auto_ptr<HcalChannelQuality> result (new HcalChannelQuality ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalChannelStatus item(cell->rawId(),0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalDcsMap > HcalHardcodeCalibrations::produceDcsMap ( const HcalDcsMapRcd rcd) [protected]

Definition at line 351 of file HcalHardcodeCalibrations.cc.

References HcalDbHardcode::makeHardcodeDcsMap(), and query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                         {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsMap-> ...";

  std::auto_ptr<HcalDcsMap> result (new HcalDcsMap ());
  HcalDbHardcode::makeHardcodeDcsMap(*result);
  return result;
}
std::auto_ptr< HcalDcsValues > HcalHardcodeCalibrations::produceDcsValues ( const HcalDcsRcd rcd) [protected]

Definition at line 345 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                   {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceDcsValues-> ...";
  std::auto_ptr<HcalDcsValues> result(new HcalDcsValues);
  return result;
}
std::auto_ptr< HcalElectronicsMap > HcalHardcodeCalibrations::produceElectronicsMap ( const HcalElectronicsMapRcd rcd) [protected]

Definition at line 310 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

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

  std::auto_ptr<HcalElectronicsMap> result (new HcalElectronicsMap ());
  HcalDbHardcode::makeHardcodeMap(*result);
  return result;
}
std::auto_ptr< HcalGains > HcalHardcodeCalibrations::produceGains ( const HcalGainsRcd rcd) [protected]

Definition at line 192 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

                                                                                  {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGains-> ...";
  std::auto_ptr<HcalGains> result (new HcalGains ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalGain item = HcalDbHardcode::makeGain (*cell);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalGainWidths > HcalHardcodeCalibrations::produceGainWidths ( const HcalGainWidthsRcd rcd) [protected]

Definition at line 203 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

                                                                                                 {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceGainWidths-> ...";
  std::auto_ptr<HcalGainWidths> result (new HcalGainWidths ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalGainWidth item = HcalDbHardcode::makeGainWidth (*cell);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalL1TriggerObjects > HcalHardcodeCalibrations::produceL1TriggerObjects ( const HcalL1TriggerObjectsRcd rcd) [protected]

Definition at line 293 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                                       {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceL1TriggerObjects-> ...";
  std::auto_ptr<HcalL1TriggerObjects> result (new HcalL1TriggerObjects ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalL1TriggerObject item(cell->rawId(),0., 1., 0);
    result->addValues(item,h2mode_);
  }
  // add tag and algo values
  result->setTagString("hardcoded");
  result->setAlgoString("hardcoded");
  return result;
}
std::auto_ptr< HcalLUTCorrs > HcalHardcodeCalibrations::produceLUTCorrs ( const HcalLUTCorrsRcd rcd) [protected]

Definition at line 248 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                               {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLUTCorrs-> ...";
  std::auto_ptr<HcalLUTCorrs> result (new HcalLUTCorrs ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalLUTCorr item(cell->rawId(),1.0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalLutMetadata > HcalHardcodeCalibrations::produceLutMetadata ( const HcalLutMetadataRcd rcd) [protected]

Definition at line 329 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                        {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceLutMetadata-> ...";
  std::auto_ptr<HcalLutMetadata> result (new HcalLutMetadata ());

  result->setRctLsb( 0.25 );
  result->setNominalGain( 0.177 );

  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalLutMetadatum item(cell->rawId(),1.0,1,1);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalPedestals > HcalHardcodeCalibrations::producePedestals ( const HcalPedestalsRcd rcd) [protected]

Definition at line 170 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

                                                                                              {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestals-> ...";
  std::auto_ptr<HcalPedestals> result (new HcalPedestals (false));
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalPedestal item = HcalDbHardcode::makePedestal (*cell);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalPedestalWidths > HcalHardcodeCalibrations::producePedestalWidths ( const HcalPedestalWidthsRcd rcd) [protected]

Definition at line 181 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

                                                                                                             {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePedestalWidths-> ...";
  std::auto_ptr<HcalPedestalWidths> result (new HcalPedestalWidths (false));
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalPedestalWidth item = HcalDbHardcode::makePedestalWidth (*cell);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalPFCorrs > HcalHardcodeCalibrations::producePFCorrs ( const HcalPFCorrsRcd rcd) [protected]

Definition at line 259 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                            {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::producePFCorrs-> ...";
  std::auto_ptr<HcalPFCorrs> result (new HcalPFCorrs ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalPFCorr item(cell->rawId(),1.0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalQIEData > HcalHardcodeCalibrations::produceQIEData ( const HcalQIEDataRcd rcd) [protected]

Definition at line 214 of file HcalHardcodeCalibrations.cc.

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

Referenced by HcalHardcodeCalibrations().

                                                                                            {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceQIEData-> ...";
  std::auto_ptr<HcalQIEData> result (new HcalQIEData ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalQIECoder coder = HcalDbHardcode::makeQIECoder (*cell);
    result->addCoder (coder,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalRespCorrs > HcalHardcodeCalibrations::produceRespCorrs ( const HcalRespCorrsRcd rcd) [protected]

Definition at line 237 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                  {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceRespCorrs-> ...";
  std::auto_ptr<HcalRespCorrs> result (new HcalRespCorrs ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalRespCorr item(cell->rawId(),1.0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalTimeCorrs > HcalHardcodeCalibrations::produceTimeCorrs ( const HcalTimeCorrsRcd rcd) [protected]

Definition at line 270 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                  {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceTimeCorrs-> ...";
  std::auto_ptr<HcalTimeCorrs> result (new HcalTimeCorrs ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalTimeCorr item(cell->rawId(),0.0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalValidationCorrs > HcalHardcodeCalibrations::produceValidationCorrs ( const HcalValidationCorrsRcd rcd) [protected]

Definition at line 318 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                                    {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceValidationCorrs-> ...";
  std::auto_ptr<HcalValidationCorrs> result (new HcalValidationCorrs ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalValidationCorr item(cell->rawId(),1.0);
    result->addValues(item,h2mode_);
  }
  return result;
}
std::auto_ptr< HcalZSThresholds > HcalHardcodeCalibrations::produceZSThresholds ( const HcalZSThresholdsRcd rcd) [protected]

Definition at line 281 of file HcalHardcodeCalibrations.cc.

References query::result.

Referenced by HcalHardcodeCalibrations().

                                                                                                           {
  edm::LogInfo("HCAL") << "HcalHardcodeCalibrations::produceZSThresholds-> ...";
  std::auto_ptr<HcalZSThresholds> result (new HcalZSThresholds ());
  std::vector <HcalGenericDetId> cells = allCells(h2mode_);
  for (std::vector <HcalGenericDetId>::const_iterator cell = cells.begin (); cell != cells.end (); cell++) {
    HcalZSThreshold item(cell->rawId(),0);
    result->addValues(item,h2mode_);
  }
  return result;
}
void HcalHardcodeCalibrations::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
) [protected, virtual]

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 164 of file HcalHardcodeCalibrations.cc.

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

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

Member Data Documentation

Definition at line 69 of file HcalHardcodeCalibrations.h.