CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

DTFakeT0ESProducer Class Reference

#include <DTFakeT0ESProducer.h>

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

List of all members.

Public Member Functions

 DTFakeT0ESProducer (const edm::ParameterSet &pset)
DTT0produce (const DTT0Rcd &iRecord)
virtual ~DTFakeT0ESProducer ()

Private Member Functions

void parseDDD (const DTT0Rcd &iRecord)
void setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &oValidity)

Private Attributes

double t0Mean
double t0Sigma
std::map< DTLayerId, std::pair
< unsigned int, unsigned int > > 
theLayerIdWiresMap

Detailed Description

Definition at line 34 of file DTFakeT0ESProducer.h.


Constructor & Destructor Documentation

DTFakeT0ESProducer::DTFakeT0ESProducer ( const edm::ParameterSet pset)

Definition at line 31 of file DTFakeT0ESProducer.cc.

References edm::ParameterSet::getParameter(), and produce().

{
  //framework
  setWhatProduced(this,&DTFakeT0ESProducer::produce);
  //  setWhatProduced(this,dependsOn(& DTGeometryESModule::parseDDD()));
  findingRecord<DTT0Rcd>();
  
  //read constant value for t0 from cfg
  t0Mean = pset.getParameter<double>("t0Mean");
  t0Sigma = pset.getParameter<double>("t0Sigma");
}
DTFakeT0ESProducer::~DTFakeT0ESProducer ( ) [virtual]

Definition at line 44 of file DTFakeT0ESProducer.cc.

                                       {
}

Member Function Documentation

void DTFakeT0ESProducer::parseDDD ( const DTT0Rcd iRecord) [private]
DTT0 * DTFakeT0ESProducer::produce ( const DTT0Rcd iRecord)

Definition at line 49 of file DTFakeT0ESProducer.cc.

References DTTimeUnits::counts, first, edm::second(), and DTT0::set().

Referenced by DTFakeT0ESProducer().

                                                       {
  
  parseDDD(iRecord);
  DTT0* t0Map = new DTT0();
  
  //Loop on layerId-nwires map
 for(map<DTLayerId, pair <unsigned int,unsigned int> >::const_iterator lIdWire = theLayerIdWiresMap.begin();
     lIdWire != theLayerIdWiresMap.end();
     lIdWire++){
   int firstWire = ((*lIdWire).second).first;
   int nWires = ((*lIdWire).second).second;
   //Loop on wires of each layer
   for(int wire=0; wire < nWires; wire++){
     t0Map->set(DTWireId((*lIdWire).first, wire + firstWire), t0Mean, t0Sigma, DTTimeUnits::counts);
   }
 }

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

Member Data Documentation

double DTFakeT0ESProducer::t0Mean [private]

Definition at line 54 of file DTFakeT0ESProducer.h.

double DTFakeT0ESProducer::t0Sigma [private]

Definition at line 55 of file DTFakeT0ESProducer.h.

std::map<DTLayerId,std::pair<unsigned int,unsigned int> > DTFakeT0ESProducer::theLayerIdWiresMap [private]

Definition at line 51 of file DTFakeT0ESProducer.h.