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

#include <PADpatterns.h>

Inheritance diagram for PADpatterns:
Collaboration diagram for PADpatterns:

Public Member Functions

 PADpatterns (int, int, unsigned long int)
 
 PADpatterns (const PADpatterns &)
 
PADpatterns operator= (const PADpatterns &)
 
bool operator== (const PADpatterns &) const
 
bool operator!= (const PADpatterns &) const
 
bool operator< (const PADpatterns &) const
 
void load_cma_patterns (CMApatterns *)
 
PADpatternsoperator<< (CMApatterns *)
 
int sector (void) const
 
int pad_id (void) const
 
unsigned long int debug (void) const
 
const CMAdata::PatternsListcma_patterns (void) const
 
Padgive_pad (const RpcCablingCondData *readCdo, int NOBXS, int BCZERO)
 
void Print (std::ostream &, bool) const
 
void set_number (int)
 
int number (void) const
 
void PrintElement (std::ostream &, std::string, bool) const
 
ObjectType tag () const
 
const std::string & name () const
 

Private Attributes

int m_sector
 
int m_pad_id
 
unsigned long int m_debug
 
CMAdata::PatternsList m_cma_patterns
 
std::unique_ptr< Padm_pad
 
int m_number
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 19 of file PADpatterns.h.

Constructor & Destructor Documentation

◆ PADpatterns() [1/2]

PADpatterns::PADpatterns ( int  sector,
int  pad,
unsigned long int  debug 
)

Definition at line 11 of file PADpatterns.cxx.

11  :
12  RPCtrigDataObject(0,"PAD patterns"),m_sector(sector),m_pad_id(pad),
13  m_debug(debug)
14 {
15 }

◆ PADpatterns() [2/2]

PADpatterns::PADpatterns ( const PADpatterns PAD)

Definition at line 17 of file PADpatterns.cxx.

17  :
18  RPCtrigDataObject(PAD.number(),PAD.name())
19 {
20  m_sector = PAD.sector();
21  m_pad_id = PAD.pad_id();
22  m_debug = PAD.debug();
24 }

Member Function Documentation

◆ cma_patterns()

const CMAdata::PatternsList& PADpatterns::cma_patterns ( void  ) const
inline

Definition at line 52 of file PADpatterns.h.

53  {return m_cma_patterns;}

◆ debug()

unsigned long int PADpatterns::debug ( void  ) const
inline

Definition at line 50 of file PADpatterns.h.

50 {return m_debug;}

◆ give_pad()

Pad * PADpatterns::give_pad ( const RpcCablingCondData readCdo,
int  NOBXS,
int  BCZERO 
)

Definition at line 81 of file PADpatterns.cxx.

82 {
83  if (!m_pad)
84  {
85  int subsystem = (m_sector<32)? 0 : 1;
86  int logic_sector = m_sector%32;
87 
89 
90  // M.Corradi 26/2/2010 check if old cabling from cma data !
91  bool oldSimulation = false;
92  if (cma!=m_cma_patterns.end()) {
93  if ( (*cma)->cma_parameters().conf_type() != CMAparameters::Atlas){
94  oldSimulation = true;
95  }
96  }
97 
98  m_pad = std::make_unique<Pad>(0,0,m_debug,subsystem,logic_sector,m_pad_id,1,oldSimulation, NOBXS);
99 
100  //M.Corradi 8/1/2015 get Pad configuration Parameters
101  bool eta_and_phi, feet_on;
102  unsigned short int cma_mask, feet_th0, feet_th1, feet_th2 ;
103 
104  if (readCdo->give_Pad_Parameters((unsigned short int)m_sector,
105  (unsigned short int)m_pad_id,
106  feet_on,eta_and_phi,cma_mask,
107  feet_th0,feet_th1,feet_th2)){
108  m_pad->setFeetOn(feet_on);
109  m_pad->setFeetThresholds(0,feet_th0);
110  m_pad->setFeetThresholds(1,feet_th1);
111  m_pad->setFeetThresholds(2,feet_th2);
112  // m_pad->display(1);
113  // MASK AND eta_and_phi to be implemented
114 
115  }else {
116  std::runtime_error("Could not retrieve Pad Parameters m_sector, m_pad_id = " +
118  }
119 
120 
121  while(cma != m_cma_patterns.end())
122  {
123  Matrix* low_pt_matrix = (*cma)->give_low_pt_matrix(NOBXS, BCZERO);
124  Matrix* high_pt_matrix = (*cma)->give_high_pt_matrix(NOBXS, BCZERO);
125 
126  CMAidentity id = (*cma)->cma_parameters().id();
127  int matrix_view = (id.type() == Phi)? 1 : 0;
128  int matrix_id = id.Ixx_index();
129 
130  for (int bunch=0;bunch< NOBXS;++bunch)
131  {
132  m_pad->load(0,matrix_view,matrix_id,bunch,
133  low_pt_matrix->getOutputThres(bunch),
134  low_pt_matrix->getOutputOverl(bunch));
135 
136  m_pad->load(1,matrix_view,matrix_id,bunch,
137  high_pt_matrix->getOutputThres(bunch),
138  high_pt_matrix->getOutputOverl(bunch));
139  }
140  ++cma;
141  }
142 
143  m_pad->execute();
144  }
145  return m_pad.get();
146 }

◆ load_cma_patterns()

void PADpatterns::load_cma_patterns ( CMApatterns patterns)

Definition at line 67 of file PADpatterns.cxx.

68 {
69  m_cma_patterns.push_back(patterns);
70 }

◆ name()

const 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 PADpatterns::operator!= ( const PADpatterns patterns) const

Definition at line 50 of file PADpatterns.cxx.

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

◆ operator<()

bool PADpatterns::operator< ( const PADpatterns patterns) const

Definition at line 56 of file PADpatterns.cxx.

58 {
59  if(m_sector < patterns.sector())
60  {
61  if (m_pad_id < patterns.pad_id() ) return true;
62  }
63  return false;
64 }

◆ operator<<()

PADpatterns & PADpatterns::operator<< ( CMApatterns patterns)

Definition at line 73 of file PADpatterns.cxx.

75 {
76  this->load_cma_patterns(patterns);
77  return *this;
78 }

◆ operator=()

PADpatterns PADpatterns::operator= ( const PADpatterns PAD)

Definition at line 27 of file PADpatterns.cxx.

28 {
29  static_cast<RPCtrigDataObject&>(*this) =
30  static_cast<const RPCtrigDataObject&>(PAD);
31  m_sector = PAD.sector();
32  m_pad_id = PAD.pad_id();
33  m_debug = PAD.debug();
34  m_cma_patterns.clear();
36  return *this;
37 }

◆ operator==()

bool PADpatterns::operator== ( const PADpatterns patterns) const

Definition at line 40 of file PADpatterns.cxx.

41 {
42  if(m_sector == patterns.sector())
43  {
44  if (m_pad_id == patterns.pad_id() ) return true;
45  }
46  return false;
47 }

◆ pad_id()

int PADpatterns::pad_id ( void  ) const
inline

Definition at line 49 of file PADpatterns.h.

49 {return m_pad_id;}

◆ Print()

void PADpatterns::Print ( std::ostream &  stream,
bool  detail 
) const
virtual

Reimplemented from BaseObject.

Definition at line 149 of file PADpatterns.cxx.

150 {
151  stream << name() << " (Id = " << m_pad_id << ") in sector logic "
152  << m_sector << std::endl;
153  stream << "It contains n. " << m_cma_patterns.size()
154  << " CMAs";
155 
156  if(detail)
157  {
158  stream << " :" << std::endl;
159  CMAdata::PatternsList::const_iterator cma = m_cma_patterns.begin();
160  while (cma != m_cma_patterns.end())
161  {
162  (*cma)->Print(stream,false);
163  ++cma;
164  }
165  }
166  else stream << "." << std::endl;
167 }

◆ PrintElement()

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

Definition at line 31 of file RPCtrigDataObject.h.

31 {}

◆ sector()

int PADpatterns::sector ( void  ) const
inline

Definition at line 48 of file PADpatterns.h.

48 {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_cma_patterns

CMAdata::PatternsList PADpatterns::m_cma_patterns
private

Definition at line 29 of file PADpatterns.h.

◆ m_debug

unsigned long int PADpatterns::m_debug
private

Definition at line 27 of file PADpatterns.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

std::unique_ptr<Pad> PADpatterns::m_pad
private

Definition at line 32 of file PADpatterns.h.

◆ m_pad_id

int PADpatterns::m_pad_id
private

Definition at line 26 of file PADpatterns.h.

◆ m_sector

int PADpatterns::m_sector
private

Definition at line 25 of file PADpatterns.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:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
Matrix
Definition: Trigger/TrigT1/TrigT1RPChardware/TrigT1RPChardware/Matrix.h:15
PADpatterns::cma_patterns
const CMAdata::PatternsList & cma_patterns(void) const
Definition: PADpatterns.h:52
RPCtrigDataObject::m_number
int m_number
Definition: RPCtrigDataObject.h:17
RPCtrigDataObject::RPCtrigDataObject
RPCtrigDataObject(int, const std::string &)
Definition: RPCtrigDataObject.cxx:10
BaseObject::name
const std::string & name() const
Definition: BaseObject.h:23
Matrix::getOutputThres
ubit16 getOutputThres(ubit16 bunch) const
Definition: Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx:1762
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
PADpatterns::m_sector
int m_sector
Definition: PADpatterns.h:25
PADpatterns::pad_id
int pad_id(void) const
Definition: PADpatterns.h:49
detail
Definition: extract_histogram_tag.cxx:14
Phi
@ Phi
Definition: RPCdef.h:8
PADpatterns::m_cma_patterns
CMAdata::PatternsList m_cma_patterns
Definition: PADpatterns.h:29
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
PADpatterns::m_debug
unsigned long int m_debug
Definition: PADpatterns.h:27
PADpatterns::load_cma_patterns
void load_cma_patterns(CMApatterns *)
Definition: PADpatterns.cxx:67
RpcCablingCondData::give_Pad_Parameters
virtual bool give_Pad_Parameters(unsigned short int logic_sector, unsigned short int PADId, bool &feet, bool &eta_and_phi, unsigned short int &cma_mask, unsigned short int &feet_th0, unsigned short int &feet_th1, unsigned short int &feet_th2) const
Definition: RpcCablingCondData.cxx:405
PADpatterns::m_pad
std::unique_ptr< Pad > m_pad
Definition: PADpatterns.h:32
Matrix::getOutputOverl
ubit16 getOutputOverl(ubit16 bunch) const
Definition: Trigger/TrigT1/TrigT1RPChardware/src/Matrix.cxx:1764
CMAidentity::Ixx_index
int Ixx_index() const
Definition: CMAidentity.cxx:123
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
CMAidentity
Definition: CMAidentity.h:16
RPCtrigDataObject::number
int number(void) const
Definition: RPCtrigDataObject.h:29
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
PADpatterns::sector
int sector(void) const
Definition: PADpatterns.h:48
CMAparameters::Atlas
@ Atlas
Definition: CMAparameters.h:23
L1TopoSimulationConfig.subsystem
subsystem
Definition: L1TopoSimulationConfig.py:263
PADpatterns::m_pad_id
int m_pad_id
Definition: PADpatterns.h:26
PADpatterns::debug
unsigned long int debug(void) const
Definition: PADpatterns.h:50