CMS 3D CMS Logo

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:
25  ~CSCChamberIndexValues() override;
26 
27  typedef std::unique_ptr<CSCChamberIndex> ReturnType;
28 
29  inline static CSCChamberIndex * fillChamberIndex();
30 
31  ReturnType produceChamberIndex(const CSCChamberIndexRcd&);
32 
33  private:
34  // ----------member data ---------------------------
36 };
37 
38 #include<fstream>
39 #include<vector>
40 #include<iostream>
41 
42 // to workaround plugin library
44 {
45  CSCChamberIndex * mapobj = new CSCChamberIndex();
46  cscmap1 map;
48  int chamberid;
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 
54  mapobj->ch_index.resize(540);
55  /* This is version for 540 chambers. */
56  for(i=1;i<=2;++i){
57  for(j=1;j<=4;++j){
58  if(j==1) r=3;
59  //else if(j==4) r=1;
60  else r=2;
61  for(k=1;k<=r;++k){
62  if(j>1 && k==1) c=18;
63  else c=36;
64  for(l=1;l<=c;++l){
65  chamberid=i*100000+j*10000+k*1000+l*10;
66  map.chamber(chamberid,&item);
67  mapobj->ch_index[item.cscIndex-1]=item;
68  count=count+1;
69  }
70  }
71  }
72  }
73  return mapobj;
74 }
75 
76 #endif
ReturnType produceChamberIndex(const CSCChamberIndexRcd &)
CSCVector ch_index
void chamber(int chamberid, CSCMapItem::MapItem *item)
Definition: CSCMap1.cc:29
std::unique_ptr< CSCChamberIndex > ReturnType
CSCChamberIndexValues(const edm::ParameterSet &)
int k[5][pyjets_maxn]
Definition: CSCMap1.h:9
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
static CSCChamberIndex * fillChamberIndex()