CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Friends
TotemSymbID Class Reference

Symbolic ID describing an entity of a TOTEM subdetector. More...

#include <TotemSymbId.h>

Public Member Functions

bool operator< (const TotemSymbID &sid) const
 
bool operator== (const TotemSymbID &sid) const
 
void print (std::ostream &os, std::string subSystemName) const
 

Public Attributes

unsigned int symbolicID
 chip ID, raw integer representation of DetId class More...
 

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
 
std::ostream & operator<< (std::ostream &s, const TotemSymbID &sid)
 

Detailed Description

Symbolic ID describing an entity of a TOTEM subdetector.

Definition at line 18 of file TotemSymbId.h.

Member Function Documentation

◆ operator<()

bool TotemSymbID::operator< ( const TotemSymbID sid) const
inline

Definition at line 25 of file TotemSymbId.h.

References symbolicID.

25 { return (symbolicID < sid.symbolicID); }
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:21

◆ operator==()

bool TotemSymbID::operator== ( const TotemSymbID sid) const
inline

Definition at line 27 of file TotemSymbId.h.

References symbolicID.

27 { return (symbolicID == sid.symbolicID); }
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:21

◆ print()

void TotemSymbID::print ( std::ostream &  os,
std::string  subSystemName 
) const

Definition at line 17 of file TotemSymbId.cc.

References TotemTimingDetId::ID_NOT_SET, hlx_dqm_sourceclient_cfi::subSystemName, and symbolicID.

17  {
18  const auto ctppsDetId = CTPPSDetId(symbolicID);
19  os << "DetId=" << symbolicID << " (";
20 
21  if (subSystemName == "TrackingStrip") {
22  os << "subDet=" << ctppsDetId.subdetId() << " " << TotemRPDetId(symbolicID);
23  } else if (subSystemName == "TimingDiamond") {
24  os << "subDet=" << ctppsDetId.subdetId() << " " << CTPPSDiamondDetId(symbolicID);
25  } else if (subSystemName == "TotemT2") {
26  os << "subDet=" << ctppsDetId.subdetId() << " " << TotemT2DetId(symbolicID);
27  } else if (subSystemName == "TotemTiming") {
28  const auto timingId = TotemTimingDetId(symbolicID);
29  os << "subDet=" << ctppsDetId.subdetId() << " " << timingId;
30  if (timingId.channel() == TotemTimingDetId::ID_NOT_SET || timingId.plane() == 0) {
31  os << ") - (plane/channel det ids not applicable to SAMPIC; initialized with def values " << 0 << "/"
32  << TotemTimingDetId::ID_NOT_SET << " now";
33  }
34  } else {
35  os << ctppsDetId;
36  }
37 
38  os << ")";
39 }
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:30
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:21
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...

◆ serialize()

template<class Archive >
void TotemSymbID::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 31 of file TotemSymbId.h.

◆ cond::serialization::access

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

Definition at line 31 of file TotemSymbId.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  s,
const TotemSymbID sid 
)
friend

Definition at line 41 of file TotemSymbId.cc.

41  {
42  s << "DetId=" << sid.symbolicID << " (" << CTPPSDetId(sid.symbolicID) << ")";
43 
44  return s;
45 }
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:21
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32

Member Data Documentation

◆ symbolicID

unsigned int TotemSymbID::symbolicID