#include <CSCFakeDBGains.h>
Public Types | |
typedef boost::shared_ptr < CSCDBGains > | Pointer |
Public Member Functions | |
CSCFakeDBGains (const edm::ParameterSet &) | |
Pointer | produceDBGains (const CSCDBGainsRcd &) |
~CSCFakeDBGains () | |
Static Public Member Functions | |
static CSCDBGains * | prefillDBGains () |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
Pointer | cndbGains |
Definition at line 22 of file CSCFakeDBGains.h.
typedef boost::shared_ptr<CSCDBGains> CSCFakeDBGains::Pointer |
Definition at line 29 of file CSCFakeDBGains.h.
CSCFakeDBGains::CSCFakeDBGains | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 6 of file CSCFakeDBGains.cc.
References cndbGains, prefillDBGains(), produceDBGains(), and edm::ESProducer::setWhatProduced().
{ cndbGains = boost::shared_ptr<CSCDBGains>( prefillDBGains() ); // the following line is needed to tell the framework what // data is being produced setWhatProduced(this, &CSCFakeDBGains::produceDBGains); findingRecord<CSCDBGainsRcd>(); }
CSCFakeDBGains::~CSCFakeDBGains | ( | ) |
Definition at line 17 of file CSCFakeDBGains.cc.
{ }
CSCDBGains * CSCFakeDBGains::prefillDBGains | ( | ) | [inline, static] |
Definition at line 45 of file CSCFakeDBGains.h.
References CSCDBGains::factor_gain, CSCDBGains::gains, i, timingPdfMaker::mean, and min.
Referenced by CSCFakeDBGains().
{ int seed; long int M; float mean,min, minchi; const int MAX_SIZE = 217728; //or 252288 for ME4/2 chambers const int FACTOR=1000; CSCDBGains* cndbgains = new CSCDBGains(); cndbgains->gains.resize(MAX_SIZE); seed = 10000; srand(seed); mean=6.8, min=-10.0, minchi=1.0, M=1000; cndbgains->factor_gain = int (FACTOR); for(int i=0; i<MAX_SIZE;i++){ cndbgains->gains[i].gain_slope= (short int) (((double)rand()/((double)(RAND_MAX)+(double)(1)))+mean*FACTOR+0.5); } return cndbgains; }
CSCFakeDBGains::Pointer CSCFakeDBGains::produceDBGains | ( | const CSCDBGainsRcd & | iRecord | ) |
Definition at line 23 of file CSCFakeDBGains.cc.
References cndbGains.
Referenced by CSCFakeDBGains().
{ return cndbGains; }
void CSCFakeDBGains::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | oValidity | ||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 28 of file CSCFakeDBGains.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
Pointer CSCFakeDBGains::cndbGains [private] |
Definition at line 36 of file CSCFakeDBGains.h.
Referenced by CSCFakeDBGains(), and produceDBGains().