1 from PhysicsTools.HeppyCore.framework.services.service
import Service
6 The file attribute is a TFile that can be used in several analyzers.
7 The file is closed when the service stops.
11 output_rootfile = cfg.Service(
14 fname='histograms.root',
22 - option: TFile options, e.g. recreate
24 outdir is the output directory for the TFile
26 comp is a dummy parameter here.
27 It is needed because the looper creates services and analyzers
28 in the same way, providing the configuration (cfg),
29 the component currently processed (comp),
30 and the output directory.
32 Other implementations of the TFileService could
33 make use of the component information, eg. the component name.
35 fname =
'/'.
join([outdir, cfg.fname])
36 self.
file = TFile(fname, cfg.option)
static std::string join(char **cmd)