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 Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 

Public Member Functions

 CaloTPGTranscoderULUTs (const edm::ParameterSet &)
 
ReturnType produce (const CaloTPGRecord &)
 
 ~CaloTPGTranscoderULUTs () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
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
 
const int NCTScaleShift
 
const double nominal_gain
 
const double RCTLSB
 
const int RCTScaleShift
 
const bool read_Ascii_Compression
 
const bool read_Ascii_RCT
 
const std::vector< int > ZS
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- 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 eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 

Detailed Description

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

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

Definition at line 44 of file CaloTPGTranscoderULUTs.cc.

Member Typedef Documentation

Definition at line 49 of file CaloTPGTranscoderULUTs.cc.

Constructor & Destructor Documentation

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

Definition at line 83 of file CaloTPGTranscoderULUTs.cc.

References edm::ESProducer::setWhatProduced().

83  :
84  hfilename1_(iConfig.getParameter<edm::FileInPath>("hcalLUT1")),
85  hfilename2_(iConfig.getParameter<edm::FileInPath>("hcalLUT2")),
86  read_Ascii_Compression(iConfig.getParameter<bool>("read_Ascii_Compression_LUTs")),
87  read_Ascii_RCT(iConfig.getParameter<bool>("read_Ascii_RCT_LUTs")),
88  ietal(iConfig.getParameter<std::vector<int>>("ietaLowerBound")),
89  ietah(iConfig.getParameter<std::vector<int>>("ietaUpperBound")),
90  ZS(iConfig.getParameter<std::vector<int>>("ZS")),
91  LUTfactor(iConfig.getParameter<std::vector<int>>("LUTfactor")),
92  linearLUTs_(iConfig.getParameter<bool>("linearLUTs")),
93  nominal_gain(iConfig.getParameter<double>("nominal_gain")),
94  RCTLSB(iConfig.getParameter<double>("RCTLSB")),
95  NCTScaleShift(iConfig.getParameter<edm::ParameterSet>("tpScales").getParameter<edm::ParameterSet>("HF").getParameter<int>("NCTShift")),
96  RCTScaleShift(iConfig.getParameter<edm::ParameterSet>("tpScales").getParameter<edm::ParameterSet>("HF").getParameter<int>("RCTShift")),
97  lsbQIE8(iConfig.getParameter<edm::ParameterSet>("tpScales").getParameter<edm::ParameterSet>("HBHE").getParameter<double>("LSBQIE8")),
98  lsbQIE11(iConfig.getParameter<edm::ParameterSet>("tpScales").getParameter<edm::ParameterSet>("HBHE").getParameter<double>("LSBQIE11"))
99 {
100  setWhatProduced(this);
101 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
const std::vector< int > LUTfactor
const std::vector< int > ietal
const edm::FileInPath hfilename1_
const std::vector< int > ZS
const std::vector< int > ietah
const edm::FileInPath hfilename2_
CaloTPGTranscoderULUTs::~CaloTPGTranscoderULUTs ( )
override

Definition at line 104 of file CaloTPGTranscoderULUTs.cc.

105 {
106 
107  // do anything here that needs to be done at desctruction time
108  // (e.g. close files, deallocate resources etc.)
109 
110 }

Member Function Documentation

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

Definition at line 119 of file CaloTPGTranscoderULUTs.cc.

References DEFINE_FWK_EVENTSETUP_MODULE, edmOneToOneComparison::file1, edmOneToOneComparison::file2, edm::FileInPath::fullPath(), edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hfilename1_, hfilename2_, linearLUTs_, lsbQIE11, lsbQIE8, NCTScaleShift, edm::ESHandle< T >::product(), RCTScaleShift, read_Ascii_Compression, read_Ascii_RCT, and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

Member Data Documentation

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename1_
private

Definition at line 55 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const edm::FileInPath CaloTPGTranscoderULUTs::hfilename2_
private

Definition at line 56 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

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

Definition at line 60 of file CaloTPGTranscoderULUTs.cc.

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

Definition at line 59 of file CaloTPGTranscoderULUTs.cc.

const bool CaloTPGTranscoderULUTs::linearLUTs_
private

Definition at line 63 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::lsbQIE11
private

Definition at line 69 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::lsbQIE8
private

Definition at line 68 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

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

Definition at line 62 of file CaloTPGTranscoderULUTs.cc.

const int CaloTPGTranscoderULUTs::NCTScaleShift
private

Definition at line 66 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const double CaloTPGTranscoderULUTs::nominal_gain
private

Definition at line 64 of file CaloTPGTranscoderULUTs.cc.

const double CaloTPGTranscoderULUTs::RCTLSB
private

Definition at line 65 of file CaloTPGTranscoderULUTs.cc.

const int CaloTPGTranscoderULUTs::RCTScaleShift
private

Definition at line 67 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const bool CaloTPGTranscoderULUTs::read_Ascii_Compression
private

Definition at line 57 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

const bool CaloTPGTranscoderULUTs::read_Ascii_RCT
private

Definition at line 58 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

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

Definition at line 61 of file CaloTPGTranscoderULUTs.cc.