CMS 3D CMS Logo

CaloMiscalibTools Class Reference

Description: Definition of CaloMiscalibTools. More...

#include <CalibCalorimetry/CaloMiscalibTools/interface/CaloMiscalibTools.h>

Inheritance diagram for CaloMiscalibTools:

edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef const
EcalIntercalibConstants
ReturnType

Public Member Functions

 CaloMiscalibTools (const edm::ParameterSet &)
ReturnType produce (const EcalIntercalibConstantsRcd &)
 ~CaloMiscalibTools ()

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Private Attributes

std::string barrelfile_
std::string barrelfileinpath_
std::string endcapfile_
std::string endcapfileinpath_
CaloMiscalibMapEcal map_


Detailed Description

Description: Definition of CaloMiscalibTools.

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

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

Definition at line 51 of file CaloMiscalibTools.h.


Member Typedef Documentation

typedef const EcalIntercalibConstants* CaloMiscalibTools::ReturnType

Definition at line 56 of file CaloMiscalibTools.h.


Constructor & Destructor Documentation

CaloMiscalibTools::CaloMiscalibTools ( const edm::ParameterSet iConfig  ) 

Definition at line 37 of file CaloMiscalibTools.cc.

References barrelfile_, barrelfileinpath_, GenMuonPlsPt100GeV_cfg::cout, endcapfile_, endcapfileinpath_, lat::endl(), edm::FileInPath::fullPath(), edm::ParameterSet::getUntrackedParameter(), map_, CaloMiscalibMapEcal::prefillMap(), produce(), and edm::ESProducer::setWhatProduced().

00038 {
00039    //the following line is needed to tell the framework what
00040    // data is being produced
00041   map_.prefillMap();
00042 
00043   barrelfileinpath_=iConfig.getUntrackedParameter<std::string> ("fileNameBarrel","");
00044   endcapfileinpath_=iConfig.getUntrackedParameter<std::string> ("fileNameEndcap","");
00045 
00046   edm::FileInPath barrelfiletmp("CalibCalorimetry/CaloMiscalibTools/data/"+barrelfileinpath_);
00047   edm::FileInPath endcapfiletmp("CalibCalorimetry/CaloMiscalibTools/data/"+endcapfileinpath_);
00048   
00049   
00050   barrelfile_=barrelfiletmp.fullPath();
00051   endcapfile_=endcapfiletmp.fullPath();
00052 
00053   std::cout <<"Barrel file is:"<< barrelfile_<<std::endl;
00054   std::cout <<"endcap file is:"<< endcapfile_<<std::endl;
00055 
00056 
00057    // added by Zhen (changed since 1_2_0)
00058    setWhatProduced(this,&CaloMiscalibTools::produce);
00059    findingRecord<EcalIntercalibConstantsRcd>();
00060    //now do what ever other initialization is needed
00061 }

CaloMiscalibTools::~CaloMiscalibTools (  ) 

Definition at line 64 of file CaloMiscalibTools.cc.

00065 {
00066  
00067    // do anything here that needs to be done at desctruction time
00068    // (e.g. close files, deallocate resources etc.)
00069 
00070 }


Member Function Documentation

CaloMiscalibTools::ReturnType CaloMiscalibTools::produce ( const EcalIntercalibConstantsRcd iRecord  ) 

Definition at line 79 of file CaloMiscalibTools.cc.

References barrelfile_, endcapfile_, CaloMiscalibMapEcal::get(), map_, MiscalibReaderFromXML::parseXMLMiscalibFile(), CaloMiscalibMapEcal::prefillMap(), and CaloMiscalibMapEcal::print().

Referenced by CaloMiscalibTools().

00080 {
00081     map_.prefillMap();
00082     MiscalibReaderFromXMLEcalBarrel barrelreader_(map_);
00083     MiscalibReaderFromXMLEcalEndcap endcapreader_(map_);
00084     if(!barrelfile_.empty()) barrelreader_.parseXMLMiscalibFile(barrelfile_);
00085     if(!endcapfile_.empty())endcapreader_.parseXMLMiscalibFile(endcapfile_);
00086     map_.print();
00087     // Added by Zhen, need a new object so to not be deleted at exit
00088     //    std::cout<<"about to copy"<<std::endl;
00089     EcalIntercalibConstants* mydata=new EcalIntercalibConstants(map_.get());
00090     //    std::cout<<"mydata "<<mydata<<std::endl;
00091     return mydata;
00092 }

void CaloMiscalibTools::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 94 of file CaloMiscalibTools.cc.

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


Member Data Documentation

std::string CaloMiscalibTools::barrelfile_ [private]

Definition at line 64 of file CaloMiscalibTools.h.

Referenced by CaloMiscalibTools(), and produce().

std::string CaloMiscalibTools::barrelfileinpath_ [private]

Definition at line 66 of file CaloMiscalibTools.h.

Referenced by CaloMiscalibTools().

std::string CaloMiscalibTools::endcapfile_ [private]

Definition at line 65 of file CaloMiscalibTools.h.

Referenced by CaloMiscalibTools(), and produce().

std::string CaloMiscalibTools::endcapfileinpath_ [private]

Definition at line 67 of file CaloMiscalibTools.h.

Referenced by CaloMiscalibTools().

CaloMiscalibMapEcal CaloMiscalibTools::map_ [private]

Definition at line 63 of file CaloMiscalibTools.h.

Referenced by CaloMiscalibTools(), and produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:46 2009 for CMSSW by  doxygen 1.5.4