ATLAS Offline Software
WiredOR.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef WIREDOR_H
6 #define WIREDOR_H
7 
8 #include <algorithm>
9 #include <list>
10 #include <map>
11 #include <vector>
12 
13 #include "GaudiKernel/MsgStream.h"
14 
19 
20 class CMAparameters;
21 
22 namespace RPC_CondCabling {
23 
24  class SectorLogicSetup;
25 
26  class WiredOR : public CablingObject {
27  public:
28  typedef std::map<int, const RPCchamber*, std::less<int> > RPClink;
29 
30  struct defineParams {
31  defineParams() = default;
32  defineParams(const defineParams&) = default;
33  defineParams& operator=(const defineParams&) = default;
34  defineParams(defineParams&&) = default;
35 
37  int start{0};
38  int stop{0};
39  };
40  struct parseParams : public defineParams, public cablingParameters {
41  parseParams() = default;
42  parseParams(const parseParams&) = default;
43  parseParams& operator=(const parseParams&) = default;
44  parseParams(parseParams&&) = default;
45  };
46 
47  private:
49 
50  typedef std::vector<int> ReadoutCh;
51  typedef std::list<const CMAparameters*> CMAlist;
52 
55 
58 
60 
61  public:
62  WiredOR(const parseParams&);
63 
64  // WiredOR(int, int, int, int, int);
65  WiredOR(const WiredOR&) = default;
66  virtual ~WiredOR();
67 
68  WiredOR& operator=(const WiredOR&) = default;
69 
70  ViewType side() const;
71  int start() const;
72  int stop() const;
73  const ReadoutCh& even_read_mul() const;
74  const ReadoutCh& odd_read_mul() const;
75  const RPClink& RPCread() const;
76  const CMAlist& readoutCMAs() const;
77 
78  const RPCchamber* connected_rpc(int) const;
79 
80  bool check();
81  bool setup(SectorLogicSetup&);
82 
83  void add_cma(const CMAparameters*);
86 
87  int give_max_phi_strips() const;
88  int give_max_eta_strips() const;
89  int RPCacquired() const { return m_RPCread.size(); }
90 
91  void Print(std::ostream&, bool) const;
92 
93  [[nodiscard]] std::string two_obj_error_message(const std::string&, WiredOR*);
94  [[nodiscard]] std::string error(const std::string&);
95  };
96 
97  inline std::ostream& operator<<(std::ostream& stream, const WiredOR& Wor) {
98  Wor.Print(stream, false);
99  return stream;
100  }
101 
102  inline MsgStream& operator<<(MsgStream& stream, const WiredOR& Wor) {
103  std::ostringstream oss;
104  Wor.Print(oss, false);
105  return (stream << oss.str());
106  }
107 
108 } // namespace RPC_CondCabling
109 #endif
RPC_CondCabling::WiredOR::add_odd_read_mul
void add_odd_read_mul(ReadoutCh &)
Definition: WiredOR.cxx:64
CablingObject.h
RPC_CondCabling::WiredOR::start
int start() const
Definition: WiredOR.cxx:179
ShowRequest.h
RPC_CondCabling::WiredOR::m_even_read_mul
ReadoutCh m_even_read_mul
Definition: WiredOR.h:53
RPC_CondCabling::WiredOR::m_readoutCMAs
CMAlist m_readoutCMAs
Definition: WiredOR.h:57
CMAidentity.h
RPC_CondCabling::WiredOR::connected_rpc
const RPCchamber * connected_rpc(int) const
Definition: WiredOR.cxx:48
RPC_CondCabling::operator<<
X & operator<<(X &stream, CMAcablingdata &data)
Definition: CMAcablingdata.h:44
RPC_CondCabling::WiredOR::defineParams::start
int start
strip type put in wired OR
Definition: WiredOR.h:37
RPC_CondCabling::WiredOR::defineParams::defineParams
defineParams()=default
RPC_CondCabling::WiredOR::parseParams::parseParams
parseParams()=default
RPC_CondCabling::WiredOR::~WiredOR
virtual ~WiredOR()
RPC_CondCabling::WiredOR::check
bool check()
Definition: WiredOR.cxx:83
RPC_CondCabling::WiredOR::defineParams::stop
int stop
first RPC chamber to which wired strips belong
Definition: WiredOR.h:38
RPC_CondCabling::WiredOR::add_cma
void add_cma(const CMAparameters *)
Definition: WiredOR.cxx:58
Phi
@ Phi
Definition: RPCdef.h:8
RPC_CondCabling::WiredOR::readoutCMAs
const CMAlist & readoutCMAs() const
Definition: WiredOR.cxx:184
RPC_CondCabling
Definition: CMAcablingdata.h:18
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
RPC_CondCabling::WiredOR::m_RPCread
RPClink m_RPCread
Definition: WiredOR.h:56
CablingObject::cablingParameters
Definition: CablingObject.h:17
RPC_CondCabling::WiredOR::odd_read_mul
const ReadoutCh & odd_read_mul() const
Definition: WiredOR.cxx:182
RPC_CondCabling::WiredOR::ReadoutCh
std::vector< int > ReadoutCh
Definition: WiredOR.h:50
RPC_CondCabling::WiredOR::CMAlist
std::list< const CMAparameters * > CMAlist
Definition: WiredOR.h:51
RPC_CondCabling::WiredOR::even_read_mul
const ReadoutCh & even_read_mul() const
Definition: WiredOR.cxx:181
RPC_CondCabling::WiredOR::Print
void Print(std::ostream &, bool) const
Definition: WiredOR.cxx:124
ViewType
ViewType
Definition: RPCdef.h:8
RPC_CondCabling::WiredOR::side
ViewType side() const
Definition: WiredOR.cxx:178
RPC_CondCabling::WiredOR::give_max_eta_strips
int give_max_eta_strips() const
Definition: WiredOR.cxx:41
RPC_CondCabling::WiredOR::add_even_read_mul
void add_even_read_mul(ReadoutCh &)
Definition: WiredOR.cxx:60
RPC_CondCabling::WiredOR::defineParams
Definition: WiredOR.h:30
RPC_CondCabling::WiredOR::RPCread
const RPClink & RPCread() const
Definition: WiredOR.cxx:183
RPC_CondCabling::WiredOR::m_odd_read_mul
ReadoutCh m_odd_read_mul
Definition: WiredOR.h:54
RPC_CondCabling::SectorLogicSetup
Definition: SectorLogicSetup.h:23
RPC_CondCabling::WiredOR::give_max_phi_strips
int give_max_phi_strips() const
Definition: WiredOR.cxx:34
RPC_CondCabling::WiredOR::connect
bool connect(SectorLogicSetup &)
Definition: WiredOR.cxx:18
RPC_CondCabling::WiredOR::defineParams::operator=
defineParams & operator=(const defineParams &)=default
RPC_CondCabling::WiredOR::WiredOR
WiredOR(const WiredOR &)=default
RPCchamber.h
RPC_CondCabling::WiredOR::error
std::string error(const std::string &)
Definition: WiredOR.cxx:172
RPC_CondCabling::WiredOR::m_params
defineParams m_params
Definition: WiredOR.h:48
RPC_CondCabling::WiredOR::parseParams::parseParams
parseParams(const parseParams &)=default
RPC_CondCabling::WiredOR::WiredOR
WiredOR(const parseParams &)
Definition: WiredOR.cxx:14
RPC_CondCabling::WiredOR::defineParams::side
ViewType side
Definition: WiredOR.h:36
CablingObject
Definition: CablingObject.h:10
RPC_CondCabling::RPCchamber
Definition: RPCchamber.h:23
RPC_CondCabling::WiredOR::defineParams::defineParams
defineParams(const defineParams &)=default
RPC_CondCabling::WiredOR::stop
int stop() const
Definition: WiredOR.cxx:180
RPC_CondCabling::WiredOR::parseParams::parseParams
parseParams(parseParams &&)=default
RPC_CondCabling::WiredOR
Definition: WiredOR.h:26
CMAparameters
Definition: CMAparameters.h:21
RPC_CondCabling::WiredOR::setup
bool setup(SectorLogicSetup &)
Definition: WiredOR.cxx:68
RPC_CondCabling::WiredOR::defineParams::defineParams
defineParams(defineParams &&)=default
RPC_CondCabling::WiredOR::RPCacquired
int RPCacquired() const
Definition: WiredOR.h:89
RPC_CondCabling::WiredOR::parseParams::operator=
parseParams & operator=(const parseParams &)=default
RPC_CondCabling::WiredOR::two_obj_error_message
std::string two_obj_error_message(const std::string &, WiredOR *)
Definition: WiredOR.cxx:164
RPC_CondCabling::WiredOR::operator=
WiredOR & operator=(const WiredOR &)=default
RPC_CondCabling::WiredOR::RPClink
std::map< int, const RPCchamber *, std::less< int > > RPClink
Definition: WiredOR.h:28
RPC_CondCabling::WiredOR::parseParams
Definition: WiredOR.h:40