#include <CalibTracker/SiPixelESProducer/src/SiPixelFakeLorentzAngleESSource.cc>
Public Member Functions | |
virtual std::auto_ptr < SiPixelLorentzAngle > | produce (const SiPixelLorentzAngleRcd &) |
SiPixelFakeLorentzAngleESSource (const edm::ParameterSet &) | |
~SiPixelFakeLorentzAngleESSource () | |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
edm::FileInPath | fp_ |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 37 of file SiPixelFakeLorentzAngleESSource.h.
SiPixelFakeLorentzAngleESSource::SiPixelFakeLorentzAngleESSource | ( | const edm::ParameterSet & | conf_ | ) |
Definition at line 29 of file SiPixelFakeLorentzAngleESSource.cc.
References edm::ESProducer::setWhatProduced().
: fp_(conf_.getParameter<edm::FileInPath>("file")) { edm::LogInfo("SiPixelFakeLorentzAngleESSource::SiPixelFakeLorentzAngleESSource"); //the following line is needed to tell the framework what // data is being produced setWhatProduced(this); findingRecord<SiPixelLorentzAngleRcd>(); }
SiPixelFakeLorentzAngleESSource::~SiPixelFakeLorentzAngleESSource | ( | ) |
Definition at line 38 of file SiPixelFakeLorentzAngleESSource.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
std::auto_ptr< SiPixelLorentzAngle > SiPixelFakeLorentzAngleESSource::produce | ( | const SiPixelLorentzAngleRcd & | ) | [virtual] |
Definition at line 46 of file SiPixelFakeLorentzAngleESSource.cc.
References fp_, edm::FileInPath::fullPath(), SiPixelDetInfoFileReader::getAllDetIds(), and VarParsing::obj.
{ using namespace edm::es; unsigned int nmodules = 0; SiPixelLorentzAngle * obj = new SiPixelLorentzAngle(); SiPixelDetInfoFileReader reader(fp_.fullPath()); const std::vector<uint32_t> DetIds = reader.getAllDetIds(); // Loop over detectors for(std::vector<uint32_t>::const_iterator detit = DetIds.begin(); detit!=DetIds.end(); detit++) { nmodules++; float langle = 0.106; //std::cout << "detid " << (*detit) << std::endl; if( !obj->putLorentzAngle(*detit,langle) ) edm::LogError("SiPixelFakeLorentzAngleESSource")<<"[SiPixelFakeLorentzAngleESSource::produce] detid already exists"<<std::endl; } //std::cout << "Modules = " << nmodules << std::endl; return std::auto_ptr<SiPixelLorentzAngle>(obj); }
void SiPixelFakeLorentzAngleESSource::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | iosv, | ||
edm::ValidityInterval & | oValidity | ||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 71 of file SiPixelFakeLorentzAngleESSource.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
{ edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() ); oValidity = infinity; }
Definition at line 56 of file SiPixelFakeLorentzAngleESSource.h.
Referenced by produce().