CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #include "boost/shared_ptr.hpp"
10 
11 // user include files
14 
18 
22 
26 
27 using namespace std;
28 
30 {
31  //framework
32  setWhatProduced(this,&DTFakeT0ESProducer::produce);
33  // setWhatProduced(this,dependsOn(& DTGeometryESModule::parseDDD()));
34  findingRecord<DTT0Rcd>();
35 
36  //read constant value for t0 from cfg
37  t0Mean = pset.getParameter<double>("t0Mean");
38  t0Sigma = pset.getParameter<double>("t0Sigma");
39 }
40 
41 
43 }
44 
45 
46 // ------------ method called to produce the data ------------
48 
49  parseDDD(iRecord);
50  DTT0* t0Map = new DTT0();
51 
52  //Loop on layerId-nwires map
53  for(map<DTLayerId, pair <unsigned int,unsigned int> >::const_iterator lIdWire = theLayerIdWiresMap.begin();
54  lIdWire != theLayerIdWiresMap.end();
55  ++lIdWire){
56  int firstWire = ((*lIdWire).second).first;
57  int nWires = ((*lIdWire).second).second;
58  //Loop on wires of each layer
59  for(int wire=0; wire < nWires; wire++){
60  t0Map->set(DTWireId((*lIdWire).first, wire + firstWire), t0Mean, t0Sigma, DTTimeUnits::counts);
61  }
62  }
63 
64  return t0Map;
65 }
66 
68 
71 
72  iRecord.getRecord<IdealGeometryRecord>().get(cpv);
73  iRecord.getRecord<MuonNumberingRecord>().get(mdc);
74 
75  DTGeometryParserFromDDD parser(&(*cpv), *mdc, theLayerIdWiresMap);
76 }
77 
79  edm::ValidityInterval & oValidity){
81  }
82 
83 
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)