3 ##########################
6 from bl_instance
.build_bl
import *
8 from archiving
import *
9 ##############################
14 ##############################################################################################
15 if __name__
== '__main__':
19 print "\nCorrect use: " + sys
.argv
[0] + " start/stop/check ELEM_NICKNAME [tdb/hdb]\n"
24 nicknames_elems
= dict([(elem
.nickname
, elem
) for elem
in beam_path
+ continuous_env
])
25 elem_nickname
= sys
.argv
[2]
26 if not elem_nickname
in nicknames_elems
.keys():
27 print "\nCorrect use: " + sys
.argv
[0] + " start/stop/check ELEM_NICKNAME [tdb/hdb]\n"
28 print "Invalid ELEM_NICKNAME"
32 if len(sys
.argv
) == 4:
35 bl_elem
= nicknames_elems
[elem_nickname
]
38 attrs_archiModes
= dict( [(p
.attr_fullName
, p
.archiving_mode
.split())
39 for p
in bl_elem
.params
] )
40 elif isinstance(bl_elem
, beam_stopper
):
41 attrs_archiModes
= dict( [(bl_elem
.beamAccess_param
.attr_fullName
,
42 bl_elem
.beamAccess_param
.archiving_mode
.split())] )
47 archiving(attrs_archiModes
, action
, db
)