CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
TreeAnalyzerNumpy.TreeAnalyzerNumpy Class Reference
Inheritance diagram for TreeAnalyzerNumpy.TreeAnalyzerNumpy:

Public Member Functions

def __init__
 
def beginLoop
 
def declareVariables
 
def write
 

Public Attributes

 file
 
 tree
 

Detailed Description

Base TreeAnalyzerNumpy, to create flat TTrees.

Check out TestTreeAnalyzer for a concrete example.
IMPORTANT: FOR NOW, CANNOT RUN SEVERAL TreeAnalyzers AT THE SAME TIME!
Anyway, you want only one TTree, don't you?

Definition at line 5 of file TreeAnalyzerNumpy.py.

Constructor & Destructor Documentation

def TreeAnalyzerNumpy.TreeAnalyzerNumpy.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 12 of file TreeAnalyzerNumpy.py.

References addOnTests.testit.dirName, analyzer.Analyzer.dirName, MuonIsolationDQM.dirName, MuIsoValidation.dirName, VariablePlotter::SubDirectory.dirName, V0Validator.dirName, VariablePlotter::Directory.dirName, and join().

12 
13  def __init__(self, cfg_ana, cfg_comp, looperName):
14  super(TreeAnalyzerNumpy,self).__init__(cfg_ana, cfg_comp, looperName)
15  fileName = '/'.join([self.dirName,
16  'tree.root'])
17 
18  isCompressed = self.cfg_ana.isCompressed if hasattr(cfg_ana,'isCompressed') else 1
19  print 'Compression', isCompressed
20 
21  self.file = TFile( fileName, 'recreate', '', isCompressed )
22  self.tree = Tree('tree', self.name)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Member Function Documentation

def TreeAnalyzerNumpy.TreeAnalyzerNumpy.beginLoop (   self)

Definition at line 23 of file TreeAnalyzerNumpy.py.

References TreeAnalyzerNumpy.TreeAnalyzerNumpy.declareVariables(), and AutoFillTreeProducer.AutoFillTreeProducer.declareVariables().

23 
24  def beginLoop(self) :
25  super(TreeAnalyzerNumpy, self).beginLoop()
26  self.declareVariables()
def TreeAnalyzerNumpy.TreeAnalyzerNumpy.declareVariables (   self)

Definition at line 27 of file TreeAnalyzerNumpy.py.

Referenced by TreeAnalyzerNumpy.TreeAnalyzerNumpy.beginLoop().

27 
28  def declareVariables(self):
29  print 'TreeAnalyzerNumpy.declareVariables : overload this function.'
30  pass
def TreeAnalyzerNumpy.TreeAnalyzerNumpy.write (   self)

Definition at line 31 of file TreeAnalyzerNumpy.py.

31 
32  def write(self):
33  super(TreeAnalyzerNumpy, self).write()
34  self.file.Write()
35 

Member Data Documentation

TreeAnalyzerNumpy.TreeAnalyzerNumpy.file

Definition at line 20 of file TreeAnalyzerNumpy.py.

Referenced by chain_test.ChainTestCase.test_file(), and chain_test.ChainTestCase.test_load_2().

TreeAnalyzerNumpy.TreeAnalyzerNumpy.tree

Definition at line 21 of file TreeAnalyzerNumpy.py.

Referenced by eventstfile.Events.__iter__(), svgfig.SVG.__str__(), MetTreeProducer.MetTreeProducer.declareVariables(), AutoFillTreeProducer.AutoFillTreeProducer.declareVariables(), AutoFillTreeProducer.AutoFillTreeProducer.fillTree(), MetTreeProducer.MetTreeProducer.process(), python.cmstools.EventTree.SetAlias(), and eventstfile.Events.to().