CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes
crabFunctions.CertInfo Class Reference

Public Member Functions

def __init__
 

Public Attributes

 vo
 
 voGroup
 
 voRole
 

Detailed Description

Definition at line 343 of file crabFunctions.py.

Constructor & Destructor Documentation

def crabFunctions.CertInfo.__init__ (   self)

Definition at line 344 of file crabFunctions.py.

References print().

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

Member Data Documentation

crabFunctions.CertInfo.vo

Definition at line 352 of file crabFunctions.py.

crabFunctions.CertInfo.voGroup

Definition at line 353 of file crabFunctions.py.

crabFunctions.CertInfo.voRole

Definition at line 354 of file crabFunctions.py.