CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCCrateMapValues.h
Go to the documentation of this file.
1 #ifndef _CSCCRATEMAPVALUES_H
2 #define _CSCCRATEMAPVALUES_H
3 
4 #include <memory>
14 
21 
23  public:
26 
27  inline static CSCCrateMap * fillCrateMap();
28 
29  typedef const CSCCrateMap * 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  CSCCrateMap * mapobj = new CSCCrateMap();
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  int crate_cscid;
56 
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  crate_cscid=item.crateid*10+item.cscid;
70  mapobj->crate_map[crate_cscid]=item;
71  count=count+1;
72  }
73  }
74  }
75  }
76  return mapobj;
77 }
78 
79 
80 #endif
int i
Definition: DBlmapReader.cc:9
CSCCrateMapValues(const edm::ParameterSet &)
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition: CSCMap1.cc:29
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &)
static CSCCrateMap * fillCrateMap()
int j
Definition: DBlmapReader.cc:9
Definition: CSCMap1.h:9
CSCCrateMap * mapObj
CSCMap crate_map
Definition: CSCCrateMap.h:25
const CSCCrateMap * ReturnType
ReturnType produceCrateMap(const CSCCrateMapRcd &)