ATLAS Offline Software
Loading...
Searching...
No Matches
python.TableConstructorBase.Column Class Reference
Collaboration diagram for python.TableConstructorBase.Column:

Public Member Functions

 __init__ (self, header="Unknown", headerDesc="Unknown", needNormalizing=False)
 addValue (self, value, index=-1)
 updateValue (self, value, index=-1)
 getValue (self, index)

Public Attributes

 header = header
 headerDesc = headerDesc
list content = []
 needNormalizing = needNormalizing

Detailed Description

 @brief Class representing a single csv column

Used in TableConstructor to store header description and values of csv column

Definition at line 18 of file TableConstructorBase.py.

Constructor & Destructor Documentation

◆ __init__()

python.TableConstructorBase.Column.__init__ ( self,
header = "Unknown",
headerDesc = "Unknown",
needNormalizing = False )
Column header

Definition at line 24 of file TableConstructorBase.py.

24 def __init__(self, header = "Unknown", headerDesc = "Unknown", needNormalizing = False):
25 '''Column header'''
26 self.header = header
27
28 '''Column description'''
29 self.headerDesc = headerDesc
30
31 '''The list storing column content'''
32 self.content = []
33
34 '''Flag if column needs normalization'''
35 self.needNormalizing = needNormalizing
36
37

Member Function Documentation

◆ addValue()

python.TableConstructorBase.Column.addValue ( self,
value,
index = -1 )
@brief Add value to the column 

Definition at line 38 of file TableConstructorBase.py.

38 def addValue(self, value, index=-1):
39 ''' @brief Add value to the column '''
40 if index < 0 or index >= len(self.content):
41 self.content.append(value)
42 else:
43 self.content[index] += value
44

◆ getValue()

python.TableConstructorBase.Column.getValue ( self,
index )
@brief Get value from column with given index

Definition at line 52 of file TableConstructorBase.py.

52 def getValue(self, index):
53 ''' @brief Get value from column with given index'''
54 if index >= len(self.content):
55 log.error("Index out of range")
56 return None
57 else:
58 return self.content[index]
59
60

◆ updateValue()

python.TableConstructorBase.Column.updateValue ( self,
value,
index = -1 )
@brief Add value to the column 

Definition at line 45 of file TableConstructorBase.py.

45 def updateValue(self, value, index=-1):
46 ''' @brief Add value to the column '''
47 if index < 0 or index >= len(self.content):
48 self.content.append(value)
49 else:
50 self.content[index] = value
51

Member Data Documentation

◆ content

list python.TableConstructorBase.Column.content = []

Definition at line 32 of file TableConstructorBase.py.

◆ header

python.TableConstructorBase.Column.header = header

Definition at line 26 of file TableConstructorBase.py.

◆ headerDesc

python.TableConstructorBase.Column.headerDesc = headerDesc

Definition at line 29 of file TableConstructorBase.py.

◆ needNormalizing

python.TableConstructorBase.Column.needNormalizing = needNormalizing

Definition at line 35 of file TableConstructorBase.py.


The documentation for this class was generated from the following file: