Belle II Software  release-08-01-10
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 482 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 490 of file cli_management.py.

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

Member Function Documentation

◆ add_arguments()

def add_arguments (   self)
Add arguments to the parser

Definition at line 512 of file cli_management.py.

◆ get_iovs()

def get_iovs (   self)
Get the iovs already filtered

Definition at line 555 of file cli_management.py.

◆ modify_db()

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

Definition at line 580 of file cli_management.py.


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