CMS 3D CMS Logo

CSCChamberMapValues.h
Go to the documentation of this file.
1 #ifndef _CSCCHAMBERMAPVALUES_H
2 #define _CSCCHAMBERMAPVALUES_H
3 
4 #include <memory>
14 
21 
23  public:
25  ~CSCChamberMapValues() override;
26 
27  inline static CSCChamberMap * fillChamberMap();
28 
29  typedef const CSCChamberMap * ReturnType;
30 
31  ReturnType produceChamberMap(const CSCChamberMapRcd&);
32 
33  private:
34  // ----------member data ---------------------------
37 
38 };
39 
40 #include<fstream>
41 #include<vector>
42 #include<iostream>
43 
44 // to workaround plugin library
46 {
47  CSCChamberMap * mapobj = new CSCChamberMap();
48  cscmap1 *map = new cscmap1 ();
50 
51  int i,j,k,l; //i - endcap, j - station, k - ring, l - chamber.
52  int r,c; //r - number of rings, c - number of chambers.
53  int count=0;
54  int chamberid;
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) r=3;
60  //else if(j==4) r=1;
61  else r=2;
62  for(k=1;k<=r;++k){
63  if(j>1 && k==1) c=18;
64  else c=36;
65  for(l=1;l<=c;++l){
66  chamberid=i*100000+j*10000+k*1000+l*10;
67  map->chamber(chamberid,&item);
68  mapobj->ch_map[chamberid]=item;
69  count=count+1;
70  }
71  }
72  }
73  }
74  return mapobj;
75 }
76 
77 #endif
ReturnType produceChamberMap(const CSCChamberMapRcd &)
static CSCChamberMap * fillChamberMap()
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition: CSCMap1.cc:29
const CSCChamberMap * ReturnType
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
int k[5][pyjets_maxn]
Definition: CSCMap1.h:9
CSCChamberMap * mapObj
CSCChamberMapValues(const edm::ParameterSet &)