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
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(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 char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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={})
 
void usesResources (std::vector< std::string > const &)
 
- 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

◆ ReturnType

Definition at line 48 of file CaloTPGTranscoderULUTs.cc.

Constructor & Destructor Documentation

◆ CaloTPGTranscoderULUTs()

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

Definition at line 85 of file CaloTPGTranscoderULUTs.cc.

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  auto cc = setWhatProduced(this);
110  lutMetadataToken = cc.consumes();
111  theTrigTowerGeometryToken = cc.consumes();
112  topoToken = cc.consumes();
113 }

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

◆ ~CaloTPGTranscoderULUTs()

CaloTPGTranscoderULUTs::~CaloTPGTranscoderULUTs ( )
override

Definition at line 115 of file CaloTPGTranscoderULUTs.cc.

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

Member Function Documentation

◆ produce()

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

Definition at line 125 of file CaloTPGTranscoderULUTs.cc.

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

References timingPdfMaker::file1, edmOneToOneComparison::file2, edm::FileInPath::fullPath(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), 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.

Member Data Documentation

◆ hfilename1_

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename1_
private

Definition at line 54 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ hfilename2_

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename2_
private

Definition at line 55 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ ietah

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

Definition at line 59 of file CaloTPGTranscoderULUTs.cc.

◆ ietal

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

Definition at line 58 of file CaloTPGTranscoderULUTs.cc.

◆ linearLUTs_

const bool CaloTPGTranscoderULUTs::linearLUTs_
private

Definition at line 62 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ lsbQIE11

const double CaloTPGTranscoderULUTs::lsbQIE11
private

Definition at line 68 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ lsbQIE8

const double CaloTPGTranscoderULUTs::lsbQIE8
private

Definition at line 67 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ LUTfactor

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

Definition at line 61 of file CaloTPGTranscoderULUTs.cc.

◆ lutMetadataToken

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

Definition at line 69 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

◆ NCTScaleShift

const int CaloTPGTranscoderULUTs::NCTScaleShift
private

Definition at line 65 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ nominal_gain

const double CaloTPGTranscoderULUTs::nominal_gain
private

Definition at line 63 of file CaloTPGTranscoderULUTs.cc.

◆ RCTLSB

const double CaloTPGTranscoderULUTs::RCTLSB
private

Definition at line 64 of file CaloTPGTranscoderULUTs.cc.

◆ RCTScaleShift

const int CaloTPGTranscoderULUTs::RCTScaleShift
private

Definition at line 66 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ read_Ascii_Compression

const bool CaloTPGTranscoderULUTs::read_Ascii_Compression
private

Definition at line 56 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ read_Ascii_RCT

const bool CaloTPGTranscoderULUTs::read_Ascii_RCT
private

Definition at line 57 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

◆ theTrigTowerGeometryToken

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

Definition at line 70 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

◆ topoToken

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

Definition at line 71 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

◆ ZS

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

Definition at line 60 of file CaloTPGTranscoderULUTs.cc.

edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
HcalLutMetadataRcd
Definition: HcalLutMetadataRcd.h:25
HcalCondObjectContainerBase::setTopo
void setTopo(const HcalTopology *topo)
Definition: HcalCondObjectContainerBase.cc:17
CaloTPGTranscoderULUTs::theTrigTowerGeometryToken
edm::ESGetToken< HcalTrigTowerGeometry, CaloGeometryRecord > theTrigTowerGeometryToken
Definition: CaloTPGTranscoderULUTs.cc:70
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edmOneToOneComparison.file2
file2
Definition: edmOneToOneComparison.py:107
CaloTPGTranscoderULUTs::lsbQIE11
const double lsbQIE11
Definition: CaloTPGTranscoderULUTs.cc:68
CaloTPGTranscoderULUTs::lsbQIE8
const double lsbQIE8
Definition: CaloTPGTranscoderULUTs.cc:67
cc
edm::FileInPath
Definition: FileInPath.h:64
CaloTPGTranscoderULUTs::RCTLSB
const double RCTLSB
Definition: CaloTPGTranscoderULUTs.cc:64
CaloTPGTranscoderULUTs::nominal_gain
const double nominal_gain
Definition: CaloTPGTranscoderULUTs.cc:63
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CaloTPGTranscoderULUTs::ietal
const std::vector< int > ietal
Definition: CaloTPGTranscoderULUTs.cc:58
CaloTPGTranscoderULUTs::LUTfactor
const std::vector< int > LUTfactor
Definition: CaloTPGTranscoderULUTs.cc:61
edm::ParameterSet
Definition: ParameterSet.h:47
CaloTPGTranscoderULUTs::read_Ascii_RCT
const bool read_Ascii_RCT
Definition: CaloTPGTranscoderULUTs.cc:57
CaloTPGTranscoderULUTs::RCTScaleShift
const int RCTScaleShift
Definition: CaloTPGTranscoderULUTs.cc:66
CaloTPGTranscoderULUTs::linearLUTs_
const bool linearLUTs_
Definition: CaloTPGTranscoderULUTs.cc:62
get
#define get
CaloTPGTranscoderULUTs::NCTScaleShift
const int NCTScaleShift
Definition: CaloTPGTranscoderULUTs.cc:65
CaloTPGTranscoderULUTs::hfilename1_
const edm::FileInPath hfilename1_
Definition: CaloTPGTranscoderULUTs.cc:54
HcalLutMetadata
Definition: HcalLutMetadata.h:15
timingPdfMaker.file1
file1
Definition: timingPdfMaker.py:79
CaloTPGTranscoderULUTs::topoToken
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > topoToken
Definition: CaloTPGTranscoderULUTs.cc:71
CaloTPGTranscoderULUTs::lutMetadataToken
edm::ESGetToken< HcalLutMetadata, HcalLutMetadataRcd > lutMetadataToken
Definition: CaloTPGTranscoderULUTs.cc:69
edm::es
Definition: es_Label.h:33
CaloTPGTranscoderULUTs::read_Ascii_Compression
const bool read_Ascii_Compression
Definition: CaloTPGTranscoderULUTs.cc:56
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CaloTPGTranscoderULUTs::ZS
const std::vector< int > ZS
Definition: CaloTPGTranscoderULUTs.cc:60
CaloTPGTranscoderULUTs::hfilename2_
const edm::FileInPath hfilename2_
Definition: CaloTPGTranscoderULUTs.cc:55
CaloTPGTranscoderULUTs::ietah
const std::vector< int > ietah
Definition: CaloTPGTranscoderULUTs.cc:59
edm::FileInPath::fullPath
std::string fullPath() const
Definition: FileInPath.cc:163