ATLAS Offline Software
Loading...
Searching...
No Matches
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
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 10 of file PADreadout.cxx.

10 :
11 RPCtrigDataObject(sector*100+pad,"PAD readout"),
13 m_PAD(pad)
14{
15}
int sector(void) const
Definition PADreadout.h:40
RPCtrigDataObject(int, const std::string &)

◆ PADreadout() [2/2]

PADreadout::PADreadout ( const PADreadout & readout)

Definition at line 18 of file PADreadout.cxx.

18 :
19 RPCtrigDataObject(readout.number(),readout.name()),
20 m_sector(readout.sector()),
21 m_PAD(readout.PAD())
22{
23 for(int i=0;i<8;++i) m_matrices_readout[i] = readout.matrices_readout(i);
24}
const std::string & name() const
Definition BaseObject.h:23
MatrixReadOut * m_matrices_readout[8]
Definition PADreadout.h:25
MatrixReadOut * matrices_readout(int) const
int PAD(void) const
Definition PADreadout.h:41
int number(void) const

Member Function Documentation

◆ give_pad_readout()

PadReadOut * PADreadout::give_pad_readout ( void )

Definition at line 81 of file PADreadout.cxx.

82{
83 if(!m_pad_readout) m_pad_readout = std::make_unique<PadReadOut>(m_PAD,m_matrices_readout);
84 return m_pad_readout.get();
85}
std::unique_ptr< PadReadOut > m_pad_readout
Definition PADreadout.h:26

◆ load_readout()

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

Definition at line 60 of file PADreadout.cxx.

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

◆ matrices_readout()

MatrixReadOut * PADreadout::matrices_readout ( int i) const

Definition at line 72 of file PADreadout.cxx.

73{
74 if(i>7) {
75 return 0;
76 }
77 return m_matrices_readout[i];
78}

◆ name()

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

Definition at line 23 of file BaseObject.h.

23{ return m_name; }
std::string m_name
Definition BaseObject.h:16

◆ 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 46 of file PADreadout.cxx.

47{
48 return !(*this == padReadout);
49}

◆ operator<()

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

Definition at line 51 of file PADreadout.cxx.

53{
54 if ( m_sector < padReadout.sector() ) return true;
55 if ( m_PAD < padReadout.PAD() ) return true;
56 return false;
57}

◆ operator=()

PADreadout PADreadout::operator= ( const PADreadout & readout)

Definition at line 27 of file PADreadout.cxx.

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

◆ operator==()

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

Definition at line 40 of file PADreadout.cxx.

41{
42 return( m_sector == padReadout.sector() and m_PAD == padReadout.PAD() );
43}

◆ 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{
45}

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22{ return m_tag; }
ObjectType m_tag
Definition BaseObject.h:15

Member Data Documentation

◆ m_matrices_readout

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

Definition at line 25 of file PADreadout.h.

25{nullptr};

◆ 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: