-
Notifications
You must be signed in to change notification settings - Fork 2
/
Event.py
64 lines (53 loc) · 2.23 KB
/
Event.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 23 03:12:19 2020
@author: yaroslav
"""
import os
script_dir = os.getcwd()
class Event:
list_of_events = []
def __init__(self, size=0, distance=0, length=0, width=0, azwidth=0,
miss=0, alpha=0, event_number=0, day=0, cleaning_id=0, cleaning_parameters=0):
self.size = size # 1
self.distance = distance # 2
self.length = length # 3
self.width = width # 4
self.azwidth = azwidth # 5
self.miss = miss # 6
self.alpha = alpha # 7
self.event_number = event_number # 8
self.day = day # 9
self.cleaning_id = cleaning_id # 10
self.cleaning_parameters = cleaning_parameters # 12
self.list_of_events.append (self)
def show_item (self):
print("{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}\n{}\t{}".format(
"event_number:", self.event_number, # 1
"day:", self.day, # 2
"size:", self.size, # 3
"distance:", self.distance, # 4
"length", self.length, # 5
"width:", self.width, # 6
"azwidth:", self.azwidth, # 7
"miss", self.miss, # 8
"alpha:", self.alpha, # 9
"cleaning_id:", self.cleaning_id, # 10
"cleaning_parameters:", self.cleaning_parameters # 11
)) # 9
def string_of_values (self):
return ("{} {} {} {} {} {} {} {} {} {} {} {} {}\n".format(
self.event_number, self.day,self.size, # 3
self.distance, self.length, self.width, # 6
self.azwidth, self.miss, self.alpha, # 9
self.cleaning_id, self.cleaning_parameters # 11
))
def list_of_values (self):
return ("{} {} {} {} {} {} {} {} {} {} {} {} {}\n".format(
self.event_number, self.day, self.size, # 3
self.distance, self.length, self.width, # 6
self.azwidth, self.miss, self.alpha, # 9
self.cleaning_id, self.cleaning_parameters, # 11
self.cur_count_rate_number
))