Belle II Software  light-2403-persian
CommandIoVsHelper Class Reference

Public Member Functions

def __init__ (self, whichcommand, args, db)
 
def add_arguments (self)
 
def get_iovs (self)
 
def modify_db (self, func, func_args, whichcommand=None)
 

Public Attributes

 whichcommand
 from whichcommand it is called (copy, delete or modify)
 
 db
 conditions_db.ConditionsDB instance
 
 iovfilter
 ItemFilter.
 
 num_all_iovs
 number of iovs before payload and revision selection
 
 past_dict
 Dictionary with past participles.
 

Private Attributes

 _args
 argparse.ArgumentParser instance
 

Detailed Description

Class to unify common parts of b2conditionsdb iovs commands

This class defines common argparse arguments,
common filter of iovs and common multithreading

Definition at line 488 of file cli_management.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  whichcommand,
  args,
  db 
)
initialization, just remember the arguments or parser and the database instance

Args:
    whichcommand (str): from whichcommand it is called (copy, delete or modify)
    args (argparse.ArgumentParser): where to append new arguments
    db (conditions_db.ConditionsDB): database instance to be used

Definition at line 496 of file cli_management.py.

496  def __init__(self, whichcommand, args, db):
497  """initialization, just remember the arguments or parser and the database instance
498 
499  Args:
500  whichcommand (str): from whichcommand it is called (copy, delete or modify)
501  args (argparse.ArgumentParser): where to append new arguments
502  db (conditions_db.ConditionsDB): database instance to be used
503  """
504 
505 
506  self.whichcommand = whichcommand
507 
508  self._args = args
509 
510  self.db = db
511 
512  self.iovfilter = ItemFilter(args)
513 
514  self.num_all_iovs = None
515 
516  self.past_dict = {"delete": "deleted", "modify": "modified", "copy": "copied", "create": "created"}
517 

Member Function Documentation

◆ add_arguments()

def add_arguments (   self)
Add arguments to the parser

Definition at line 518 of file cli_management.py.

◆ get_iovs()

def get_iovs (   self)
Get the iovs already filtered

Definition at line 561 of file cli_management.py.

◆ modify_db()

def modify_db (   self,
  func,
  func_args,
  whichcommand = None 
)
Modify the database using multithreading

Definition at line 586 of file cli_management.py.


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