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::EventSetupRecordIntervalFinder 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, boost::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 &)
 
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &iKey, const edm::IOVSyncValue &iTime, edm::ValidityInterval &oInterval)
 
 ~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 ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

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 &)
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Detailed Description

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

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

Definition at line 40 of file CaloTPGTranscoderULUTs.cc.

Member Typedef Documentation

Definition at line 46 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  findingRecord<CaloTPGRecord>();
86 
87  //now do what ever other initialization is needed
88  read_Ascii_Compression = false;
89  read_Ascii_RCT = false;
90  read_Ascii_Compression=iConfig.getParameter<bool>("read_Ascii_Compression_LUTs");
91  read_Ascii_RCT=iConfig.getParameter<bool>("read_Ascii_RCT_LUTs");
92 
93  ietal = iConfig.getParameter< std::vector<int> >("ietaLowerBound");
94  ietah = iConfig.getParameter< std::vector<int> >("ietaUpperBound");
95  ZS = iConfig.getParameter< std::vector<int> >("ZS");
96  LUTfactor = iConfig.getParameter< std::vector<int> >("LUTfactor");
97  nominal_gain = iConfig.getParameter<double>("nominal_gain");
98  RCTLSB = iConfig.getParameter<double>("RCTLSB");
99 
100 }
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 103 of file CaloTPGTranscoderULUTs.cc.

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

Member Function Documentation

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

Definition at line 118 of file CaloTPGTranscoderULUTs.cc.

References interpolateCardsSimple::file1, interpolateCardsSimple::file2, edm::FileInPath::fullPath(), hfilename1_, hfilename2_, read_Ascii_Compression, and read_Ascii_RCT.

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

119 {
120  using namespace edm::es;
121  std::string file1="";
122  std::string file2="";
124  edm::LogInfo("Level1") << "Using " << hfilename1_.fullPath() << " & " << hfilename2_.fullPath()
125  << " for CaloTPGTranscoderULUTs HCAL initialization";
126  //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(), hfilename2_.fullPath()));
127  //return pTCoder;
130  } else if (read_Ascii_RCT && !read_Ascii_Compression) {
131  edm::LogInfo("Level1") << "Using analytical compression and " << hfilename2_.fullPath()
132  << " RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
133  //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT("", hfilename2_.fullPath()));
134  //return pTCoder;
136  } else if (read_Ascii_Compression && !read_Ascii_RCT) {
137  edm::LogInfo("Level1") << "Using ASCII compression tables " << hfilename1_.fullPath()
138  << " and automatic RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
139  //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(),""));
140  //return pTCoder;
142  } else {
143  edm::LogInfo("Level1") << "Using analytical compression and RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
144  //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT());
145  //return pTCoder;
146  }
147  //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(ietal, ietah, ZS, LUTfactor, RCTLSB, nominal_gain, file1, file2));
148  std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(file1, file2));
149  return pTCoder;
150 }
std::string fullPath() const
Definition: FileInPath.cc:171
void CaloTPGTranscoderULUTs::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
)
inlinevirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 50 of file CaloTPGTranscoderULUTs.cc.

References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().

50  {
52  }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
static const IOVSyncValue & beginOfTime()

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().