#include <CSCFakeDBPedestals.h>
Public Types | |
typedef boost::shared_ptr < CSCDBPedestals > | Pointer |
Public Member Functions | |
CSCFakeDBPedestals (const edm::ParameterSet &) | |
Pointer | produceDBPedestals (const CSCDBPedestalsRcd &) |
~CSCFakeDBPedestals () | |
Static Public Member Functions | |
static CSCDBPedestals * | prefillDBPedestals () |
Private Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
Private Attributes | |
Pointer | cndbPedestals |
Definition at line 21 of file CSCFakeDBPedestals.h.
typedef boost::shared_ptr<CSCDBPedestals> CSCFakeDBPedestals::Pointer |
Definition at line 28 of file CSCFakeDBPedestals.h.
CSCFakeDBPedestals::CSCFakeDBPedestals | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 6 of file CSCFakeDBPedestals.cc.
References cndbPedestals, prefillDBPedestals(), produceDBPedestals(), and edm::ESProducer::setWhatProduced().
{ cndbPedestals = boost::shared_ptr<CSCDBPedestals> ( prefillDBPedestals() ); //the following line is needed to tell the framework what // data is being produced setWhatProduced(this,&CSCFakeDBPedestals::produceDBPedestals); findingRecord<CSCDBPedestalsRcd>(); }
CSCFakeDBPedestals::~CSCFakeDBPedestals | ( | ) |
Definition at line 17 of file CSCFakeDBPedestals.cc.
{ }
CSCDBPedestals * CSCFakeDBPedestals::prefillDBPedestals | ( | ) | [inline, static] |
Definition at line 44 of file CSCFakeDBPedestals.h.
References CSCDBPedestals::factor_ped, CSCDBPedestals::factor_rms, i, and CSCDBPedestals::pedestals.
Referenced by CSCFakeDBPedestals().
{ int seed; long int M; float meanped,meanrms; const int MAX_SIZE = 217728; //or 252288 for ME4/2 chambers const int PED_FACTOR=10; const int RMS_FACTOR=1000; CSCDBPedestals * cndbpedestals = new CSCDBPedestals(); cndbpedestals->pedestals.resize(MAX_SIZE); seed = 10000; srand(seed); meanped=600.0, meanrms=1.5, M=1000; cndbpedestals->factor_ped = int (PED_FACTOR); cndbpedestals->factor_rms = int (RMS_FACTOR); for(int i=0; i<MAX_SIZE;i++){ cndbpedestals->pedestals[i].ped=(short int) (((double)rand()/((double)(RAND_MAX)+(double)(1)))*100+meanped*PED_FACTOR+0.5); cndbpedestals->pedestals[i].rms= (short int) (((double)rand()/((double)(RAND_MAX)+(double)(1)))+meanrms*RMS_FACTOR+0.5); } return cndbpedestals; }
CSCFakeDBPedestals::Pointer CSCFakeDBPedestals::produceDBPedestals | ( | const CSCDBPedestalsRcd & | iRecord | ) |
Definition at line 23 of file CSCFakeDBPedestals.cc.
References cndbPedestals.
Referenced by CSCFakeDBPedestals().
{ return cndbPedestals; }
void CSCFakeDBPedestals::setIntervalFor | ( | const edm::eventsetup::EventSetupRecordKey & | , |
const edm::IOVSyncValue & | , | ||
edm::ValidityInterval & | oValidity | ||
) | [private, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 28 of file CSCFakeDBPedestals.cc.
References edm::IOVSyncValue::beginOfTime(), and edm::IOVSyncValue::endOfTime().
{ oValidity = edm::ValidityInterval(edm::IOVSyncValue::beginOfTime(),edm::IOVSyncValue::endOfTime()); }
Pointer CSCFakeDBPedestals::cndbPedestals [private] |
Definition at line 36 of file CSCFakeDBPedestals.h.
Referenced by CSCFakeDBPedestals(), and produceDBPedestals().