CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCDDUMapValues.h
Go to the documentation of this file.
1 #ifndef _CSCDDUMAPVALUES_H
2 #define _CSCDDUMAPVALUES_H
3 
4 #include <memory>
14 
21 
23 public:
25  ~CSCDDUMapValues() override;
26 
27  typedef std::unique_ptr<CSCDDUMap> ReturnType;
28 
29  inline static CSCDDUMap *fillDDUMap();
30 
32 
33 private:
34  // ----------member data ---------------------------
36  const edm::IOVSyncValue &,
37  edm::ValidityInterval &) override;
38 };
39 
40 #include <fstream>
41 #include <vector>
42 #include <iostream>
43 
44 // to workaround plugin library
46  CSCDDUMap *mapobj = new CSCDDUMap();
47  cscmap1 map;
49 
50  int i, j, k, l; //i - endcap, j - station, k - ring, l - chamber.
51  int r, c; //r - number of rings, c - number of chambers.
52  int count = 0;
53  int chamberid;
54  int ddu_ddu_input;
55 
56  /* This is version for 540 chambers. */
57  for (i = 1; i <= 2; ++i) {
58  for (j = 1; j <= 4; ++j) {
59  if (j == 1)
60  r = 3;
61  else
62  r = 2;
63  for (k = 1; k <= r; ++k) {
64  if (j > 1 && k == 1)
65  c = 18;
66  else
67  c = 36;
68  for (l = 1; l <= c; ++l) {
69  chamberid = i * 100000 + j * 10000 + k * 1000 + l * 10;
70  map.chamber(chamberid, &item);
71  ddu_ddu_input = item.ddu * 100 + item.ddu_input;
72  mapobj->ddu_map[ddu_ddu_input] = item;
73  count = count + 1;
74  }
75  }
76  }
77  }
78  return mapobj;
79 }
80 
81 #endif
CSCMap ddu_map
Definition: CSCDDUMap.h:17
const edm::EventSetup & c
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
~CSCDDUMapValues() override
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition: CSCMap1.cc:27
CSCDDUMapValues(const edm::ParameterSet &)
std::unique_ptr< CSCDDUMap > ReturnType
Definition: CSCMap1.h:9
static CSCDDUMap * fillDDUMap()
CSCDDUMapValues::ReturnType produceDDUMap(const CSCDDUMapRcd &)