ATLAS Offline Software
CablingObject.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <iomanip>
8 
10  BaseObject(Logic, obj_name), m_number{params.number}, m_station{params.station}, m_sector_type{params.sectorType} {}
11 
12 int CablingObject::number() const { return m_number; }
13 int CablingObject::station() const { return m_station; }
15 
16 std::ostream& operator<<(std::ostream& stream, const CablingObject& obj) {
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 }
21 
22 std::string CablingObject::error_header() const {
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 }
29 
30 std::string CablingObject::no_connection_error(const std::string& conn_name, int num) const {
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 }
CablingObject.h
CablingObject::m_station
int m_station
Definition: CablingObject.h:13
Logic
@ Logic
Definition: BaseObject.h:11
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
CablingObject::cablingParameters
Definition: CablingObject.h:17
CablingObject::station
int station() const
Definition: CablingObject.cxx:13
CablingObject::error_header
std::string error_header() const
Definition: CablingObject.cxx:22
operator<<
std::ostream & operator<<(std::ostream &stream, const CablingObject &obj)
Definition: CablingObject.cxx:16
BaseObject::name
std::string name() const
Definition: BaseObject.h:23
CablingObject::m_sector_type
int m_sector_type
Definition: CablingObject.h:14
trigbs_pickEvents.num
num
Definition: trigbs_pickEvents.py:76
BaseObject
Definition: BaseObject.h:13
CablingObject
Definition: CablingObject.h:10
CablingObject::number
int number() const
Definition: CablingObject.cxx:12
CablingObject::m_number
int m_number
Definition: CablingObject.h:12
CablingObject::CablingObject
CablingObject(const cablingParameters &, const std::string &)
Definition: CablingObject.cxx:9
CablingObject::no_connection_error
std::string no_connection_error(const std::string &, int) const
Definition: CablingObject.cxx:30
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
python.PyAthena.obj
obj
Definition: PyAthena.py:135
CablingObject::sector_type
int sector_type() const
Definition: CablingObject.cxx:14