CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Friends
cscdqm::Address Struct Reference

Structure to store detector addresses of any granularity: from whole detector to the single HV element. More...

#include <CSCDQM_Detector.h>

Public Member Functions

const std::string name () const
 Get the full name of the address prefixed with CSC_. It is being used by summaryReportContent variables. More...
 
const bool operator== (const Address &a) const
 

Public Attributes

unsigned int cfeb
 
unsigned int chamber
 
unsigned int hv
 
unsigned int layer
 
AddressMask mask
 
unsigned int ring
 
unsigned int side
 
unsigned int station
 

Friends

std::ostream & operator<< (std::ostream &out, const Address &adr)
 

Detailed Description

Structure to store detector addresses of any granularity: from whole detector to the single HV element.

Definition at line 82 of file CSCDQM_Detector.h.

Member Function Documentation

◆ name()

const std::string cscdqm::Address::name ( void  ) const
inline

Get the full name of the address prefixed with CSC_. It is being used by summaryReportContent variables.

Returns
Address name as string

Definition at line 120 of file CSCDQM_Detector.h.

120  {
121  std::ostringstream oss;
122  oss << "CSC";
123  if (mask.side) {
124  oss << "_Side" << (side == 1 ? "Plus" : "Minus");
125  if (mask.station) {
126  oss << "_Station" << std::setfill('0') << std::setw(2) << station;
127  if (mask.ring) {
128  oss << "_Ring" << std::setfill('0') << std::setw(2) << ring;
129  if (mask.chamber) {
130  oss << "_Chamber" << std::setfill('0') << std::setw(2) << chamber;
131  if (mask.layer) {
132  oss << "_Layer" << std::setfill('0') << std::setw(2) << layer;
133  if (mask.cfeb) {
134  oss << "_CFEB" << std::setfill('0') << std::setw(2) << cfeb;
135  if (mask.hv) {
136  oss << "_HV" << std::setfill('0') << std::setw(2) << hv;
137  }
138  }
139  }
140  }
141  }
142  }
143  }
144  return oss.str();
145  }

References cscdqm::AddressMask::cfeb, cfeb, cscdqm::AddressMask::chamber, chamber, cscdqm::AddressMask::hv, hv, cscdqm::AddressMask::layer, layer, mask, cscdqm::AddressMask::ring, ring, cscdqm::AddressMask::side, side, cscdqm::AddressMask::station, and station.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

◆ operator==()

const bool cscdqm::Address::operator== ( const Address a) const
inline

Definition at line 93 of file CSCDQM_Detector.h.

93  {
94  if (mask.side == a.mask.side && mask.side == true && side != a.side)
95  return false;
96  if (mask.station == a.mask.station && mask.station == true && station != a.station)
97  return false;
98  if (mask.ring == a.mask.ring && mask.ring == true && ring != a.ring)
99  return false;
100  if (mask.chamber == a.mask.chamber && mask.chamber == true && chamber != a.chamber)
101  return false;
102  if (mask.layer == a.mask.layer && mask.layer == true && layer != a.layer)
103  return false;
104  if (mask.cfeb == a.mask.cfeb && mask.cfeb == true && cfeb != a.cfeb)
105  return false;
106  if (mask.hv == a.mask.hv && mask.hv == true && hv != a.hv)
107  return false;
108  return true;
109  };

References a, cscdqm::AddressMask::cfeb, cfeb, cscdqm::AddressMask::chamber, chamber, cscdqm::AddressMask::hv, hv, cscdqm::AddressMask::layer, layer, mask, cscdqm::AddressMask::ring, ring, cscdqm::AddressMask::side, side, cscdqm::AddressMask::station, and station.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Address adr 
)
friend

Definition at line 111 of file CSCDQM_Detector.h.

111  {
112  out << adr.name();
113  return out;
114  }

Member Data Documentation

◆ cfeb

unsigned int cscdqm::Address::cfeb

◆ chamber

unsigned int cscdqm::Address::chamber

◆ hv

unsigned int cscdqm::Address::hv

◆ layer

unsigned int cscdqm::Address::layer

◆ mask

AddressMask cscdqm::Address::mask

◆ ring

unsigned int cscdqm::Address::ring

◆ side

unsigned int cscdqm::Address::side

◆ station

unsigned int cscdqm::Address::station
cscdqm::AddressMask::chamber
bool chamber
Definition: CSCDQM_Detector.h:72
cscdqm::Address::side
unsigned int side
Definition: CSCDQM_Detector.h:83
cscdqm::Address::layer
unsigned int layer
Definition: CSCDQM_Detector.h:87
cscdqm::Address::station
unsigned int station
Definition: CSCDQM_Detector.h:84
a
double a
Definition: hdecay.h:119
cscdqm::Address::mask
AddressMask mask
Definition: CSCDQM_Detector.h:91
cscdqm::Address::cfeb
unsigned int cfeb
Definition: CSCDQM_Detector.h:88
cscdqm::AddressMask::cfeb
bool cfeb
Definition: CSCDQM_Detector.h:74
cscdqm::AddressMask::side
bool side
Definition: CSCDQM_Detector.h:69
cscdqm::AddressMask::station
bool station
Definition: CSCDQM_Detector.h:70
cscdqm::AddressMask::ring
bool ring
Definition: CSCDQM_Detector.h:71
cscdqm::AddressMask::layer
bool layer
Definition: CSCDQM_Detector.h:73
cscdqm::Address::hv
unsigned int hv
Definition: CSCDQM_Detector.h:89
cscdqm::Address::chamber
unsigned int chamber
Definition: CSCDQM_Detector.h:86
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
cscdqm::AddressMask::hv
bool hv
Definition: CSCDQM_Detector.h:75
cscdqm::Address::ring
unsigned int ring
Definition: CSCDQM_Detector.h:85