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  * $Date: 2010/04/20 09:34:56 $
5  * $Revision: 1.3 $
6  * \author S. Bolognesi - INFN Torino
7  */
8 
9 // system include files
10 #include <memory>
11 #include "boost/shared_ptr.hpp"
12 
13 // user include files
16 
20 
24 
28 
29 using namespace std;
30 
32 {
33  //framework
34  setWhatProduced(this,&DTFakeT0ESProducer::produce);
35  // setWhatProduced(this,dependsOn(& DTGeometryESModule::parseDDD()));
36  findingRecord<DTT0Rcd>();
37 
38  //read constant value for t0 from cfg
39  t0Mean = pset.getParameter<double>("t0Mean");
40  t0Sigma = pset.getParameter<double>("t0Sigma");
41 }
42 
43 
45 }
46 
47 
48 // ------------ method called to produce the data ------------
50 
51  parseDDD(iRecord);
52  DTT0* t0Map = new DTT0();
53 
54  //Loop on layerId-nwires map
55  for(map<DTLayerId, pair <unsigned int,unsigned int> >::const_iterator lIdWire = theLayerIdWiresMap.begin();
56  lIdWire != theLayerIdWiresMap.end();
57  lIdWire++){
58  int firstWire = ((*lIdWire).second).first;
59  int nWires = ((*lIdWire).second).second;
60  //Loop on wires of each layer
61  for(int wire=0; wire < nWires; wire++){
62  t0Map->set(DTWireId((*lIdWire).first, wire + firstWire), t0Mean, t0Sigma, DTTimeUnits::counts);
63  }
64  }
65 
66  return t0Map;
67 }
68 
70 
73 
74  iRecord.getRecord<IdealGeometryRecord>().get(cpv);
75  iRecord.getRecord<MuonNumberingRecord>().get(mdc);
76 
77  DTGeometryParserFromDDD parser(&(*cpv), *mdc, theLayerIdWiresMap);
78 }
79 
81  edm::ValidityInterval & oValidity){
83  }
84 
85 
int set(int wheelId, int stationId, int sectorId, int slId, int layerId, int cellId, float t0mean, float t0rms, DTTimeUnits::type unit)
Definition: DTT0.cc:142
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:52
static const IOVSyncValue & beginOfTime()
bool first
Definition: L1TdeRCT.cc:94
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)