CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCChamberIndexValues.h
Go to the documentation of this file.
1 #ifndef _CSCCHAMBERINDEXVALUES_H
2 #define _CSCCHAMBERINDEXVALUES_H
3 
4 #include <memory>
14 
21 
23  public:
26 
27  inline static CSCChamberIndex * fillChamberIndex();
28 
29  typedef const CSCChamberIndex * ReturnType;
30 
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  CSCChamberIndex * mapobj = new CSCChamberIndex();
48  cscmap1 *map = new cscmap1();
50  int chamberid;
51 
52  int i,j,k,l; //i - endcap, j - station, k - ring, l - chamber.
53  int r,c; //r - number of rings, c - number of chambers.
54  int count=0;
55 
56  mapobj->ch_index.resize(540);
57  /* This is version for 540 chambers. */
58  for(i=1;i<=2;++i){
59  for(j=1;j<=4;++j){
60  if(j==1) r=3;
61  //else if(j==4) r=1;
62  else r=2;
63  for(k=1;k<=r;++k){
64  if(j>1 && k==1) c=18;
65  else c=36;
66  for(l=1;l<=c;++l){
67  chamberid=i*100000+j*10000+k*1000+l*10;
68  map->chamber(chamberid,&item);
69  mapobj->ch_index[item.cscIndex-1]=item;
70  count=count+1;
71  }
72  }
73  }
74  }
75  return mapobj;
76 }
77 
78 #endif
int i
Definition: DBlmapReader.cc:9
ReturnType produceChamberIndex(const CSCChamberIndexRcd &)
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
CSCVector ch_index
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition: CSCMap1.cc:29
CSCChamberIndexValues(const edm::ParameterSet &)
int j
Definition: DBlmapReader.cc:9
const CSCChamberIndex * ReturnType
int k[5][pyjets_maxn]
Definition: CSCMap1.h:9
static CSCChamberIndex * fillChamberIndex()