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 | 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 Addressoperator= (const Address &a)
 
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

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 132 of file CSCDQM_Detector.h.

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 cuy.divideElement::__init__(), cuy.plotElement::__init__(), cuy.additionElement::__init__(), cuy.superimposeElement::__init__(), cuy.graphElement::__init__(), config.CFG::__str__(), validation.Sample::digest(), VIDSelectorBase.VIDSelectorBase::initialize(), and Vispa.Views.PropertyView.Property::valueChanged().

132  {
133  std::ostringstream oss;
134  oss << "CSC";
135  if (mask.side) {
136  oss << "_Side" << (side == 1 ? "Plus" : "Minus");
137  if (mask.station) {
138  oss << "_Station" << std::setfill('0') << std::setw(2) << station;
139  if (mask.ring) {
140  oss << "_Ring" << std::setfill('0') << std::setw(2) << ring;
141  if (mask.chamber) {
142  oss << "_Chamber" << std::setfill('0') << std::setw(2) << chamber;
143  if (mask.layer) {
144  oss << "_Layer" << std::setfill('0') << std::setw(2) << layer;
145  if (mask.cfeb) {
146  oss << "_CFEB" << std::setfill('0') << std::setw(2) << cfeb;
147  if (mask.hv) {
148  oss << "_HV" << std::setfill('0') << std::setw(2) << hv;
149  }
150  }
151  }
152  }
153  }
154  }
155  }
156  return oss.str();
157  }
unsigned int layer
unsigned int cfeb
unsigned int chamber
unsigned int hv
unsigned int station
AddressMask mask
unsigned int side
unsigned int ring
const Address* cscdqm::Address::operator= ( const Address a)
inline

Definition at line 105 of file CSCDQM_Detector.h.

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.

105  {
106  mask.side = a.mask.side;
107  side = a.side;
108  mask.station = a.mask.station;
109  station = a.station;
110  mask.ring = a.mask.ring;
111  ring = a.ring;
112  mask.chamber = a.mask.chamber;
113  chamber = a.chamber;
114  mask.layer = a.mask.layer;
115  layer = a.layer;
116  mask.cfeb = a.mask.cfeb;
117  cfeb = a.cfeb;
118  mask.hv = a.mask.hv;
119  hv = a.hv;
120  return this;
121  };
unsigned int layer
unsigned int cfeb
unsigned int chamber
unsigned int hv
unsigned int station
double a
Definition: hdecay.h:121
AddressMask mask
unsigned int side
unsigned int ring
const bool cscdqm::Address::operator== ( const Address a) const
inline

Definition at line 94 of file CSCDQM_Detector.h.

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.

94  {
95  if (mask.side == a.mask.side && mask.side == true && side != a.side) return false;
96  if (mask.station == a.mask.station && mask.station == true && station != a.station) return false;
97  if (mask.ring == a.mask.ring && mask.ring == true && ring != a.ring) return false;
98  if (mask.chamber == a.mask.chamber && mask.chamber == true && chamber != a.chamber) return false;
99  if (mask.layer == a.mask.layer && mask.layer == true && layer != a.layer) return false;
100  if (mask.cfeb == a.mask.cfeb && mask.cfeb == true && cfeb != a.cfeb) return false;
101  if (mask.hv == a.mask.hv && mask.hv == true && hv != a.hv) return false;
102  return true;
103  };
unsigned int layer
unsigned int cfeb
unsigned int chamber
unsigned int hv
unsigned int station
double a
Definition: hdecay.h:121
AddressMask mask
unsigned int side
unsigned int ring

Friends And Related Function Documentation

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

Definition at line 123 of file CSCDQM_Detector.h.

123  {
124  out << adr.name();
125  return out;
126  }

Member Data Documentation

unsigned int cscdqm::Address::cfeb
unsigned int cscdqm::Address::chamber
unsigned int cscdqm::Address::hv
unsigned int cscdqm::Address::layer
AddressMask cscdqm::Address::mask
unsigned int cscdqm::Address::ring
unsigned int cscdqm::Address::side
unsigned int cscdqm::Address::station