ATLAS Offline Software
CMAreadout.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8  RPCtrigDataObject(patterns->number(),"CMA readout"),
9  m_CMAconfiguration(patterns->cma_parameters().conf_type()),
10  m_sector(patterns->sector()),
11  m_cma_identity(patterns->cma_parameters().id())
12 {
13  m_low_pt_matrix = patterns->give_low_pt_matrix(NOBXS, BCZERO);
14  m_high_pt_matrix = patterns->give_high_pt_matrix(NOBXS, BCZERO);
15 }
16 
17 
19  RPCtrigDataObject(readout.number(),readout.name()),
20  m_CMAconfiguration(readout.m_CMAconfiguration),
21  m_sector(readout.m_sector),
22  m_cma_identity(readout.m_cma_identity),
23  m_low_pt_matrix(readout.m_low_pt_matrix),
24  m_high_pt_matrix(readout.m_high_pt_matrix)
25 {
26 }
27 
30 {
31  static_cast<RPCtrigDataObject&>(*this) =
32  static_cast<const RPCtrigDataObject&>(readout);
34  m_sector = readout.m_sector;
38  return *this;
39 }
40 
41 
42 bool
43 CMAreadout::operator==(const CMAreadout& cmaReadout) const
44 {
45  if( m_sector == cmaReadout.sector() &&
46  m_cma_identity.PAD_index() == cmaReadout.id().PAD_index() &&
47  m_cma_identity.type() == cmaReadout.id().type() &&
48  m_cma_identity.Ixx_index() == cmaReadout.id().Ixx_index() )
49  {
50  return true;
51  }
52  return false;
53 }
54 
55 bool
56 CMAreadout::operator!=(const CMAreadout& cmaReadout) const
57 {
58  return !(*this == cmaReadout);
59 }
60 
61 bool
62 CMAreadout::operator< (const CMAreadout& cmaReadout) const
63 {
64  if ( m_sector < cmaReadout.sector() ) return true;
65  if ( m_cma_identity.PAD_index() < cmaReadout.id().PAD_index() )
66  return true;
67  if ( m_cma_identity.type() < cmaReadout.id().type()) return true;
68  if ( m_cma_identity.Ixx_index() < cmaReadout.id().Ixx_index() )
69  return true;
70  return false;
71 }
72 
73 std::array<MatrixReadOut*, 2>
75 {
78 
80  m_low_pt_matrix_readout = std::make_unique<MatrixReadOut>(m_low_pt_matrix,0,NOBXS,type);
82  m_high_pt_matrix_readout = std::make_unique<MatrixReadOut>(m_high_pt_matrix,0,NOBXS,type);
83 
84  unsigned short int lowFrag = m_low_pt_matrix_readout->checkFragment();
85  unsigned short int highFrag = m_high_pt_matrix_readout->checkFragment();
86  if (log.level()<=MSG::DEBUG) {
87  log << MSG::DEBUG << "CheckFragment for low Pt Matrix = " << lowFrag << endmsg;
88  log << MSG::DEBUG << "CheckFragment for high Pt Matrix = " << highFrag << endmsg;
89  }
90 
92 }
CMAreadout::operator==
bool operator==(const CMAreadout &) const
Definition: CMAreadout.cxx:43
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
CMAidentity::type
ViewType type() const
Definition: CMAidentity.cxx:117
CMAreadout::sector
int sector(void) const
Definition: CMAreadout.h:45
CMAreadout.h
MatrixReadOut::DataVersion
DataVersion
Definition: MatrixReadOut.h:20
CMAreadout::m_CMAconfiguration
CMAparameters::CMAconfiguration m_CMAconfiguration
Definition: CMAreadout.h:25
CMAreadout
Definition: CMAreadout.h:23
CMAreadout::give_matrix_readout
std::array< MatrixReadOut *, 2 > give_matrix_readout(MsgStream &log, uint NOBXS)
Definition: CMAreadout.cxx:74
CMAreadout::operator=
CMAreadout operator=(const CMAreadout &)
Definition: CMAreadout.cxx:29
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
CMAreadout::m_low_pt_matrix_readout
std::unique_ptr< MatrixReadOut > m_low_pt_matrix_readout
Definition: CMAreadout.h:31
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CMAreadout::operator<
bool operator<(const CMAreadout &) const
Definition: CMAreadout.cxx:62
CMAidentity::Ixx_index
int Ixx_index() const
Definition: CMAidentity.cxx:123
CMAreadout::m_high_pt_matrix_readout
std::unique_ptr< MatrixReadOut > m_high_pt_matrix_readout
Definition: CMAreadout.h:31
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
python.selection.number
number
Definition: selection.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
CMAreadout::m_cma_identity
CMAidentity m_cma_identity
Definition: CMAreadout.h:28
CMAidentity::PAD_index
int PAD_index() const
Definition: CMAidentity.cxx:122
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MatrixReadOut::Atlas
@ Atlas
Definition: MatrixReadOut.h:20
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MatrixReadOut::Simulation
@ Simulation
Definition: MatrixReadOut.h:20
CMAreadout::m_high_pt_matrix
Matrix * m_high_pt_matrix
Definition: CMAreadout.h:30
CMAreadout::m_low_pt_matrix
Matrix * m_low_pt_matrix
Definition: CMAreadout.h:29
CMAreadout::id
const CMAidentity & id(void) const
Definition: CMAreadout.h:46
CMAreadout::CMAreadout
CMAreadout(CMApatterns *, uint NOBXS, uint BCZERO)
Definition: CMAreadout.cxx:7
CMApatterns
Definition: CMApatterns.h:21
CMAreadout::m_sector
int m_sector
Definition: CMAreadout.h:27
CMAparameters::Atlas
@ Atlas
Definition: CMAparameters.h:23
CMAreadout::operator!=
bool operator!=(const CMAreadout &) const
Definition: CMAreadout.cxx:56