ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PADreadout Class Reference

#include <PADreadout.h>

Inheritance diagram for PADreadout:
Collaboration diagram for PADreadout:

Public Member Functions

 PADreadout (int, int)
 
 PADreadout (const PADreadout &)
 
PADreadout operator= (const PADreadout &)
 
bool operator== (const PADreadout &) const
 
bool operator!= (const PADreadout &) const
 
bool operator< (const PADreadout &) const
 
void load_readout (std::array< MatrixReadOut *, 2 > &)
 
int sector (void) const
 
int PAD (void) const
 
MatrixReadOutmatrices_readout (int) const
 
PadReadOutgive_pad_readout (void)
 
void set_number (int)
 
int number (void) const
 
void PrintElement (std::ostream &, std::string, bool) const
 
void Print (std::ostream &, bool) const
 
ObjectType tag () const
 
std::string name () const
 

Private Attributes

int m_sector
 
int m_PAD
 
MatrixReadOutm_matrices_readout [8] = {nullptr}
 
std::unique_ptr< PadReadOutm_pad_readout
 
int m_number
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 19 of file PADreadout.h.

Constructor & Destructor Documentation

◆ PADreadout() [1/2]

PADreadout::PADreadout ( int  sector,
int  pad 
)

Definition at line 9 of file PADreadout.cxx.

9  :
10  RPCtrigDataObject(sector*100+pad,"PAD readout"),
12  m_PAD(pad)
13 {
14 }

◆ PADreadout() [2/2]

PADreadout::PADreadout ( const PADreadout readout)

Definition at line 17 of file PADreadout.cxx.

17  :
18  RPCtrigDataObject(readout.number(),readout.name()),
19  m_sector(readout.sector()),
20  m_PAD(readout.PAD())
21 {
22  for(int i=0;i<8;++i) m_matrices_readout[i] = readout.matrices_readout(i);
23 }

Member Function Documentation

◆ give_pad_readout()

PadReadOut * PADreadout::give_pad_readout ( void  )

Definition at line 87 of file PADreadout.cxx.

88 {
89  if(!m_pad_readout) m_pad_readout = std::make_unique<PadReadOut>(m_PAD,m_matrices_readout);
90  return m_pad_readout.get();
91 }

◆ load_readout()

void PADreadout::load_readout ( std::array< MatrixReadOut *, 2 > &  readout)

Definition at line 64 of file PADreadout.cxx.

65 {
66  int mat = 0;
67  for(int i =0; i < 8; ++i) if(m_matrices_readout[i] == 0){mat = i; break;}
68  if( mat > 6 )
69  {
70  std::runtime_error("trying to load more than 8 matrices into PAD readout!");
71  }
72  m_matrices_readout[mat] = readout[0];
73  m_matrices_readout[mat+1] = readout[1];
74 }

◆ matrices_readout()

MatrixReadOut * PADreadout::matrices_readout ( int  i) const

Definition at line 77 of file PADreadout.cxx.

78 {
79  if(i>7)
80  {
81  return 0;
82  }
83  return m_matrices_readout[i];
84 }

◆ name()

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

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ number()

int RPCtrigDataObject::number ( void  ) const
inlineinherited

Definition at line 29 of file RPCtrigDataObject.h.

29 {return m_number;}

◆ operator!=()

bool PADreadout::operator!= ( const PADreadout padReadout) const

Definition at line 50 of file PADreadout.cxx.

51 {
52  return !(*this == padReadout);
53 }

◆ operator<()

bool PADreadout::operator< ( const PADreadout padReadout) const

Definition at line 55 of file PADreadout.cxx.

57 {
58  if ( m_sector < padReadout.sector() ) return true;
59  if ( m_PAD < padReadout.PAD() ) return true;
60  return false;
61 }

◆ operator=()

PADreadout PADreadout::operator= ( const PADreadout readout)

Definition at line 26 of file PADreadout.cxx.

27 {
28  static_cast<RPCtrigDataObject&>(*this) =
29  static_cast<const RPCtrigDataObject&>(readout);
30  m_sector = readout.sector();
31  m_PAD = readout.PAD();
32 
33  for(int i=0;i<8;++i) m_matrices_readout[i] = readout.matrices_readout(i);
34  return *this;
35 }

◆ operator==()

bool PADreadout::operator== ( const PADreadout padReadout) const

Definition at line 39 of file PADreadout.cxx.

40 {
41  if( m_sector == padReadout.sector() &&
42  m_PAD == padReadout.PAD() )
43  {
44  return true;
45  }
46  return false;
47 }

◆ PAD()

int PADreadout::PAD ( void  ) const
inline

Definition at line 41 of file PADreadout.h.

41 {return m_PAD;}

◆ Print()

void RPCtrigDataObject::Print ( std::ostream &  stream,
bool  detail 
) const
virtualinherited

Reimplemented from BaseObject.

Reimplemented in SLpatterns.

Definition at line 31 of file RPCtrigDataObject.cxx.

32 {
33  detail = true;
34  if(detail)
35  {
36  stream << name() << " number " << setw(3) << number();
37  }
38  stream << endl;
39 }

◆ PrintElement()

void RPCtrigDataObject::PrintElement ( std::ostream &  ,
std::string  ,
bool   
) const
inlineinherited

Definition at line 31 of file RPCtrigDataObject.h.

31 {}

◆ sector()

int PADreadout::sector ( void  ) const
inline

Definition at line 40 of file PADreadout.h.

40 {return m_sector;}

◆ set_number()

void RPCtrigDataObject::set_number ( int  number)
inherited

Definition at line 42 of file RPCtrigDataObject.cxx.

43 {
44  m_number = number;
45 }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

Member Data Documentation

◆ m_matrices_readout

MatrixReadOut* PADreadout::m_matrices_readout[8] = {nullptr}
private

Definition at line 25 of file PADreadout.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_number

int RPCtrigDataObject::m_number
privateinherited

Definition at line 17 of file RPCtrigDataObject.h.

◆ m_PAD

int PADreadout::m_PAD
private

Definition at line 23 of file PADreadout.h.

◆ m_pad_readout

std::unique_ptr<PadReadOut> PADreadout::m_pad_readout
private

Definition at line 26 of file PADreadout.h.

◆ m_sector

int PADreadout::m_sector
private

Definition at line 22 of file PADreadout.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files:
RPCtrigDataObject::m_number
int m_number
Definition: RPCtrigDataObject.h:17
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition: RPCtrigDataObject.cxx:10
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
PADreadout::m_matrices_readout
MatrixReadOut * m_matrices_readout[8]
Definition: PADreadout.h:25
detail
Definition: extract_histogram_tag.cxx:14
PADreadout::m_pad_readout
std::unique_ptr< PadReadOut > m_pad_readout
Definition: PADreadout.h:26
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
lumiFormat.i
int i
Definition: lumiFormat.py:92
PADreadout::PAD
int PAD(void) const
Definition: PADreadout.h:41
PADreadout::sector
int sector(void) const
Definition: PADreadout.h:40
BaseObject::name
std::string name() const
Definition: BaseObject.h:23
PADreadout::matrices_readout
MatrixReadOut * matrices_readout(int) const
Definition: PADreadout.cxx:77
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
PADreadout::m_PAD
int m_PAD
Definition: PADreadout.h:23
PADreadout::m_sector
int m_sector
Definition: PADreadout.h:22
RPCtrigDataObject::number
int number(void) const
Definition: RPCtrigDataObject.h:29
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15