Belle II Software development
ValidationManyFiguresOfMerit Class Reference
Inheritance diagram for ValidationManyFiguresOfMerit:
ValidationFiguresOfMerit

Public Member Functions

def __str__ (self)
 
def write (self, tdirectory=None)
 

Detailed Description

Create and write an TNtuple with several validation figures of merit

Definition at line 144 of file fom.py.

Member Function Documentation

◆ __str__()

def __str__ (   self)
Describe myself

Reimplemented from ValidationFiguresOfMerit.

Definition at line 147 of file fom.py.

147 def __str__(self):
148 """Describe myself"""
149 return 'Not supported.'
150

◆ write()

def write (   self,
  tdirectory = None 
)
Writes the figures of merit as a TNtuple.

Parameters
----------
tdirectory : ROOT.TDirectory, optional
    The directory to which the TNtuple shall be written.
    Defaults to the current directory.

Reimplemented from ValidationFiguresOfMerit.

Definition at line 151 of file fom.py.

151 def write(self, tdirectory=None):
152 """Writes the figures of merit as a TNtuple.
153
154 Parameters
155 ----------
156 tdirectory : ROOT.TDirectory, optional
157 The directory to which the TNtuple shall be written.
158 Defaults to the current directory.
159 """
160 name = self.name
161 figure_names = [root_save_name(key) for key in list(self.figures_by_name.keys())]
162 values = list(self.figures_by_name.values())
163
164 leaf_specification = ':'.join(figure_names)
165 title = self.title or ""
166 ntuple = ROOT.TNtuple(name, title, leaf_specification)
167
168 for value in zip(*values):
169 ntuple.Fill(*value)
170
171 ntuple.SetAlias('Description', self.description)
172 ntuple.SetAlias('Check', self.check)
173 ntuple.SetAlias('Contact', self.contact)
174
175 with root_cd(tdirectory):
176 ntuple.Write()

The documentation for this class was generated from the following file: