#include <CalibTracker/SiStripESProducers/plugins/fake/SiStripThresholdFakeESSource.h>
Public Member Functions | |
virtual std::auto_ptr < SiStripThreshold > | produce (const SiStripThresholdRcd &) |
SiStripThresholdFakeESSource (const edm::ParameterSet &) | |
virtual | ~SiStripThresholdFakeESSource () |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Member Functions | |
const SiStripThresholdFakeESSource & | operator= (const SiStripThresholdFakeESSource &) |
SiStripThresholdFakeESSource (const SiStripThresholdFakeESSource &) | |
Private Attributes | |
edm::FileInPath | fp_ |
float | hTh_ |
float | lTh_ |
Definition at line 20 of file SiStripThresholdFakeESSource.h.
SiStripThresholdFakeESSource::SiStripThresholdFakeESSource | ( | const edm::ParameterSet & | pset | ) |
Definition at line 9 of file SiStripThresholdFakeESSource.cc.
References edm::ESProducer::setWhatProduced().
00009 : 00010 fp_(pset.getParameter<edm::FileInPath>("file")), 00011 lTh_(pset.getParameter<double>("LowTh")), 00012 hTh_(pset.getParameter<double>("HighTh")){ 00013 00014 edm::LogInfo("SiStripThresholdFakeESSource::SiStripThresholdFakeESSource"); 00015 00016 setWhatProduced( this ); 00017 findingRecord<SiStripThresholdRcd>(); 00018 }
virtual SiStripThresholdFakeESSource::~SiStripThresholdFakeESSource | ( | ) | [inline, virtual] |
SiStripThresholdFakeESSource::SiStripThresholdFakeESSource | ( | const SiStripThresholdFakeESSource & | ) | [private] |
const SiStripThresholdFakeESSource& SiStripThresholdFakeESSource::operator= | ( | const SiStripThresholdFakeESSource & | ) | [private] |
std::auto_ptr< SiStripThreshold > SiStripThresholdFakeESSource::produce | ( | const SiStripThresholdRcd & | ) | [virtual] |
Definition at line 21 of file SiStripThresholdFakeESSource.cc.
References lat::endl(), fp_, edm::FileInPath::fullPath(), hTh_, it, LogDebug, lTh_, VarParsing::obj, SiStripThreshold::put(), SiStripThreshold::setData(), and strip().
00021 { 00022 00023 SiStripThreshold * obj = new SiStripThreshold(); 00024 00025 SiStripDetInfoFileReader reader(fp_.fullPath()); 00026 00027 const std::map<uint32_t, SiStripDetInfoFileReader::DetInfo > DetInfos = reader.getAllData(); 00028 00029 for(std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it = DetInfos.begin(); it != DetInfos.end(); it++){ 00030 //Generate Thresholds for det detid 00031 SiStripThreshold::Container theSiStripVector; 00032 uint16_t strip=0; 00033 float lTh = lTh_; 00034 float hTh = hTh_; 00035 00036 obj->setData(strip,lTh,hTh,theSiStripVector); 00037 LogDebug("SiStripThresholdFakeESSource::produce") <<"detid: " << it->first << " \t" 00038 << "firstStrip: " << strip << " \t" << theSiStripVector.back().getFirstStrip() << " \t" 00039 << "lTh: " << lTh << " \t" << theSiStripVector.back().getLth() << " \t" 00040 << "hTh: " << hTh << " \t" << theSiStripVector.back().getHth() << " \t" 00041 << "FirstStrip_and_Hth: " << theSiStripVector.back().FirstStrip_and_Hth << " \t" 00042 << std::endl; 00043 00044 if ( ! obj->put(it->first,theSiStripVector) ) 00045 edm::LogError("SiStripThresholdFakeESSource::produce ")<<" detid already exists"<<std::endl; 00046 } 00047 00048 return std::auto_ptr<SiStripThreshold>(obj); 00049 00050 }
void SiStripThresholdFakeESSource::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , | |
const edm::IOVSyncValue & | iosv, | |||
edm::ValidityInterval & | oValidity | |||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 53 of file SiStripThresholdFakeESSource.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
00055 { 00056 00057 edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() ); 00058 oValidity = infinity; 00059 00060 }
float SiStripThresholdFakeESSource::hTh_ [private] |
float SiStripThresholdFakeESSource::lTh_ [private] |