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

#include <CMAdata.h>

Inheritance diagram for CMAdata:
Collaboration diagram for CMAdata:

Public Types

typedef std::list< CMApatternsPATTERNSlist
 
typedef std::list< CMApatterns * > PatternsList
 

Public Member Functions

 CMAdata (unsigned long int)
 
 CMAdata (const RPCdata *rpcData, const RpcCablingCondData *rpcCabling, const unsigned long int debug)
 
 CMAdata (const CMAdata &)
 
 ~CMAdata ()
 
CMAdata operator= (const CMAdata &)
 
void create_patterns (const CMAparameters *, const RPCdigit *)
 
unsigned long int debug (void) const
 
const PATTERNSlisteta_cma_patterns (void) const
 
const PATTERNSlistphi_cma_patterns (void) const
 
PatternsList give_patterns (void)
 
void PrintElement (std::ostream &, std::string, bool) const
 
void Print (std::ostream &, bool) const
 
ObjectType tag () const
 
const std::string & name () const
 

Private Member Functions

CMApatternsfind (const int, const CMAparameters *)
 

Private Attributes

unsigned long int m_debug
 
PATTERNSlist m_eta_cma_patterns
 
PATTERNSlist m_phi_cma_patterns
 
ObjectType m_tag
 
std::string m_name
 

Detailed Description

Definition at line 18 of file CMAdata.h.

Member Typedef Documentation

◆ PATTERNSlist

typedef std::list< CMApatterns > CMAdata::PATTERNSlist

Definition at line 21 of file CMAdata.h.

◆ PatternsList

typedef std::list< CMApatterns* > CMAdata::PatternsList

Definition at line 22 of file CMAdata.h.

Constructor & Destructor Documentation

◆ CMAdata() [1/3]

CMAdata::CMAdata ( unsigned long int  debug)

Definition at line 7 of file CMAdata.cxx.

7  :
8  BaseObject(Data,"CMApatterns"),m_debug(debug)
9 {
10  m_eta_cma_patterns.clear();
11  m_phi_cma_patterns.clear();
12 }

◆ CMAdata() [2/3]

CMAdata::CMAdata ( const RPCdata rpcData,
const RpcCablingCondData rpcCabling,
const unsigned long int  debug 
)

Definition at line 14 of file CMAdata.cxx.

14  :
15  BaseObject(Data,"CMApatterns"),
16  m_debug(debug)
17 {
18  m_eta_cma_patterns.clear();
19  m_phi_cma_patterns.clear();
20 
22  RPCdata::digitList::const_iterator digi = eta.begin();
23 
24  while(digi != eta.end())
25  {
26  const int sector = (*digi)->decoding().logic_sector();
27  const ViewType type = (*digi)->decoding().view();
28  const int station = (*digi)->decoding().lvl1_station();
29  const int cabling_code = (*digi)->decoding().cabling_code();
30 
31  const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
32  CMAparameters::CMAlist::const_iterator cma = list.begin();
33  while(cma != list.end())
34  {
35  create_patterns(*cma,*digi);
36  ++cma;
37  }
38  ++digi;
39  }
40 
42  digi = phi.begin();
43  while(digi != phi.end())
44  {
45  const int sector = (*digi)->decoding().logic_sector();
46  const ViewType type = (*digi)->decoding().view();
47  const int station = (*digi)->decoding().lvl1_station();
48  const int cabling_code = (*digi)->decoding().cabling_code();
49 
50  const CMAparameters::CMAlist list = rpcCabling->give_CMAs(sector,type,station,cabling_code);
51  CMAparameters::CMAlist::const_iterator cma = list.begin();
52  while(cma != list.end())
53  {
54  create_patterns(*cma,*digi);
55  ++cma;
56  }
57  ++digi;
58  }
59 }

◆ CMAdata() [3/3]

CMAdata::CMAdata ( const CMAdata cma_patterns)

Definition at line 62 of file CMAdata.cxx.

62  :
63  BaseObject(Data,cma_patterns.name()),
64  m_debug(cma_patterns.debug()),
65  m_eta_cma_patterns(cma_patterns.eta_cma_patterns()),
66  m_phi_cma_patterns(cma_patterns.phi_cma_patterns())
67 {
68 }

◆ ~CMAdata()

CMAdata::~CMAdata ( )

Definition at line 70 of file CMAdata.cxx.

71 {
72  m_eta_cma_patterns.clear();
73  m_phi_cma_patterns.clear();
74 }

Member Function Documentation

◆ create_patterns()

void CMAdata::create_patterns ( const CMAparameters cma,
const RPCdigit digit 
)

Definition at line 90 of file CMAdata.cxx.

91 {
93 
94  const int sector = digit->decoding().logic_sector();
95  const ViewType type = digit->decoding().view();
96 
97  if( (patterns = find(sector,cma)) ) patterns->load_digit(digit);
98  else
99  {
100  CMApatterns patterns(sector,cma,m_debug);
101  patterns.load_digit(digit);
102  if(type == Eta) m_eta_cma_patterns.push_back(std::move(patterns));
103  else if (type == Phi) m_phi_cma_patterns.push_back(std::move(patterns));
104  }
105 }

◆ debug()

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

Definition at line 45 of file CMAdata.h.

45 {return m_debug;}

◆ eta_cma_patterns()

const PATTERNSlist& CMAdata::eta_cma_patterns ( void  ) const
inline

Definition at line 47 of file CMAdata.h.

48  {return m_eta_cma_patterns;}

◆ find()

CMApatterns * CMAdata::find ( const int  sector,
const CMAparameters cma 
)
private

Definition at line 109 of file CMAdata.cxx.

110 {
111  const ViewType view = cma->id().type();
112 
113  if(view == Eta)
114  {
116  while (it != m_eta_cma_patterns.end())
117  {
118  if((*it).cma_parameters() == *cma &&
119  (*it).sector() == sector ) return &(*it);
120  ++it;
121  }
122  }
123  else if (view == Phi)
124  {
126  while (it != m_phi_cma_patterns.end())
127  {
128  if((*it).cma_parameters() == *cma &&
129  (*it).sector() == sector ) return &(*it);
130  ++it;
131  }
132  }
133 
134  return 0;
135 }

◆ give_patterns()

CMAdata::PatternsList CMAdata::give_patterns ( void  )

Definition at line 139 of file CMAdata.cxx.

140 {
142 
145 
146  while(eta != m_eta_cma_patterns.end())
147  {
148  patterns.push_back(&(*eta));
149  ++eta;
150  }
151  while(phi != m_phi_cma_patterns.end())
152  {
153  patterns.push_back(&(*phi));
154  ++phi;
155  }
156  return patterns;
157 }

◆ name()

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

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ operator=()

CMAdata CMAdata::operator= ( const CMAdata cma_patterns)

Definition at line 77 of file CMAdata.cxx.

78 {
79  static_cast<BaseObject&>(*this) =
80  static_cast<const BaseObject&>(cma_patterns);
81  m_eta_cma_patterns.clear();
82  m_phi_cma_patterns.clear();
83  m_eta_cma_patterns = cma_patterns.eta_cma_patterns();
84  m_phi_cma_patterns = cma_patterns.phi_cma_patterns();
85  m_debug = cma_patterns.debug();
86  return *this;
87 }

◆ phi_cma_patterns()

const PATTERNSlist& CMAdata::phi_cma_patterns ( void  ) const
inline

Definition at line 49 of file CMAdata.h.

50  {return m_phi_cma_patterns;}

◆ Print()

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

Reimplemented from BaseObject.

Definition at line 202 of file CMAdata.cxx.

203 {
204  stream << name() << " contains "
205  << eta_cma_patterns().size()
206  << " eta patterns and " << phi_cma_patterns().size()
207  << " phi patterns" << std::endl;
208 
209  PATTERNSlist::const_iterator eta = eta_cma_patterns().begin();
210  PATTERNSlist::const_iterator phi = phi_cma_patterns().begin();
211 
212  while(eta != eta_cma_patterns().end())
213  {
214  (*eta).Print(stream,detail);
215  ++eta;
216  }
217  while(phi != phi_cma_patterns().end())
218  {
219  (*phi).Print(stream,detail);
220  ++phi;
221  }
222 }

◆ PrintElement()

void CMAdata::PrintElement ( std::ostream &  stream,
std::string  element,
bool  detail 
) const

Definition at line 160 of file CMAdata.cxx.

162 {
163  bool all = (element == name() || element == "")? true : false;
164  bool nEta = eta_cma_patterns().size();
165  bool nPhi = phi_cma_patterns().size();
166  bool printed = false;
167 
168  if(nEta && (element == (*m_eta_cma_patterns.begin()).name() || all))
169  {
170  stream << name() << " contains " << eta_cma_patterns().size()
171  << " eta patterns:" << std::endl;
172  printed = true;
173  PATTERNSlist::const_iterator it = m_eta_cma_patterns.begin();
174  while(it != m_eta_cma_patterns.end())
175  {
176  it->Print(stream,detail);
177  ++it;
178  }
179  }
180 
181  if (nPhi && (element == (*m_phi_cma_patterns.begin()).name() || all))
182  {
183  stream << name() << " contains " << phi_cma_patterns().size()
184  << " phi patterns:" << std::endl;
185  printed = true;
186  PATTERNSlist::const_iterator it = m_phi_cma_patterns.begin();
187  while(it != m_phi_cma_patterns.end())
188  {
189  it->Print(stream,detail);
190  ++it;
191  }
192  }
193 
194  if(!printed)
195  {
196  if (element == "") element = "CMAs";
197  stream << name() << " contains no " << element << "!" << std::endl;
198  }
199 }

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22 { return m_tag; }

Member Data Documentation

◆ m_debug

unsigned long int CMAdata::m_debug
private

Definition at line 25 of file CMAdata.h.

◆ m_eta_cma_patterns

PATTERNSlist CMAdata::m_eta_cma_patterns
private

Definition at line 27 of file CMAdata.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_phi_cma_patterns

PATTERNSlist CMAdata::m_phi_cma_patterns
private

Definition at line 28 of file CMAdata.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
CMAdata::debug
unsigned long int debug(void) const
Definition: CMAdata.h:45
BaseObject::name
const std::string & name() const
Definition: BaseObject.h:23
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
CMAdata::create_patterns
void create_patterns(const CMAparameters *, const RPCdigit *)
Definition: CMAdata.cxx:90
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
CMAdata::m_debug
unsigned long int m_debug
Definition: CMAdata.h:25
CMAidentity::type
ViewType type() const
Definition: CMAidentity.cxx:117
Data
@ Data
Definition: BaseObject.h:11
skel.it
it
Definition: skel.GENtoEVGEN.py:396
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
CMAparameters::CMAlist
std::list< const CMAparameters * > CMAlist
Definition: CMAparameters.h:24
detail
Definition: extract_histogram_tag.cxx:14
CMAparameters::id
const CMAidentity & id() const
Definition: CMAparameters.cxx:17
Phi
@ Phi
Definition: RPCdef.h:8
RPCdata::eta_digits_list
virtual digitList eta_digits_list(void) const =0
CMAdata::m_eta_cma_patterns
PATTERNSlist m_eta_cma_patterns
Definition: CMAdata.h:27
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
CMAdata::find
CMApatterns * find(const int, const CMAparameters *)
Definition: CMAdata.cxx:109
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
CMAdata::PatternsList
std::list< CMApatterns * > PatternsList
Definition: CMAdata.h:22
CMAdata::m_phi_cma_patterns
PATTERNSlist m_phi_cma_patterns
Definition: CMAdata.h:28
ViewType
ViewType
Definition: RPCdef.h:8
CMAdata::eta_cma_patterns
const PATTERNSlist & eta_cma_patterns(void) const
Definition: CMAdata.h:47
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
BaseObject
Definition: BaseObject.h:13
BaseObject::BaseObject
BaseObject(ObjectType, const std::string &)
Definition: BaseObject.cxx:7
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
RPCdata::phi_digits_list
virtual digitList phi_digits_list(void) const =0
RPCdata::digitList
std::list< const RPCdigit * > digitList
Definition: RPCdata.h:21
CMApatterns
Definition: CMApatterns.h:21
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
RpcCablingCondData::give_CMAs
const CMAparameters::CMAlist give_CMAs(const int logic_sector, const ViewType side, const int station, const int cabling_code) const
Definition: RpcCablingCondData.cxx:178
CMAdata::phi_cma_patterns
const PATTERNSlist & phi_cma_patterns(void) const
Definition: CMAdata.h:49
Eta
@ Eta
Definition: RPCdef.h:8
drawFromPickle.view
view
Definition: drawFromPickle.py:294