Esempio n. 1
0
    def setup(self, chain, fileDir) :
        someDir = r.gDirectory
        self.outputFile = r.TFile(self.outputFileName, "RECREATE")
        someDir.cd()

        self.canvas = utils.canvas("canvas")
        self.canvas.SetFixedAspectRatio()
        self.canvasIndex = 0
Esempio n. 2
0
 def pdfFromRoot(listOfInFileNames, outFileName) :
     if not len(listOfInFileNames) : return
     options = "pdf"
     dummyCanvas = utils.canvas("display")
     dummyCanvas.Print(outFileName+"[", options)
     for inFileName in listOfInFileNames :
         inFile = r.TFile(inFileName)
         keys = inFile.GetListOfKeys()
         for key in keys :
             someObject = inFile.Get(key.GetName())
             if someObject.ClassName()!="TCanvas" : print "Warning: found an object which is not a TCanvas in the display root file"
             someObject.Print(outFileName, options)
         inFile.Close()
         os.remove(inFileName)                    
     dummyCanvas.Print(outFileName+"]", options)
     print "The display file \""+outFileName+"\" has been written."