CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

CaloTPGTranscoderULUTs Class Reference

Inheritance diagram for CaloTPGTranscoderULUTs:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef std::auto_ptr
< CaloTPGTranscoder
ReturnType

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

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

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.

                                                                             :
  hfilename1_(iConfig.getParameter<edm::FileInPath>("hcalLUT1")),
  hfilename2_(iConfig.getParameter<edm::FileInPath>("hcalLUT2"))
{
   //the following line is needed to tell the framework what
   // data is being produced
   setWhatProduced(this);
   findingRecord<CaloTPGRecord>();

   //now do what ever other initialization is needed
   read_Ascii_Compression = false;
   read_Ascii_RCT = false;
   read_Ascii_Compression=iConfig.getParameter<bool>("read_Ascii_Compression_LUTs");
   read_Ascii_RCT=iConfig.getParameter<bool>("read_Ascii_RCT_LUTs");

   ietal = iConfig.getParameter< std::vector<int> >("ietaLowerBound");
   ietah = iConfig.getParameter< std::vector<int> >("ietaUpperBound");
   ZS = iConfig.getParameter< std::vector<int> >("ZS");
   LUTfactor = iConfig.getParameter< std::vector<int> >("LUTfactor");
   nominal_gain = iConfig.getParameter<double>("nominal_gain");
   RCTLSB = iConfig.getParameter<double>("RCTLSB");

}
CaloTPGTranscoderULUTs::~CaloTPGTranscoderULUTs ( )

Definition at line 103 of file CaloTPGTranscoderULUTs.cc.

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

}

Member Function Documentation

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

Definition at line 118 of file CaloTPGTranscoderULUTs.cc.

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

{
   using namespace edm::es;
   std::string file1="";
   std::string file2="";
   if (read_Ascii_RCT && read_Ascii_Compression) {
         edm::LogInfo("Level1") << "Using " << hfilename1_.fullPath() << " & " << hfilename2_.fullPath()
                          << " for CaloTPGTranscoderULUTs HCAL initialization";
         //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(), hfilename2_.fullPath()));
         //return pTCoder;
       file1 = hfilename1_.fullPath();
       file2 = hfilename2_.fullPath();
   } else if (read_Ascii_RCT && !read_Ascii_Compression) {
         edm::LogInfo("Level1") << "Using analytical compression and " << hfilename2_.fullPath()
                          << " RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
         //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT("", hfilename2_.fullPath()));
         //return pTCoder;
       file2 = hfilename2_.fullPath();
   } else if (read_Ascii_Compression && !read_Ascii_RCT) {
         edm::LogInfo("Level1") << "Using ASCII compression tables " << hfilename1_.fullPath()
                          << " and automatic RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
         //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(hfilename1_.fullPath(),""));
     //return pTCoder;
       file1 = hfilename1_.fullPath();
   } else {
         edm::LogInfo("Level1") << "Using analytical compression and RCT decompression for CaloTPGTranscoderULUTs HCAL initialization";
         //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT());
         //return pTCoder;
   }
   //std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(ietal, ietah, ZS, LUTfactor, RCTLSB, nominal_gain, file1, file2));
   std::auto_ptr<CaloTPGTranscoder> pTCoder(new CaloTPGTranscoderULUT(file1, file2));
   return pTCoder;
}
void CaloTPGTranscoderULUTs::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey iKey,
const edm::IOVSyncValue iTime,
edm::ValidityInterval oInterval 
) [inline, virtual]

Member Data Documentation

Definition at line 55 of file CaloTPGTranscoderULUTs.cc.

Referenced by produce().

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

Definition at line 63 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

Definition at line 64 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs().

Definition at line 57 of file CaloTPGTranscoderULUTs.cc.

Referenced by CaloTPGTranscoderULUTs(), and produce().

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