CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
CaloTPGTranscoderULUTs Class Reference
Inheritance diagram for CaloTPGTranscoderULUTs:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Types

typedef std::unique_ptr< CaloTPGTranscoderReturnType
 

Public Member Functions

 CaloTPGTranscoderULUTs (const edm::ParameterSet &)
 
ReturnType produce (const CaloTPGRecord &)
 
 ~CaloTPGTranscoderULUTs () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider () noexcept(false)
 

Private Attributes

const edm::FileInPath hfilename1_
 
const edm::FileInPath hfilename2_
 
const std::vector< int > ietah
 
const std::vector< int > ietal
 
const bool linearLUTs_
 
const double lsbQIE11
 
const double lsbQIE8
 
const std::vector< int > LUTfactor
 
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcdlutMetadataToken
 
const int NCTScaleShift
 
const double nominal_gain
 
const double RCTLSB
 
const int RCTScaleShift
 
const bool read_Ascii_Compression
 
const bool read_Ascii_RCT
 
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecordtheTrigTowerGeometryToken
 
edm::ESGetToken< HcalTopology, HcalRecNumberingRecordtopoToken
 
const std::vector< int > ZS
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy >>>
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 43 of file CaloTPGTranscoderULUTs.cc.

Member Typedef Documentation

Definition at line 48 of file CaloTPGTranscoderULUTs.cc.

Constructor & Destructor Documentation

CaloTPGTranscoderULUTs::CaloTPGTranscoderULUTs ( const edm::ParameterSet iConfig)

Definition at line 85 of file CaloTPGTranscoderULUTs.cc.

References lutMetadataToken, edm::ESProducer::setWhatProduced(), theTrigTowerGeometryToken, and topoToken.

86  : hfilename1_(iConfig.getParameter<edm::FileInPath>("hcalLUT1")),
87  hfilename2_(iConfig.getParameter<edm::FileInPath>("hcalLUT2")),
88  read_Ascii_Compression(iConfig.getParameter<bool>("read_Ascii_Compression_LUTs")),
89  read_Ascii_RCT(iConfig.getParameter<bool>("read_Ascii_RCT_LUTs")),
90  ietal(iConfig.getParameter<std::vector<int>>("ietaLowerBound")),
91  ietah(iConfig.getParameter<std::vector<int>>("ietaUpperBound")),
92  ZS(iConfig.getParameter<std::vector<int>>("ZS")),
93  LUTfactor(iConfig.getParameter<std::vector<int>>("LUTfactor")),
94  linearLUTs_(iConfig.getParameter<bool>("linearLUTs")),
95  nominal_gain(iConfig.getParameter<double>("nominal_gain")),
96  RCTLSB(iConfig.getParameter<double>("RCTLSB")),
97  NCTScaleShift(iConfig.getParameter<edm::ParameterSet>("tpScales")
99  .getParameter<int>("NCTShift")),
100  RCTScaleShift(iConfig.getParameter<edm::ParameterSet>("tpScales")
102  .getParameter<int>("RCTShift")),
103  lsbQIE8(iConfig.getParameter<edm::ParameterSet>("tpScales")
105  .getParameter<double>("LSBQIE8")),
106  lsbQIE11(iConfig.getParameter<edm::ParameterSet>("tpScales")
108  .getParameter<double>("LSBQIE11")) {
109  setWhatProduced(this).setConsumes(lutMetadataToken).setConsumes(theTrigTowerGeometryToken).setConsumes(topoToken);
110 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > theTrigTowerGeometryToken
const std::vector< int > LUTfactor
const std::vector< int > ietal
const edm::FileInPath hfilename1_
const std::vector< int > ZS
const std::vector< int > ietah
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > lutMetadataToken
const edm::FileInPath hfilename2_
CaloTPGTranscoderULUTs::~CaloTPGTranscoderULUTs ( )
override

Definition at line 112 of file CaloTPGTranscoderULUTs.cc.

112  {
113  // do anything here that needs to be done at desctruction time
114  // (e.g. close files, deallocate resources etc.)
115 }

Member Function Documentation

CaloTPGTranscoderULUTs::ReturnType CaloTPGTranscoderULUTs::produce ( const CaloTPGRecord iRecord)

Definition at line 122 of file CaloTPGTranscoderULUTs.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, timingPdfMaker::file1, edmOneToOneComparison::file2, edm::FileInPath::fullPath(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hfilename1_, hfilename2_, linearLUTs_, lsbQIE11, lsbQIE8, lutMetadataToken, NCTScaleShift, RCTScaleShift, read_Ascii_Compression, read_Ascii_RCT, HcalCondObjectContainerBase::setTopo(), AlCaHLTBitMon_QueryRunRegistry::string, theTrigTowerGeometryToken, and topoToken.

Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().

122  {
123  using namespace edm::es;
124  std::string file1 = "";
125  std::string file2 = "";
127  edm::LogInfo("Level1") << "Using " << hfilename1_.fullPath() << " & " << hfilename2_.fullPath()
128  << " for CaloTPGTranscoderULUTs HCAL initialization";
129  //std::unique_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(), hfilename2_.fullPath()));
130  //return pTCoder;
131  file1 = hfilename1_.fullPath();
132  file2 = hfilename2_.fullPath();
133  } else if (read_Ascii_RCT && !read_Ascii_Compression) {
134  edm::LogInfo("Level1") << "Using analytical compression and " << hfilename2_.fullPath()
135  << " RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
136  //std::unique_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT("", hfilename2_.fullPath()));
137  //return pTCoder;
138  file2 = hfilename2_.fullPath();
139  } else if (read_Ascii_Compression && !read_Ascii_RCT) {
140  edm::LogInfo("Level1") << "Using ASCII compression tables " << hfilename1_.fullPath()
141  << " and automatic RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
142  //std::unique_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(),""));
143  //return pTCoder;
144  file1 = hfilename1_.fullPath();
145  } else {
146  edm::LogInfo("Level1")
147  << "Using analytical compression and RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
148  //std::unique_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT());
149  //return pTCoder;
150  }
151  //std::unique_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(ietal, ietah, ZS, LUTfactor, RCTLSB, nominal_gain, file1, file2));
152 
153  const auto& lutMetadata = iRecord.get(lutMetadataToken);
154  const auto& theTrigTowerGeometry = iRecord.get(theTrigTowerGeometryToken);
155  const auto& topo = iRecord.getRecord<HcalLutMetadataRcd>().get(topoToken);
156 
157  HcalLutMetadata fullLut{lutMetadata};
158  fullLut.setTopo(&topo);
159 
160  auto pTCoder = std::make_unique<CaloTPGTranscoderULUT>(file1, file2);
161  pTCoder->setup(fullLut, theTrigTowerGeometry, NCTScaleShift, RCTScaleShift, lsbQIE8, lsbQIE11, linearLUTs_);
162  return pTCoder;
163 }
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > theTrigTowerGeometryToken
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const edm::FileInPath hfilename1_
std::string fullPath() const
Definition: FileInPath.cc:163
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > lutMetadataToken
void setTopo(const HcalTopology *topo)
const edm::FileInPath hfilename2_

Member Data Documentation

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename1_
private

Definition at line 54 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename2_
private

Definition at line 55 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const std::vector<int> CaloTPGTranscoderULUTs::ietah
private

Definition at line 59 of file CaloTPGTranscoderULUTs.cc.

const std::vector<int> CaloTPGTranscoderULUTs::ietal
private

Definition at line 58 of file CaloTPGTranscoderULUTs.cc.

const bool CaloTPGTranscoderULUTs::linearLUTs_
private

Definition at line 62 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::lsbQIE11
private

Definition at line 68 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::lsbQIE8
private

Definition at line 67 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const std::vector<int> CaloTPGTranscoderULUTs::LUTfactor
private

Definition at line 61 of file CaloTPGTranscoderULUTs.cc.

edm::ESGetToken<HcalLutMetadata, HcalLutMetadataRcd> CaloTPGTranscoderULUTs::lutMetadataToken
private

Definition at line 69 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

const int CaloTPGTranscoderULUTs::NCTScaleShift
private

Definition at line 65 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::nominal_gain
private

Definition at line 63 of file CaloTPGTranscoderULUTs.cc.

const double CaloTPGTranscoderULUTs::RCTLSB
private

Definition at line 64 of file CaloTPGTranscoderULUTs.cc.

const int CaloTPGTranscoderULUTs::RCTScaleShift
private

Definition at line 66 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const bool CaloTPGTranscoderULUTs::read_Ascii_Compression
private

Definition at line 56 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const bool CaloTPGTranscoderULUTs::read_Ascii_RCT
private

Definition at line 57 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

edm::ESGetToken<HcalTrigTowerGeometry, CaloGeometryRecord> CaloTPGTranscoderULUTs::theTrigTowerGeometryToken
private

Definition at line 70 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

edm::ESGetToken<HcalTopology, HcalRecNumberingRecord> CaloTPGTranscoderULUTs::topoToken
private

Definition at line 71 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

const std::vector<int> CaloTPGTranscoderULUTs::ZS
private

Definition at line 60 of file CaloTPGTranscoderULUTs.cc.