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

#include <PADdata.h>

Inheritance diagram for PADdata:
Collaboration diagram for PADdata:

Public Types

typedef std::list< PADpatternsPATTERNSlist
 
typedef std::list< PADpatterns * > PatternsList
 

Public Member Functions

 PADdata (CMAdata *, unsigned long int)
 
 PADdata (const PADdata &)
 
 ~PADdata ()
 
PADdata operator= (const PADdata &)
 
unsigned long int debug (void) const
 
const PATTERNSlistpad_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_pad_patterns (CMApatterns *)
 
PADpatternsfind (const int, const int)
 

Private Attributes

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

Detailed Description

Definition at line 15 of file PADdata.h.

Member Typedef Documentation

◆ PATTERNSlist

typedef std::list< PADpatterns > PADdata::PATTERNSlist

Definition at line 18 of file PADdata.h.

◆ PatternsList

typedef std::list< PADpatterns* > PADdata::PatternsList

Definition at line 19 of file PADdata.h.

Constructor & Destructor Documentation

◆ PADdata() [1/2]

PADdata::PADdata ( CMAdata cma_data,
unsigned long int  debug 
)

Definition at line 9 of file PADdata.cxx.

9  :
10  BaseObject(Data,"PAD data"),m_debug(debug)
11 {
12  m_pad_patterns.clear();
13 
14  CMAdata::PatternsList cma_patterns = cma_data->give_patterns();
15  CMAdata::PatternsList::const_iterator CMApatterns = cma_patterns.begin();
16 
17  while(CMApatterns != cma_patterns.end())
18  {
20  ++CMApatterns;
21  }
22 }

◆ PADdata() [2/2]

PADdata::PADdata ( const PADdata pad_data)

Definition at line 24 of file PADdata.cxx.

24  :
25  BaseObject(Data,pad_data.name()),
26  m_debug(pad_data.debug()),
27  m_pad_patterns(pad_data.pad_patterns())
28 {
29 }

◆ ~PADdata()

PADdata::~PADdata ( )

Definition at line 31 of file PADdata.cxx.

32 {
33  m_pad_patterns.clear();
34 }

Member Function Documentation

◆ create_pad_patterns()

void PADdata::create_pad_patterns ( CMApatterns cma_patterns)
private

Definition at line 47 of file PADdata.cxx.

48 {
49  const int pad_id = cma_patterns->cma_parameters().id().PAD_index();
50  const int sector = cma_patterns->sector();
51  PADpatterns* patterns = find(sector,pad_id);
52  if(patterns) patterns->load_cma_patterns(cma_patterns);
53  else {
54  PADpatterns thePatterns(sector,pad_id,m_debug);
55  thePatterns.load_cma_patterns(cma_patterns);
56  m_pad_patterns.push_back(thePatterns);
57  }
58 }

◆ debug()

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

Definition at line 37 of file PADdata.h.

37 {return m_debug;}

◆ find()

PADpatterns * PADdata::find ( const int  sector,
const int  pad_id 
)
private

Definition at line 62 of file PADdata.cxx.

63 {
65  while (it != m_pad_patterns.end())
66  {
67  if((*it).pad_id() == pad_id &&
68  (*it).sector() == sector ) return &(*it);
69  ++it;
70  }
71 
72  return 0;
73 }

◆ give_patterns()

PADdata::PatternsList PADdata::give_patterns ( void  )

Definition at line 77 of file PADdata.cxx.

78 {
80 
82 
83  while(pad != m_pad_patterns.end())
84  {
85  patterns.push_back(&(*pad));
86  ++pad;
87  }
88 
89  return patterns;
90 }

◆ name()

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

Definition at line 23 of file BaseObject.h.

23 { return m_name; }

◆ operator=()

PADdata PADdata::operator= ( const PADdata pad_data)

Definition at line 37 of file PADdata.cxx.

38 {
39  static_cast<BaseObject&>(*this) = static_cast<const BaseObject&>(pad_data);
40  m_pad_patterns.clear();
41  m_pad_patterns = pad_data.pad_patterns();
42  m_debug = pad_data.debug();
43  return *this;
44 }

◆ pad_patterns()

const PATTERNSlist& PADdata::pad_patterns ( void  ) const
inline

Definition at line 39 of file PADdata.h.

39 {return m_pad_patterns;}

◆ Print()

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

Reimplemented from BaseObject.

Definition at line 121 of file PADdata.cxx.

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

◆ PrintElement()

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

Definition at line 93 of file PADdata.cxx.

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

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

Definition at line 22 of file PADdata.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_pad_patterns

PATTERNSlist PADdata::m_pad_patterns
private

Definition at line 23 of file PADdata.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
BaseObject::name
const std::string & name() const
Definition: BaseObject.h:23
BaseObject::m_name
std::string m_name
Definition: BaseObject.h:16
patterns
std::vector< std::string > patterns
Definition: listroot.cxx:187
Data
@ Data
Definition: BaseObject.h:11
skel.it
it
Definition: skel.GENtoEVGEN.py:396
PADdata::m_pad_patterns
PATTERNSlist m_pad_patterns
Definition: PADdata.h:23
detail
Definition: extract_histogram_tag.cxx:14
CMAparameters::id
const CMAidentity & id() const
Definition: CMAparameters.cxx:17
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
PADpatterns
Definition: PADpatterns.h:20
CMAdata::PatternsList
std::list< CMApatterns * > PatternsList
Definition: CMAdata.h:22
PADdata::PatternsList
std::list< PADpatterns * > PatternsList
Definition: PADdata.h:19
CMApatterns::cma_parameters
const CMAparameters & cma_parameters(void) const
Definition: CMApatterns.h:87
CMAdata::give_patterns
PatternsList give_patterns(void)
Definition: CMAdata.cxx:139
PADdata::m_debug
unsigned long int m_debug
Definition: PADdata.h:22
PADdata::pad_patterns
const PATTERNSlist & pad_patterns(void) const
Definition: PADdata.h:39
PADdata::debug
unsigned long int debug(void) const
Definition: PADdata.h:37
PADdata::create_pad_patterns
void create_pad_patterns(CMApatterns *)
Definition: PADdata.cxx:47
BaseObject
Definition: BaseObject.h:13
BaseObject::BaseObject
BaseObject(ObjectType, const std::string &)
Definition: BaseObject.cxx:7
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
CMAidentity::PAD_index
int PAD_index() const
Definition: CMAidentity.cxx:122
BaseObject::m_tag
ObjectType m_tag
Definition: BaseObject.h:15
CMApatterns::sector
int sector(void) const
Definition: CMApatterns.h:86
CMApatterns
Definition: CMApatterns.h:21
PADdata::find
PADpatterns * find(const int, const int)
Definition: PADdata.cxx:62