ATLAS Offline Software
Loading...
Searching...
No Matches
CablingObject Class Reference

#include <CablingObject.h>

Inheritance diagram for CablingObject:
Collaboration diagram for CablingObject:

Classes

struct  cablingParameters

Public Member Functions

 CablingObject (const cablingParameters &, const std::string &)
 CablingObject (const CablingObject &)=default
virtual ~CablingObject ()=default
CablingObjectoperator= (const CablingObject &)=default
int number () const
int station () const
int sector_type () const
std::string error_header () const
std::string no_connection_error (const std::string &, int) const
ObjectType tag () const
const std::string & name () const
virtual void Print (std::ostream &, bool) const

Private Attributes

int m_number {0}
int m_station {0}
int m_sector_type {0}
ObjectType m_tag
std::string m_name

Friends

std::ostream & operator<< (std::ostream &stream, const CablingObject &obj)

Detailed Description

Definition at line 10 of file CablingObject.h.

Constructor & Destructor Documentation

◆ CablingObject() [1/2]

CablingObject::CablingObject ( const cablingParameters & params,
const std::string & obj_name )

Definition at line 9 of file CablingObject.cxx.

9 :
10 BaseObject(Logic, obj_name), m_number{params.number}, m_station{params.station}, m_sector_type{params.sectorType} {}
@ Logic
Definition BaseObject.h:11
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7

◆ CablingObject() [2/2]

CablingObject::CablingObject ( const CablingObject & )
default

◆ ~CablingObject()

virtual CablingObject::~CablingObject ( )
virtualdefault

Member Function Documentation

◆ error_header()

std::string CablingObject::error_header ( ) const
nodiscard

Definition at line 22 of file CablingObject.cxx.

22 {
23 std::ostringstream disp;
24 disp << "Error in Sector Type " << m_sector_type;
25 if (m_station > 0) disp << ", station " << m_station;
26 disp << ":" << std::endl;
27 return disp.str();
28}

◆ name()

const std::string & BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23{ return m_name; }
std::string m_name
Definition BaseObject.h:16

◆ no_connection_error()

std::string CablingObject::no_connection_error ( const std::string & conn_name,
int num ) const
nodiscard

Definition at line 30 of file CablingObject.cxx.

30 {
31 std::ostringstream disp;
32 disp << error_header() << name() << " n. " << number() << " is supposed to receive input from " << conn_name << " n. " << num << " which doesn't exist!";
33 return disp.str();
34}
const std::string & name() const
Definition BaseObject.h:23
int number() const
std::string error_header() const

◆ number()

int CablingObject::number ( ) const

Definition at line 12 of file CablingObject.cxx.

12{ return m_number; }

◆ operator=()

CablingObject & CablingObject::operator= ( const CablingObject & )
default

◆ Print()

◆ sector_type()

int CablingObject::sector_type ( ) const

Definition at line 14 of file CablingObject.cxx.

14{ return m_sector_type; }

◆ station()

int CablingObject::station ( ) const

Definition at line 13 of file CablingObject.cxx.

13{ return m_station; }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22{ return m_tag; }
ObjectType m_tag
Definition BaseObject.h:15

◆ operator<<

std::ostream & operator<< ( std::ostream & stream,
const CablingObject & obj )
friend

Definition at line 16 of file CablingObject.cxx.

16 {
17 stream << obj.name() << " number " << std::setw(3) << obj.number() << " associated to sector type " << std::setw(3)
18 << obj.sector_type() << " in station n. " << obj.station() << std::endl;
19 return stream;
20}

Member Data Documentation

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_number

int CablingObject::m_number {0}
private

Definition at line 12 of file CablingObject.h.

12{0};

◆ m_sector_type

int CablingObject::m_sector_type {0}
private

Definition at line 14 of file CablingObject.h.

14{0};

◆ m_station

int CablingObject::m_station {0}
private

Definition at line 13 of file CablingObject.h.

13{0};

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files: