CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Friends
ChamberLocationSpec Struct Reference

#include <ChamberLocationSpec.h>

Public Member Functions

std::string chamberLocationName () const
 
std::string print (int depth=0) const
 debug printout More...
 

Public Attributes

char barrelOrEndcap
 
int diskOrWheel
 
char febZOrnt
 
char febZRadOrnt
 
int layer
 
int sector
 
char subsector
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 11 of file ChamberLocationSpec.h.

Member Function Documentation

std::string ChamberLocationSpec::chamberLocationName ( ) const

Definition at line 25 of file ChamberLocationSpec.cc.

References barrelOrEndcap, diskOrWheel, layer, prof2calltree::prefix, sector, AlCaHLTBitMon_QueryRunRegistry::string, and subsector.

Referenced by RPCReadOutMapping::getLBforChamber(), DBSpecToDetUnit::operator()(), and print().

25  {
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 }
std::string ChamberLocationSpec::print ( int  depth = 0) const

debug printout

Definition at line 4 of file ChamberLocationSpec.cc.

References barrelOrEndcap, chamberLocationName(), diskOrWheel, febZOrnt, febZRadOrnt, layer, sector, AlCaHLTBitMon_QueryRunRegistry::string, and subsector.

Referenced by FebConnectorSpec::print().

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 }
std::string chamberLocationName() const
template<class Archive >
void ChamberLocationSpec::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 26 of file ChamberLocationSpec.h.

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 26 of file ChamberLocationSpec.h.

Member Data Documentation

char ChamberLocationSpec::barrelOrEndcap

Definition at line 18 of file ChamberLocationSpec.h.

Referenced by chamberLocationName(), DBSpecToDetUnit::operator()(), and print().

int ChamberLocationSpec::diskOrWheel

Definition at line 12 of file ChamberLocationSpec.h.

Referenced by chamberLocationName(), DBSpecToDetUnit::operator()(), and print().

char ChamberLocationSpec::febZOrnt

Definition at line 16 of file ChamberLocationSpec.h.

Referenced by print().

char ChamberLocationSpec::febZRadOrnt

Definition at line 17 of file ChamberLocationSpec.h.

Referenced by print().

int ChamberLocationSpec::layer
int ChamberLocationSpec::sector
char ChamberLocationSpec::subsector

Definition at line 15 of file ChamberLocationSpec.h.

Referenced by chamberLocationName(), DBSpecToDetUnit::operator()(), and print().