CMS 3D CMS Logo

CSCFakeDBGains Class Reference

#include <CalibMuon/CSCCalibration/interface/CSCFakeDBGains.h>

Inheritance diagram for CSCFakeDBGains:

edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

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 CSCDBGainsprefillDBGains ()

Private Member Functions

void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)

Private Attributes

Pointer cndbGains


Detailed Description

Definition at line 22 of file CSCFakeDBGains.h.


Member Typedef Documentation

typedef boost::shared_ptr<CSCDBGains> CSCFakeDBGains::Pointer

Definition at line 29 of file CSCFakeDBGains.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 17 of file CSCFakeDBGains.cc.

00018 {
00019 }


Member Function Documentation

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().


Member Data Documentation

Pointer CSCFakeDBGains::cndbGains [private]

Definition at line 36 of file CSCFakeDBGains.h.

Referenced by CSCFakeDBGains(), and produceDBGains().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:17:18 2009 for CMSSW by  doxygen 1.5.4