CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
crabFunctions.CertInfo Class Reference

Public Member Functions

def __init__ (self)
 

Public Attributes

 vo
 
 voGroup
 
 voRole
 

Detailed Description

Definition at line 343 of file crabFunctions.py.

Constructor & Destructor Documentation

◆ __init__()

def crabFunctions.CertInfo.__init__ (   self)

Definition at line 344 of file crabFunctions.py.

344  def __init__( self ):
345  p = subprocess.Popen("voms-proxy-info --fqan",
346  stdout = subprocess.PIPE,
347  stderr = subprocess.PIPE,
348  shell=True)
349  stdout, stderr = p.communicate()
350  print(stdout)
351  if p.returncode != 0:
352  self.vo = ""
353  self.voGroup = ""
354  self.voRole = ""
355  else:
356  lines = stdout.split("\n")
357  splitline = lines[0].split("/")
358  if len(splitline) < 4:
359  splitline = lines[1].split("/")
360  self.vo = splitline[1]
361  self.voGroup = splitline[2]
362  try:
363  self.voRole = splitline[2].split("=")[1]
364  if "NULL" in self.voRole:
365  self.voGroup = ""
366  except:
367  self.voRole = ""
368 

References edm.print().

Member Data Documentation

◆ vo

crabFunctions.CertInfo.vo

Definition at line 352 of file crabFunctions.py.

◆ voGroup

crabFunctions.CertInfo.voGroup

Definition at line 353 of file crabFunctions.py.

◆ voRole

crabFunctions.CertInfo.voRole

Definition at line 354 of file crabFunctions.py.

cms::dd::split
std::vector< std::string_view > split(std::string_view, const char *)
edm::print
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66