CMS 3D CMS Logo

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

◆ chamberLocationName()

std::string ChamberLocationSpec::chamberLocationName ( ) const

Definition at line 20 of file ChamberLocationSpec.cc.

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

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

20  {
21  std::ostringstream ocln;
22  std::string cln;
23  if (barrelOrEndcap == 1) {
24  std::string layerVal[6] = {"RB1in", "RB1out", "RB2in", "RB2out", "RB3", "RB4"};
25  std::string prefix = "W";
26  if (diskOrWheel > 0)
27  prefix = "W+";
28  std::string subsVal[5] = {"--", "-", "", "+", "++"};
29  ocln << prefix << diskOrWheel << "/" << layerVal[layer - 1] << "/" << sector << subsVal[subsector + 2];
30  } else {
31  std::string prefix = "RE";
32  if (diskOrWheel > 0)
33  prefix = "RE+";
34  ocln << prefix << diskOrWheel << "/" << layer << "/" << sector;
35  }
36  cln = ocln.str();
37  return cln;
38 }

◆ print()

std::string ChamberLocationSpec::print ( int  depth = 0) const

debug printout

Definition at line 4 of file ChamberLocationSpec.cc.

References barrelOrEndcap, chamberLocationName(), hcalRecHitTable_cff::depth, diskOrWheel, febZOrnt, febZRadOrnt, createfilelist::int, layer, sector, str, AlCaHLTBitMon_QueryRunRegistry::string, and subsector.

Referenced by FebConnectorSpec::print().

4  {
5  std::ostringstream str;
6  std::string subsVal[5] = {"--", "-", "0", "+", "++"}; // -2,-1,0,1,2
7  std::string febZVal[3] = {"-z", "+z"}; // 0,1
8  std::string febZRVal[3] = {"N/A", "IN", "OUT"}; // 0,1,2
9  std::string boeVal[2] = {"Endcap", "Barrel"}; // 0,1
10  if (depth >= 0) {
11  str << " ChamberLocationSpec: " << std::endl
12  << " --->DiskOrWheel: " << diskOrWheel << " Layer: " << layer << " Sector: " << sector
13  << " Subsector: " << subsVal[subsector + 2] << " ChamberLocationName: " << chamberLocationName()
14  << " FebZOrnt: " << febZVal[int(febZOrnt)] << " FebZRadOrnt: " << febZRVal[int(febZRadOrnt)]
15  << " BarrelOrEndcap: " << boeVal[int(barrelOrEndcap)];
16  }
17  return str.str();
18 }
std::string chamberLocationName() const
#define str(s)

◆ serialize()

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

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 25 of file ChamberLocationSpec.h.

◆ cond::serialization::access

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

Definition at line 25 of file ChamberLocationSpec.h.

Member Data Documentation

◆ barrelOrEndcap

char ChamberLocationSpec::barrelOrEndcap

Definition at line 18 of file ChamberLocationSpec.h.

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

◆ diskOrWheel

int ChamberLocationSpec::diskOrWheel

Definition at line 12 of file ChamberLocationSpec.h.

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

◆ febZOrnt

char ChamberLocationSpec::febZOrnt

Definition at line 16 of file ChamberLocationSpec.h.

Referenced by print().

◆ febZRadOrnt

char ChamberLocationSpec::febZRadOrnt

Definition at line 17 of file ChamberLocationSpec.h.

Referenced by print().

◆ layer

int ChamberLocationSpec::layer

◆ sector

int ChamberLocationSpec::sector

◆ subsector

char ChamberLocationSpec::subsector

Definition at line 15 of file ChamberLocationSpec.h.

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