ATLAS Offline Software
Functions | Variables
MuonRecRTT_alleps2gif Namespace Reference

Functions

def alleps2gif (setupok, keepeps=True, tareps=True, tardir="MuonRecRTT_epsimages")
 

Variables

bool setupok = True
 

Function Documentation

◆ alleps2gif()

def MuonRecRTT_alleps2gif.alleps2gif (   setupok,
  keepeps = True,
  tareps = True,
  tardir = "MuonRecRTT_epsimages" 
)

Definition at line 12 of file MuonRecRTT_alleps2gif.py.

12 def alleps2gif(setupok,keepeps=True,tareps=True,tardir="MuonRecRTT_epsimages"):
13 
14  if not setupok:
15  print ("Usage: " + sys.argv[0] + " [directory]")
16  return
17 
18  old = ".eps"
19  new = ".gif"
20 
21  nofiles = True
22 
23  for epsname in os.listdir("."):
24  if epsname.count(old):
25  nofiles = False
26  gifname = epsname.replace(old,new)
27  commands = [ "pstopnm -ppm -xborder 0 -yborder 0 -portrait -xsize=1000 " + epsname ,
28  "ppmtogif " + epsname + "001.ppm > " + gifname ,
29  "rm " + epsname + "001.ppm" ]
30  if not keepeps:
31  commands.append("rm " + epsname)
32  for command in commands:
33  print ("Running: " + command)
34  os.system(command)
35 
36  if keepeps and tareps:
37  commands = [ "mkdir " + tardir ,
38  "mv *" + old + " " + tardir ,
39  "tar -czf " + tardir + ".tar.gz " + tardir ,
40  "rm -rf " + tardir ]
41  for command in commands:
42  print ("Running: " + command)
43  os.system(command)
44 
45  if nofiles:
46  print ("No " + old + " files in directory.")
47 
48 # -------- Start of running is here ------- #
49 

Variable Documentation

◆ setupok

bool MuonRecRTT_alleps2gif.setupok = True

Definition at line 50 of file MuonRecRTT_alleps2gif.py.

MuonRecRTT_alleps2gif.alleps2gif
def alleps2gif(setupok, keepeps=True, tareps=True, tardir="MuonRecRTT_epsimages")
Definition: MuonRecRTT_alleps2gif.py:12