ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
RPC_CondCabling::WiredORdata Class Reference

#include <WiredORdata.h>

Inheritance diagram for RPC_CondCabling::WiredORdata:
Collaboration diagram for RPC_CondCabling::WiredORdata:

Public Member Functions

 WiredORdata (DBline &, int)
 
virtual ~WiredORdata ()
 
std::unique_ptr< WiredORgive_wor (void)
 
int station () const
 
virtual void Print (std::ostream &, bool) const override
 

Private Types

typedef std::list< WiredORWORlist
 

Private Member Functions

void reset_data ()
 
bool get_data (DBline &, WiredOR::parseParams &)
 
bool confirm_boundary (WiredOR::parseParams &) const
 
ObjectType tag () const
 
const std::string & name () const
 

Private Attributes

bool m_fail
 
int m_station {-1}
 
WORlist m_wor
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 17 of file WiredORdata.h.

Member Typedef Documentation

◆ WORlist

typedef std::list<WiredOR> RPC_CondCabling::WiredORdata::WORlist
private

Definition at line 19 of file WiredORdata.h.

Constructor & Destructor Documentation

◆ WiredORdata()

WiredORdata::WiredORdata ( DBline data,
int  type 
)

Definition at line 13 of file WiredORdata.cxx.

13  : BaseObject{Logic, "Wired OR Data"} {
14  reset_data();
15  if (!(data("station") >> m_station)) return;
16 
17  m_fail = false;
18 
19  (++data)("{");
20  do {
21  WiredOR::parseParams parse_params;
22  parse_params.sectorType = type;
23  parse_params.station = m_station;
24  parse_params.number = -1;
25  if (get_data(data, parse_params)) { m_wor.emplace_back(parse_params); }
26  ++data;
27  } while (!data("}"));
28 }

◆ ~WiredORdata()

WiredORdata::~WiredORdata ( )
virtualdefault

Member Function Documentation

◆ confirm_boundary()

bool WiredORdata::confirm_boundary ( WiredOR::parseParams parse_params) const
private

Definition at line 32 of file WiredORdata.cxx.

32  {
33  if (parse_params.start > parse_params.stop) {
34  std::ostringstream display;
35  REPORT_MESSAGE_WITH_CONTEXT(MSG::ERROR, "WiredORdata")
36  << "WORdata error in configuration for Sector Type " << parse_params.sectorType << ", station " << parse_params.station
37  << ", WOR number " << parse_params.number << std::endl
38  << " start RPC chamber (" << parse_params.start << ") is greater than "
39  << "stop RPC chamber (" << parse_params.stop << ")";
40  return false;
41  }
42  return true;
43 }

◆ get_data()

bool WiredORdata::get_data ( DBline data,
WiredOR::parseParams parse_params 
)
private

Definition at line 45 of file WiredORdata.cxx.

45  {
46  reset_data();
47  if (data("hard wired phi chamber") >> parse_params.number >> parse_params.start >> "-" >> parse_params.stop) {
48  m_fail = false;
49  if (!confirm_boundary(parse_params)) m_fail = true;
50  }
51 
52  return !m_fail;
53 }

◆ give_wor()

std::unique_ptr< WiredOR > WiredORdata::give_wor ( void  )

Definition at line 55 of file WiredORdata.cxx.

55  {
56  if (!m_wor.empty()) {
57  std::unique_ptr<WiredOR> Wor = std::make_unique<WiredOR>(m_wor.front());
58  m_wor.pop_front();
59  return Wor;
60  }
61  return nullptr;
62 }

◆ name()

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

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ Print()

void WiredORdata::Print ( std::ostream &  stream,
bool  detail 
) const
overridevirtual

Reimplemented from BaseObject.

Definition at line 64 of file WiredORdata.cxx.

64  {
65  stream << "Wired OR data of station n. " << m_station;
66  // stream << " belonging to sector type " << parse_params.sectorType << std::endl;
67  stream << "It contains " << m_wor.size();
68  stream << " Wired ORs:" << std::endl;
69  for (const WiredOR& it : m_wor) stream << ShowRequest<WiredOR>(it, detail);
70 }

◆ reset_data()

void WiredORdata::reset_data ( )
private

Definition at line 30 of file WiredORdata.cxx.

30 { m_fail = true; }

◆ station()

int RPC_CondCabling::WiredORdata::station ( ) const
inline

Definition at line 35 of file WiredORdata.h.

35 { return m_station; }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

Member Data Documentation

◆ m_fail

bool RPC_CondCabling::WiredORdata::m_fail
private

Definition at line 21 of file WiredORdata.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_station

int RPC_CondCabling::WiredORdata::m_station {-1}
private

Definition at line 22 of file WiredORdata.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.

◆ m_wor

WORlist RPC_CondCabling::WiredORdata::m_wor
private

Definition at line 23 of file WiredORdata.h.


The documentation for this class was generated from the following files:
RPC_CondCabling::WiredORdata::reset_data
void reset_data()
Definition: WiredORdata.cxx:30
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
RPC_CondCabling::WiredORdata::m_fail
bool m_fail
Definition: WiredORdata.h:21
RPC_CondCabling::WiredOR::defineParams::start
int start
strip type put in wired OR
Definition: WiredOR.h:37
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
skel.it
it
Definition: skel.GENtoEVGEN.py:396
RPC_CondCabling::WiredOR::defineParams::stop
int stop
first RPC chamber to which wired strips belong
Definition: WiredOR.h:38
detail
Definition: extract_histogram_tag.cxx:14
Logic
@ Logic
Definition: BaseObject.h:11
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
RPC_CondCabling::WiredORdata::get_data
bool get_data(DBline &, WiredOR::parseParams &)
Definition: WiredORdata.cxx:45
RPC_CondCabling::WiredORdata::m_wor
WORlist m_wor
Definition: WiredORdata.h:23
pyroot.display
display
Definition: pyroot.py:44
REPORT_MESSAGE_WITH_CONTEXT
#define REPORT_MESSAGE_WITH_CONTEXT(LVL, CONTEXT_NAME)
Report a message, with an explicitly specified context name.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:345
BaseObject
Definition: BaseObject.h:13
RPC_CondCabling::WiredOR
Definition: WiredOR.h:26
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RPC_CondCabling::WiredORdata::m_station
int m_station
Definition: WiredORdata.h:22
RPC_CondCabling::WiredORdata::confirm_boundary
bool confirm_boundary(WiredOR::parseParams &) const
Definition: WiredORdata.cxx:32
RPC_CondCabling::WiredOR::parseParams
Definition: WiredOR.h:40