ATLAS Offline Software
Public Member Functions | Public Attributes | Private Member Functions | List of all members
python.iconfTool.gui.wrappers.GuiLoader Class Reference
Collaboration diagram for python.iconfTool.gui.wrappers.GuiLoader:

Public Member Functions

None __init__ (self, ComponentsFileLoader data_loader)
 
None load_gui (self)
 
None search (self, bool strict=False)
 
None refresh_whole_screen (self)
 
def show_help (self)
 

Public Attributes

 width
 
 window
 
 pad
 
 pad_height
 
 screen
 
 data_structure
 

Private Member Functions

None _initialize_window (self)
 
None _initialize (self, stdscreen)
 
None _start_event_loop (self)
 

Detailed Description

Definition at line 22 of file wrappers.py.

Constructor & Destructor Documentation

◆ __init__()

None python.iconfTool.gui.wrappers.GuiLoader.__init__ (   self,
ComponentsFileLoader  data_loader 
)

Definition at line 23 of file wrappers.py.

23  def __init__(self, data_loader: ComponentsFileLoader) -> None:
24  self.data_loader: ComponentsFileLoader = data_loader
25  self.data_structure: ComponentsStructure = self.data_loader.get_data()
26  self.width: int = 0
27  self.height: int = 0
28  self.pad_height: int = 0
29  self.pad: Pad
30  self.actual_offset: int = 0
31  self.screen: Any
32 

Member Function Documentation

◆ _initialize()

None python.iconfTool.gui.wrappers.GuiLoader._initialize (   self,
  stdscreen 
)
private

Definition at line 40 of file wrappers.py.

40  def _initialize(self, stdscreen) -> None:
41  self.screen = stdscreen
42  self.screen.refresh()
43  self._initialize_window()
44  self._start_event_loop()
45 

◆ _initialize_window()

None python.iconfTool.gui.wrappers.GuiLoader._initialize_window (   self)
private

Definition at line 33 of file wrappers.py.

33  def _initialize_window(self) -> None:
34  self.height, self.width = self.screen.getmaxyx()
35  self.window = curses.newwin(self.height, self.width, 0, 0)
36  self.pad = Pad(self.data_structure, self.width, self.height)
37  self.pad_height = self.height - 1
38  self.pad.refresh()
39 

◆ _start_event_loop()

None python.iconfTool.gui.wrappers.GuiLoader._start_event_loop (   self)
private

Definition at line 81 of file wrappers.py.

81  def _start_event_loop(self) -> None:
82  self.show_help()
83  while True:
84  event: int = self.screen.getch()
85  logger.debug(f"Key pressed: [{event}, {chr(event)}]")
86  if event == ord("q"):
87  break
88  elif event == ord("m"):
89  self.search()
90  elif event == ord("h"):
91  self.show_help()
92  elif event == ord("r"):
93  self.data_structure = self.data_loader.get_data()
94  self.pad.reload_data(self.data_structure)
95  self.pad.redraw()
96  else:
97  self.pad.handle_event(event)
98 
99 

◆ load_gui()

None python.iconfTool.gui.wrappers.GuiLoader.load_gui (   self)

Definition at line 46 of file wrappers.py.

46  def load_gui(self) -> None:
47  curses.wrapper(self._initialize)
48 

◆ refresh_whole_screen()

None python.iconfTool.gui.wrappers.GuiLoader.refresh_whole_screen (   self)

Definition at line 63 of file wrappers.py.

63  def refresh_whole_screen(self) -> None:
64  self.window.refresh()
65  self.pad.refresh()
66 

◆ search()

None python.iconfTool.gui.wrappers.GuiLoader.search (   self,
bool   strict = False 
)

Definition at line 49 of file wrappers.py.

49  def search(self, strict: bool = False) -> None:
50  search_size: int = 50
51  b_starty: int = 0
52  b_startx: int = self.width - search_size - 2
53  b_width: int = search_size
54  b_height: int = 3
55  cursor_pos: Tuple[int, int] = curses.getsyx()
56  search: SearchModal = SearchModal(
57  b_startx, b_starty, b_width, b_height
58  )
59  text: str = search.edit()
60  curses.setsyx(cursor_pos[0], cursor_pos[1])
61  self.pad.filter(text)
62 

◆ show_help()

def python.iconfTool.gui.wrappers.GuiLoader.show_help (   self)

Definition at line 67 of file wrappers.py.

67  def show_help(self):
68  search_size: int = 60
69  b_width: int = search_size
70  b_height: int = 15
71  b_starty: int = self.screen.getmaxyx()[0] - b_height
72  b_startx: int = self.width - search_size - 2
73  cursor_pos: Tuple[int, int] = curses.getsyx()
74  search: SingleHelpModal = SingleHelpModal(
75  b_startx, b_starty, b_width, b_height
76  )
77  curses.setsyx(*cursor_pos)
78  search.show_help()
79  self.pad.initialize_cursor()
80 

Member Data Documentation

◆ data_structure

python.iconfTool.gui.wrappers.GuiLoader.data_structure

Definition at line 93 of file wrappers.py.

◆ pad

python.iconfTool.gui.wrappers.GuiLoader.pad

Definition at line 36 of file wrappers.py.

◆ pad_height

python.iconfTool.gui.wrappers.GuiLoader.pad_height

Definition at line 37 of file wrappers.py.

◆ screen

python.iconfTool.gui.wrappers.GuiLoader.screen

Definition at line 41 of file wrappers.py.

◆ width

python.iconfTool.gui.wrappers.GuiLoader.width

Definition at line 34 of file wrappers.py.

◆ window

python.iconfTool.gui.wrappers.GuiLoader.window

Definition at line 35 of file wrappers.py.


The documentation for this class was generated from the following file:
search
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition: hcg.cxx:738
covarianceTool.filter
filter
Definition: covarianceTool.py:514
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
Pad
Definition: Pad.h:10