CMS 3D CMS Logo

DTFakeT0ESProducer.cc
Go to the documentation of this file.
1 /*
2  * See header file for a description of this class.
3  *
4  * \author S. Bolognesi - INFN Torino
5  */
6 
7 // system include files
8 #include <memory>
9 
10 // user include files
13 
17 
21 
25 
26 using namespace std;
27 
29 {
30  //framework
31  setWhatProduced(this,&DTFakeT0ESProducer::produce);
32  // setWhatProduced(this,dependsOn(& DTGeometryESModule::parseDDD()));
33  findingRecord<DTT0Rcd>();
34 
35  //read constant value for t0 from cfg
36  t0Mean = pset.getParameter<double>("t0Mean");
37  t0Sigma = pset.getParameter<double>("t0Sigma");
38 }
39 
40 
42 }
43 
44 
45 // ------------ method called to produce the data ------------
47 
48  parseDDD(iRecord);
49  DTT0* t0Map = new DTT0();
50 
51  //Loop on layerId-nwires map
52  for(map<DTLayerId, pair <unsigned int,unsigned int> >::const_iterator lIdWire = theLayerIdWiresMap.begin();
53  lIdWire != theLayerIdWiresMap.end();
54  ++lIdWire){
55  int firstWire = ((*lIdWire).second).first;
56  int nWires = ((*lIdWire).second).second;
57  //Loop on wires of each layer
58  for(int wire=0; wire < nWires; wire++){
59  t0Map->set(DTWireId((*lIdWire).first, wire + firstWire), t0Mean, t0Sigma, DTTimeUnits::counts);
60  }
61  }
62 
63  return t0Map;
64 }
65 
67 
70 
71  iRecord.getRecord<IdealGeometryRecord>().get(cpv);
72  iRecord.getRecord<MuonNumberingRecord>().get(mdc);
73 
74  DTGeometryParserFromDDD parser(&(*cpv), *mdc, theLayerIdWiresMap);
75 }
76 
78  edm::ValidityInterval & oValidity){
80  }
81 
82 
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
Definition: DTT0.cc:140
T getParameter(std::string const &) const
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:97
std::pair< Time_t, Time_t > ValidityInterval
Definition: Time.h:19
U second(std::pair< T, U > const &p)
DTT0 * produce(const DTT0Rcd &iRecord)
Definition: DTT0.h:53
static const IOVSyncValue & beginOfTime()
void parseDDD(const DTT0Rcd &iRecord)
Definition: DTT0Rcd.h:9
DTFakeT0ESProducer(const edm::ParameterSet &pset)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &oValidity)