ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonConditions
MuonCondCabling
RPC_CondCabling
src
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
5
#include "
RPC_CondCabling/CablingObject.h
"
6
7
#include <iomanip>
8
9
CablingObject::CablingObject
(
const
CablingObject::cablingParameters
& params,
const
std::string& obj_name) :
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
; }
14
int
CablingObject::sector_type
()
const
{
return
m_sector_type
; }
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
}
Logic
@ Logic
Definition
BaseObject.h:11
operator<<
std::ostream & operator<<(std::ostream &stream, const CablingObject &obj)
Definition
CablingObject.cxx:16
CablingObject.h
BaseObject::BaseObject
BaseObject(ObjectType, const std::string &)
Definition
BaseObject.cxx:7
BaseObject::name
const std::string & name() const
Definition
BaseObject.h:23
CablingObject::no_connection_error
std::string no_connection_error(const std::string &, int) const
Definition
CablingObject.cxx:30
CablingObject::number
int number() const
Definition
CablingObject.cxx:12
CablingObject::sector_type
int sector_type() const
Definition
CablingObject.cxx:14
CablingObject::station
int station() const
Definition
CablingObject.cxx:13
CablingObject::error_header
std::string error_header() const
Definition
CablingObject.cxx:22
CablingObject::CablingObject
CablingObject(const cablingParameters &, const std::string &)
Definition
CablingObject.cxx:9
CablingObject::m_sector_type
int m_sector_type
Definition
CablingObject.h:14
CablingObject::m_number
int m_number
Definition
CablingObject.h:12
CablingObject::m_station
int m_station
Definition
CablingObject.h:13
CablingObject::cablingParameters
Definition
CablingObject.h:17
Generated on
for ATLAS Offline Software by
1.17.0