#include <CalibTracker/SiPixelESProducer/src/SiPixelQualityESProducer.cc>
Public Member Functions | |
std::auto_ptr< SiPixelQuality > | produce (const SiPixelQualityRcd &iRecord) |
SiPixelQualityESProducer (const edm::ParameterSet &iConfig) | |
~SiPixelQualityESProducer () | |
Protected Member Functions | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Types | |
typedef std::vector < edm::ParameterSet > | Parameters |
Private Attributes | |
edm::FileInPath | fp_ |
Parameters | toGet |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 40 of file SiPixelQualityESProducer.h.
typedef std::vector< edm::ParameterSet > SiPixelQualityESProducer::Parameters [private] |
Definition at line 59 of file SiPixelQualityESProducer.h.
SiPixelQualityESProducer::SiPixelQualityESProducer | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 38 of file SiPixelQualityESProducer.cc.
References edm::ESProducer::setWhatProduced().
: //fp_(conf_.getParameter<edm::FileInPath>("file")), toGet(conf_.getParameter<Parameters>("ListOfRecordToMerge")) { edm::LogInfo("SiPixelQualityESProducer::SiPixelQualityESProducer"); //the following line is needed to tell the framework what // data is being produced setWhatProduced(this); findingRecord<SiPixelQualityRcd>(); }
SiPixelQualityESProducer::~SiPixelQualityESProducer | ( | ) |
Definition at line 50 of file SiPixelQualityESProducer.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
std::auto_ptr< SiPixelQuality > SiPixelQualityESProducer::produce | ( | const SiPixelQualityRcd & | iRecord | ) |
Definition at line 58 of file SiPixelQualityESProducer.cc.
References edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), edm::ESHandle< T >::product(), ecalTPGAnalyzer_cfg::recordName, and toGet.
{ std::string recordName; // errortype "whole" = int 0 in DB BadRocs = 65535 // // errortype "tbmA" = int 1 in DB BadRocs = 255 // // errortype "tbmB" = int 2 in DB Bad Rocs = 65280 // // errortype "none" = int 3 in DB // //if I have understood this is the one got from the DB or file, but in any case the ORIGINAL(maybe i need to get the record for it) //SiPixelQuality * obj = new SiPixelQuality(); //SiPixelQuality::disabledModuleType BadModule; //BadModule.DetID = 1; BadModule.errorType = 0; BadModule.BadRocs = 65535; obj->addDisabledModule(BadModule); //start with the record thta existed already to decouple the debugging //here i can do whatever i need with the detVoff edm::ESHandle<SiStripDetVOff> Voff; edm::ESHandle<SiPixelQuality> dbobject; for( Parameters::iterator itToGet = toGet.begin(); itToGet != toGet.end(); ++itToGet ) { recordName = itToGet->getParameter<std::string>("record"); if (recordName=="SiPixelDetVOffRcd") iRecord.getRecord<SiPixelDetVOffRcd>().get(Voff); if (recordName=="SiPixelQualityFromDbRcd") iRecord.getRecord<SiPixelQualityFromDbRcd>().get(dbobject); } //end getting the records from the parameters //now the dbobject is the one copied from the db //here make a copy of dbobject, but now the label has to be empty not to interfeare with the Reco std::auto_ptr<SiPixelQuality> dbptr(new SiPixelQuality(*(dbobject))); //here is the magic line in which it switches off Bad Modules dbptr->add(Voff.product()); return dbptr; }
void SiPixelQualityESProducer::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | iosv, | ||
edm::ValidityInterval & | oValidity | ||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 101 of file SiPixelQualityESProducer.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
{ edm::ValidityInterval infinity( iosv.beginOfTime(), iosv.endOfTime() ); oValidity = infinity; }
edm::FileInPath SiPixelQualityESProducer::fp_ [private] |
Definition at line 58 of file SiPixelQualityESProducer.h.
Parameters SiPixelQualityESProducer::toGet [private] |
Definition at line 60 of file SiPixelQualityESProducer.h.
Referenced by produce().