Project

General

Profile

Feature #1689

Read Access for CDB data quality flags

Added by Rogers, Chris over 6 years ago. Updated over 3 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Category:
-
Start date:
03 June 2015
Due date:
% Done:

0%

Estimated time:

Description

Janusz asked me to spec the read access for CDB data quality flags table. Proposal below.


Related issues

Related to MAUS - Bug #1585: Need reconstruction quality flagsOpenDobbs, Adam11 November 2014

Actions
#1

Updated by Rogers, Chris over 6 years ago

Stub:

class DataQualityFlags(cdb._base._CdbBase):
    def __init__(self, url, wsdl_dir):    
      """ 
      Construct a DataQualityFlags lookup

      @param url: the url of the server in the form 'http://host.domain:port'
      @param wsdl_dir: the path to the wsdl on the server

      @exception CdbPermanentError: Unable to contact CDB server or invalid URL
      """ 

   def get_beamline_flags(self, run_number):
      """ 
      Get the quality flags for a given run number which pertain to beamline 
      @param run_number: integer corresponding to the run number for which the quality flags are required
      Returns a dictionary mapping string quality flag name to boolean value of the quality flag 
      @exception CdbTemporaryError if the run_number does not have valid data_quality_flags
      """ 

   def get_detector_flags(self, run_number):
      """ 
      Get the quality flags for a given run number which pertain to detector 
      @param run_number: integer corresponding to the run number for which the quality flags are required
      Returns a dictionary mapping string quality flag name to boolean value of the quality flag 
      @exception CdbTemporaryError if the run_number does not have valid data_quality_flags
      """ 

   def get_daq_flags(self, run_number):
      """ 
      Get the quality flags for a given run number which pertain to daq and data movement
      @param run_number: integer corresponding to the run number for which the quality flags are required
      Returns a dictionary mapping string quality flag name to boolean value of the quality flag 
      @exception CdbTemporaryError if the run_number does not have valid data_quality_flags
      """ 

   def get_reconstruction_flags(self, run_number, maus_version, batch_iteration_number):
      """ 
      Get the quality flags for run number <run> which pertain to reconstruction
      @param run_number: integer corresponding to the run number for which the quality flags are required
      @param maus_version: string corresponding to a maus_version
      @param batch_iteration_number: integer corresponding to a batch iteration number (controls datacards)
      Returns a dictionary mapping string quality flag name to boolean value of the quality flag
      @exception CdbTemporaryError if the run_number does not have valid data_quality_flags, there is no 
                 reconstruction against the maus_version or there is no reconstruction against the 
                 batch_iteration_number
      """ 

Edit to make the method names a bit shorter!

#2

Updated by Rajaram, Durga over 5 years ago

For the reconstruction quality flags, I think the API should have a bit more functionality

  def get_reconstruction_flag_for_detector(self, detector, run_number, maus_version, batch_iteration_number):
      """ 
      Get the quality flags for run number <run> which pertain to reconstruction
      @param detector: string containing one of allowed detector names
                where detector could be TOF0, TOF1, CkovA, CkovB, Tracker0, Tracker1, TOF2, KL, EMR, RF1, RF2              
      @param run_number: integer corresponding to the run number for which the quality flags are required
      @param maus_version: string corresponding to a maus_version
      @param batch_iteration_number: integer corresponding to a batch iteration number (controls datacards)
      Returns an integer which is the output of the FLAG && DETECTOR_MASK
      @exception CdbTemporaryError if the run_number does not have valid data_quality_flags, there is no 
                 reconstruction against the maus_version or there is no reconstruction against the 
                 batch_iteration_number

The flag will be a hex string 0xFFFFFFFFFFF, with each hex digit (4 bits) representing one of the following detectors

TOF0, TOF1, CkovA, CkovB, Tracker0, Tracker1, TOF2, KL, EMR, RF1, RF2

The API should generate the appropriate bitmask for the detector whose flag is requested and return the flag for that detector

#3

Updated by Martyniak, Janusz over 5 years ago

Hi,
What about the setters ? Would we require one setter per getter , i.e for setting beamline, daq etc flags ?
Durga, do you want to set reco flags by detector or the whole 64bit word at once ?

cheers JM
#4

Updated by Martyniak, Janusz over 5 years ago

Hi,

The reco flags are now implemented on preprod. Open for testing
cheers JM
#5

Updated by Franchini, Paolo over 3 years ago

Shall we close (and forget) this?

Also available in: Atom PDF