ATLAS Offline Software
Loading...
Searching...
No Matches
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}
@ Data
Definition BaseObject.h:11
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7
unsigned long int debug(void) const
Definition CMAdata.h:45
unsigned long int m_debug
Definition CMAdata.h:25
PATTERNSlist m_eta_cma_patterns
Definition CMAdata.h:27
PATTERNSlist m_phi_cma_patterns
Definition CMAdata.h:28

◆ 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"),
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}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
ViewType
Definition RPCdef.h:8
void create_patterns(const CMAparameters *, const RPCdigit *)
Definition CMAdata.cxx:90
std::list< const CMAparameters * > CMAlist
virtual digitList phi_digits_list(void) const =0
std::list< const RPCdigit * > digitList
Definition RPCdata.h:21
virtual digitList eta_digits_list(void) const =0
const CMAparameters::CMAlist give_CMAs(const int logic_sector, const ViewType side, const int station, const int cabling_code) const
list(name, path='/')
Definition histSizes.py:38

◆ 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()),
67{
68}
const std::string & name() const
Definition BaseObject.h:23
const PATTERNSlist & phi_cma_patterns(void) const
Definition CMAdata.h:49
const PATTERNSlist & eta_cma_patterns(void) const
Definition CMAdata.h:47

◆ ~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{
92 CMApatterns* patterns;
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}
@ Phi
Definition RPCdef.h:8
@ Eta
Definition RPCdef.h:8
CMApatterns * find(const int, const CMAparameters *)
Definition CMAdata.cxx:109
std::vector< std::string > patterns
Definition listroot.cxx:187

◆ 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 {
115 PATTERNSlist::iterator it = m_eta_cma_patterns.begin();
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 {
125 PATTERNSlist::iterator it = m_phi_cma_patterns.begin();
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}
ViewType type() const
const CMAidentity & id() const

◆ give_patterns()

CMAdata::PatternsList CMAdata::give_patterns ( void )

Definition at line 139 of file CMAdata.cxx.

140{
142
143 PATTERNSlist::iterator eta = m_eta_cma_patterns.begin();
144 PATTERNSlist::iterator phi = m_phi_cma_patterns.begin();
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}
std::list< CMApatterns * > PatternsList
Definition CMAdata.h:22

◆ 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

◆ 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}
constexpr int nEta
Default bin number of eta for vertex map.
constexpr int nPhi
Default bin number of phi for vertex map.

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