#include <CalibMuon/CSCCalibration/interface/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().
00007 { 00008 cndbGains = boost::shared_ptr<CSCDBGains>( prefillDBGains() ); 00009 00010 // the following line is needed to tell the framework what 00011 // data is being produced 00012 setWhatProduced(this, &CSCFakeDBGains::produceDBGains); 00013 findingRecord<CSCDBGainsRcd>(); 00014 }
CSCFakeDBGains::~CSCFakeDBGains | ( | ) |
CSCDBGains * CSCFakeDBGains::prefillDBGains | ( | ) | [inline, static] |
Definition at line 45 of file CSCFakeDBGains.h.
References CSCDBGains::factor_gain, CSCDBGains::gains, i, int, mean(), and min.
Referenced by CSCFakeDBGains().
00046 { 00047 int seed; 00048 long int M; 00049 float mean,min, minchi; 00050 const int MAX_SIZE = 217728; //or 252288 for ME4/2 chambers 00051 const int FACTOR=1000; 00052 00053 CSCDBGains* cndbgains = new CSCDBGains(); 00054 cndbgains->gains.resize(MAX_SIZE); 00055 00056 seed = 10000; 00057 srand(seed); 00058 mean=6.8, min=-10.0, minchi=1.0, M=1000; 00059 cndbgains->factor_gain = int (FACTOR); 00060 00061 for(int i=0; i<MAX_SIZE;i++){ 00062 cndbgains->gains[i].gain_slope= (short int) (((double)rand()/((double)(RAND_MAX)+(double)(1)))+mean*FACTOR+0.5); 00063 } 00064 return cndbgains; 00065 }
CSCFakeDBGains::Pointer CSCFakeDBGains::produceDBGains | ( | const CSCDBGainsRcd & | iRecord | ) |
Definition at line 23 of file CSCFakeDBGains.cc.
References cndbGains.
Referenced by CSCFakeDBGains().
00024 { 00025 return cndbGains; 00026 }
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().
00030 { 00031 oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); 00032 }
Pointer CSCFakeDBGains::cndbGains [private] |
Definition at line 36 of file CSCFakeDBGains.h.
Referenced by CSCFakeDBGains(), and produceDBGains().