CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::auto_ptr
< CaloTPGTranscoder
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey,
edm::propagate_const
< std::shared_ptr< DataProxy > > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 

Public Member Functions

 CaloTPGTranscoderULUTs (const edm::ParameterSet &)
 
ReturnType produce (const CaloTPGRecord &)
 
 ~CaloTPGTranscoderULUTs ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- 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 ()
 

Private Attributes

edm::FileInPath hfilename1_
 
edm::FileInPath hfilename2_
 
std::vector< int > ietah
 
std::vector< int > ietal
 
std::vector< int > LUTfactor
 
double nominal_gain
 
double RCTLSB
 
bool read_Ascii_Compression
 
bool read_Ascii_RCT
 
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::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 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 78 of file CaloTPGTranscoderULUTs.cc.

References edm::ParameterSet::getParameter(), ietah, ietal, LUTfactor, nominal_gain, RCTLSB, read_Ascii_Compression, read_Ascii_RCT, edm::ESProducer::setWhatProduced(), and ZS.

78  :
79  hfilename1_(iConfig.getParameter<edm::FileInPath>("hcalLUT1")),
80  hfilename2_(iConfig.getParameter<edm::FileInPath>("hcalLUT2"))
81 {
82  //the following line is needed to tell the framework what
83  // data is being produced
84  setWhatProduced(this);
85 
86  //now do what ever other initialization is needed
87  read_Ascii_Compression = false;
88  read_Ascii_RCT = false;
89  read_Ascii_Compression=iConfig.getParameter<bool>("read_Ascii_Compression_LUTs");
90  read_Ascii_RCT=iConfig.getParameter<bool>("read_Ascii_RCT_LUTs");
91 
92  ietal = iConfig.getParameter< std::vector<int> >("ietaLowerBound");
93  ietah = iConfig.getParameter< std::vector<int> >("ietaUpperBound");
94  ZS = iConfig.getParameter< std::vector<int> >("ZS");
95  LUTfactor = iConfig.getParameter< std::vector<int> >("LUTfactor");
96  nominal_gain = iConfig.getParameter<double>("nominal_gain");
97  RCTLSB = iConfig.getParameter<double>("RCTLSB");
98 
99 }
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
CaloTPGTranscoderULUTs::~CaloTPGTranscoderULUTs ( )

Definition at line 102 of file CaloTPGTranscoderULUTs.cc.

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

Member Function Documentation

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

Definition at line 117 of file CaloTPGTranscoderULUTs.cc.

References timingPdfMaker::file1, edm::FileInPath::fullPath(), edm::eventsetup::EventSetupRecord::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), hfilename1_, hfilename2_, read_Ascii_Compression, read_Ascii_RCT, HcalCondObjectContainerBase::setTopo(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

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

Member Data Documentation

edm::FileInPath CaloTPGTranscoderULUTs::hfilename1_
private

Definition at line 55 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

edm::FileInPath CaloTPGTranscoderULUTs::hfilename2_
private

Definition at line 56 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

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

Definition at line 60 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

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

Definition at line 59 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

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

Definition at line 62 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

double CaloTPGTranscoderULUTs::nominal_gain
private

Definition at line 63 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

double CaloTPGTranscoderULUTs::RCTLSB
private

Definition at line 64 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

bool CaloTPGTranscoderULUTs::read_Ascii_Compression
private

Definition at line 57 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

bool CaloTPGTranscoderULUTs::read_Ascii_RCT
private

Definition at line 58 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

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

Definition at line 61 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().