ATLAS Offline Software
Loading...
Searching...
No Matches
SLdata Class Reference

#include <SLdata.h>

Inheritance diagram for SLdata:
Collaboration diagram for SLdata:

Public Types

typedef std::list< SLpatternsPATTERNSlist
typedef std::list< SLpatterns * > PatternsList

Public Member Functions

 SLdata (PADdata *, unsigned long int)
 SLdata (const SLdata &)
 ~SLdata ()
SLdata operator= (const SLdata &)
unsigned long int debug (void) const
const PATTERNSlistsl_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

void create_sl_patterns (PADpatterns *)
SLpatternsfind (const int)

Private Attributes

unsigned long int m_debug
PATTERNSlist m_sl_patterns
ObjectType m_tag
std::string m_name

Detailed Description

Definition at line 15 of file SLdata.h.

Member Typedef Documentation

◆ PATTERNSlist

typedef std::list< SLpatterns > SLdata::PATTERNSlist

Definition at line 18 of file SLdata.h.

◆ PatternsList

typedef std::list< SLpatterns* > SLdata::PatternsList

Definition at line 19 of file SLdata.h.

Constructor & Destructor Documentation

◆ SLdata() [1/2]

SLdata::SLdata ( PADdata * pad_data,
unsigned long int debug )

Definition at line 8 of file SLdata.cxx.

8 :
9 BaseObject(Data,"Sector Logic data"),m_debug(debug)
10{
11 m_sl_patterns.clear();
12
13 PADdata::PatternsList pad_patterns = pad_data->give_patterns();
14 PADdata::PatternsList::const_iterator PADpatterns = pad_patterns.begin();
15
16 while(PADpatterns != pad_patterns.end())
17 {
18 create_sl_patterns(*PADpatterns);
19 ++PADpatterns;
20 }
21}
@ Data
Definition BaseObject.h:11
BaseObject(ObjectType, const std::string &)
Definition BaseObject.cxx:7
PatternsList give_patterns(void)
Definition PADdata.cxx:77
std::list< PADpatterns * > PatternsList
Definition PADdata.h:19
void create_sl_patterns(PADpatterns *)
Definition SLdata.cxx:46
unsigned long int m_debug
Definition SLdata.h:22
PATTERNSlist m_sl_patterns
Definition SLdata.h:24
unsigned long int debug(void) const
Definition SLdata.h:38

◆ SLdata() [2/2]

SLdata::SLdata ( const SLdata & sl_data)

Definition at line 23 of file SLdata.cxx.

23 :
24 BaseObject(Data,sl_data.name()),
25 m_debug(sl_data.debug()),
26 m_sl_patterns(sl_data.sl_patterns())
27{
28}
const std::string & name() const
Definition BaseObject.h:23
const PATTERNSlist & sl_patterns(void) const
Definition SLdata.h:40

◆ ~SLdata()

SLdata::~SLdata ( )

Definition at line 30 of file SLdata.cxx.

31{
32 m_sl_patterns.clear();
33}

Member Function Documentation

◆ create_sl_patterns()

void SLdata::create_sl_patterns ( PADpatterns * pad_patterns)
private

Definition at line 46 of file SLdata.cxx.

47{
48 SLpatterns* patterns;
49
50 const int sector = pad_patterns->sector();
51
52 if( (patterns = find(sector)) )
53 patterns->load_pad_patterns(pad_patterns);
54 else
55 {
56 SLpatterns patterns(sector,m_debug);
57 patterns.load_pad_patterns(pad_patterns);
58 m_sl_patterns.push_back(std::move(patterns));
59 }
60}
int sector(void) const
Definition PADpatterns.h:48
SLpatterns * find(const int)
Definition SLdata.cxx:64
std::vector< std::string > patterns
Definition listroot.cxx:187

◆ debug()

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

Definition at line 38 of file SLdata.h.

38{return m_debug;}

◆ find()

SLpatterns * SLdata::find ( const int sector)
private

Definition at line 64 of file SLdata.cxx.

65{
66 PATTERNSlist::iterator it = m_sl_patterns.begin();
67 while (it != m_sl_patterns.end())
68 {
69 if((*it).sector() == sector ) return &(*it);
70 ++it;
71 }
72
73 return 0;
74}

◆ give_patterns()

SLdata::PatternsList SLdata::give_patterns ( void )

Definition at line 78 of file SLdata.cxx.

79{
81
82 PATTERNSlist::iterator sl = m_sl_patterns.begin();
83
84 while(sl != m_sl_patterns.end())
85 {
86 patterns.push_back(&(*sl));
87 ++sl;
88 }
89
90 return patterns;
91}
std::list< SLpatterns * > PatternsList
Definition SLdata.h:19

◆ 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=()

SLdata SLdata::operator= ( const SLdata & sl_data)

Definition at line 36 of file SLdata.cxx.

37{
38 static_cast<BaseObject&>(*this) = static_cast<const BaseObject&>(sl_data);
39 m_sl_patterns.clear();
40 m_sl_patterns = sl_data.sl_patterns();
41 m_debug = sl_data.debug();
42 return *this;
43}

◆ Print()

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

Reimplemented from BaseObject.

Definition at line 122 of file SLdata.cxx.

123{
124 stream << name() << " contains "
125 << m_sl_patterns.size()
126 << " Sector Logic patterns " << std::endl;
127
128 PATTERNSlist::const_iterator sl = sl_patterns().begin();
129
130 while(sl != sl_patterns().end())
131 {
132 (*sl).Print(stream,detail);
133 ++sl;
134 }
135}

◆ PrintElement()

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

Definition at line 94 of file SLdata.cxx.

96{
97 bool all = (element == name() || element == "")? true : false;
98 bool nSL = m_sl_patterns.size();
99 bool printed = false;
100
101 if(nSL && (element == (*m_sl_patterns.begin()).name() || all))
102 {
103 stream << name() << " contains " << m_sl_patterns.size()
104 << " Sector Logic patterns:" << std::endl;
105 printed = true;
106 PATTERNSlist::const_iterator it = m_sl_patterns.begin();
107 while(it != m_sl_patterns.end())
108 {
109 it->Print(stream,detail);
110 ++it;
111 }
112 }
113
114 if(!printed)
115 {
116 if (element == "") element = "Sectors";
117 stream << name() << " contains no " << element << "!" << std::endl;
118 }
119}

◆ sl_patterns()

const PATTERNSlist & SLdata::sl_patterns ( void ) const
inline

Definition at line 40 of file SLdata.h.

40{return m_sl_patterns;}

◆ 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 SLdata::m_debug
private

Definition at line 22 of file SLdata.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_sl_patterns

PATTERNSlist SLdata::m_sl_patterns
private

Definition at line 24 of file SLdata.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: