ATLAS Offline Software
Loading...
Searching...
No Matches
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
20class CMAparameters;
21
22namespace 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;
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;
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();
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
ViewType
Definition RPCdef.h:8
@ Phi
Definition RPCdef.h:8
CablingObject(const cablingParameters &, const std::string &)
std::vector< int > ReadoutCh
Definition WiredOR.h:50
void add_even_read_mul(ReadoutCh &)
Definition WiredOR.cxx:60
const ReadoutCh & even_read_mul() const
Definition WiredOR.cxx:181
const ReadoutCh & odd_read_mul() const
Definition WiredOR.cxx:182
WiredOR(const parseParams &)
Definition WiredOR.cxx:14
const RPClink & RPCread() const
Definition WiredOR.cxx:183
ReadoutCh m_even_read_mul
Definition WiredOR.h:53
std::string two_obj_error_message(const std::string &, WiredOR *)
Definition WiredOR.cxx:164
ReadoutCh m_odd_read_mul
Definition WiredOR.h:54
std::map< int, const RPCchamber *, std::less< int > > RPClink
Definition WiredOR.h:28
int RPCacquired() const
Definition WiredOR.h:89
const CMAlist & readoutCMAs() const
Definition WiredOR.cxx:184
const RPCchamber * connected_rpc(int) const
Definition WiredOR.cxx:48
bool setup(SectorLogicSetup &)
Definition WiredOR.cxx:68
WiredOR(const WiredOR &)=default
std::list< const CMAparameters * > CMAlist
Definition WiredOR.h:51
int give_max_eta_strips() const
Definition WiredOR.cxx:41
bool connect(SectorLogicSetup &)
Definition WiredOR.cxx:18
defineParams m_params
Definition WiredOR.h:48
void Print(std::ostream &, bool) const
Definition WiredOR.cxx:124
void add_cma(const CMAparameters *)
Definition WiredOR.cxx:58
int give_max_phi_strips() const
Definition WiredOR.cxx:34
WiredOR & operator=(const WiredOR &)=default
ViewType side() const
Definition WiredOR.cxx:178
void add_odd_read_mul(ReadoutCh &)
Definition WiredOR.cxx:64
X & operator<<(X &stream, CMAcablingdata &data)
int stop
first RPC chamber to which wired strips belong
Definition WiredOR.h:38
defineParams(const defineParams &)=default
defineParams(defineParams &&)=default
int start
strip type put in wired OR
Definition WiredOR.h:37
defineParams & operator=(const defineParams &)=default
parseParams(parseParams &&)=default
parseParams & operator=(const parseParams &)=default
parseParams(const parseParams &)=default