CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

CSCFakeDBNoiseMatrix Class Reference

#include <CSCFakeDBNoiseMatrix.h>

Inheritance diagram for CSCFakeDBNoiseMatrix:
edm::ESProducer edm::EventSetupRecordIntervalFinder edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Types

typedef boost::shared_ptr
< CSCDBNoiseMatrix
Pointer

Public Member Functions

 CSCFakeDBNoiseMatrix (const edm::ParameterSet &)
Pointer produceDBNoiseMatrix (const CSCDBNoiseMatrixRcd &)
 ~CSCFakeDBNoiseMatrix ()

Static Public Member Functions

static CSCDBNoiseMatrixprefillDBNoiseMatrix ()

Private Member Functions

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

Private Attributes

Pointer cndbNoiseMatrix

Detailed Description

Definition at line 21 of file CSCFakeDBNoiseMatrix.h.


Member Typedef Documentation

typedef boost::shared_ptr<CSCDBNoiseMatrix> CSCFakeDBNoiseMatrix::Pointer

Definition at line 28 of file CSCFakeDBNoiseMatrix.h.


Constructor & Destructor Documentation

CSCFakeDBNoiseMatrix::CSCFakeDBNoiseMatrix ( const edm::ParameterSet iConfig)

Definition at line 6 of file CSCFakeDBNoiseMatrix.cc.

References cndbNoiseMatrix, prefillDBNoiseMatrix(), produceDBNoiseMatrix(), and edm::ESProducer::setWhatProduced().

{
  cndbNoiseMatrix = boost::shared_ptr<CSCDBNoiseMatrix> ( prefillDBNoiseMatrix() );  
  //tell the framework what data is being produced
  setWhatProduced(this,&CSCFakeDBNoiseMatrix::produceDBNoiseMatrix);  
  findingRecord<CSCDBNoiseMatrixRcd>();
}
CSCFakeDBNoiseMatrix::~CSCFakeDBNoiseMatrix ( )

Definition at line 15 of file CSCFakeDBNoiseMatrix.cc.

{
}

Member Function Documentation

CSCDBNoiseMatrix * CSCFakeDBNoiseMatrix::prefillDBNoiseMatrix ( ) [inline, static]

Definition at line 44 of file CSCFakeDBNoiseMatrix.h.

References CSCDBNoiseMatrix::factor_noise, i, and CSCDBNoiseMatrix::matrix.

Referenced by CSCFakeDBNoiseMatrix().

{
  int seed;
  const int MAX_SIZE = 252288; //or 252288 for ME4/2 chambers
  const int FACTOR=1000;
  
  CSCDBNoiseMatrix * cndbmatrix = new CSCDBNoiseMatrix();
  cndbmatrix->matrix.resize(MAX_SIZE);

  seed = 10000; 
  srand(seed);
  cndbmatrix->factor_noise = int (FACTOR);
  
  for(int i=0; i<MAX_SIZE;i++){
    cndbmatrix->matrix[i].elem33 = (short int) (10.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem34 = (short int) (4.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem35 = (short int) (3.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem44 = (short int) (10.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem45 = (short int) (8.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem46 = (short int) (2.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem55 = (short int) (10.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem56 = (short int) (5.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem57 = (short int) (3.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem66 = (short int) (10.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem67 = (short int) (4.0*FACTOR+0.5);
    cndbmatrix->matrix[i].elem77 = (short int) (10.0*FACTOR+0.5);
  }
  return cndbmatrix;
}  
CSCFakeDBNoiseMatrix::Pointer CSCFakeDBNoiseMatrix::produceDBNoiseMatrix ( const CSCDBNoiseMatrixRcd iRecord)

Definition at line 21 of file CSCFakeDBNoiseMatrix.cc.

References cndbNoiseMatrix.

Referenced by CSCFakeDBNoiseMatrix().

{
  return cndbNoiseMatrix;
}
void CSCFakeDBNoiseMatrix::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey ,
const edm::IOVSyncValue ,
edm::ValidityInterval oValidity 
) [private, virtual]

Member Data Documentation

Definition at line 35 of file CSCFakeDBNoiseMatrix.h.

Referenced by CSCFakeDBNoiseMatrix(), and produceDBNoiseMatrix().