CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ChamberLocationSpec.cc
Go to the documentation of this file.
2 #include <sstream>
3 
4 std::string ChamberLocationSpec::print( int depth ) const
5 {
6  std::ostringstream str;
7  std::string subsVal[5]={"--","-","0","+","++"}; // -2,-1,0,1,2
8  std::string febZVal[3]={"-z","+z"}; // 0,1
9  std::string febZRVal[3]={"N/A","IN","OUT"}; // 0,1,2
10  std::string boeVal[2]={"Endcap","Barrel"}; // 0,1
11  if (depth >=0) {
12  str << " ChamberLocationSpec: " << std::endl
13  << " --->DiskOrWheel: " << diskOrWheel
14  << " Layer: " << layer
15  << " Sector: " << sector
16  << " Subsector: " << subsVal[subsector+2]
17  << " ChamberLocationName: " << chamberLocationName()
18  << " FebZOrnt: " << febZVal[int(febZOrnt)]
19  << " FebZRadOrnt: " << febZRVal[int(febZRadOrnt)]
20  << " BarrelOrEndcap: " << boeVal[int(barrelOrEndcap)];
21  }
22  return str.str();
23 }
24 
26  std::ostringstream ocln;
27  std::string cln;
28  if (barrelOrEndcap == 1) {
29  std::string layerVal[6]={"RB1in","RB1out","RB2in","RB2out","RB3","RB4"};
30  std::string prefix="W";
31  if (diskOrWheel > 0) prefix="W+";
32  std::string subsVal[5]={"--","-","","+","++"};
33  ocln << prefix<<diskOrWheel<<"/"<<layerVal[layer-1]<<"/"<<sector<<subsVal[subsector+2];
34  } else {
35  std::string prefix="RE";
36  if (diskOrWheel > 0) prefix="RE+";
37  ocln << prefix<<diskOrWheel<<"/"<<layer<<"/"<<sector;
38  }
39  cln=ocln.str();
40  return cln;
41 }
42 
std::string print(int depth=0) const
debug printout
std::string chamberLocationName() const