-
Notifications
You must be signed in to change notification settings - Fork 0
/
FileMergeObjects.h
43 lines (31 loc) · 1023 Bytes
/
FileMergeObjects.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/// Dear emacs, this is -*-c++-*-
///
/// Histogram merging code for hadd-like applications.
///
/// Note that objects of FileMergeObjects class
/// can not be freely copied by the client code.
/// Copy ctr is not declared private because it is used internally.
///
/// A. Gaponenko, 2010
#ifndef FILEMERGEOBJECTS_H
#define FILEMERGEOBJECTS_H
#include <string>
#include <vector>
#include "RootUtils.h"
class TH1;
class TDirectory;
class FileMergeObjects : public Named {
typedef std::vector<FileMergeObjects> DirList;
DirList m_subDirs;
// FIXME: use WHCloner instead of bare pointers?
typedef std::vector<TH1*> HistList;
HistList m_hists;
void init(TDirectory& dir, double weight);
public:
FileMergeObjects(const std::string& filename, double weight=1.);
FileMergeObjects(TDirectory& dir, double weight);
void addFile(const std::string& filename, double weight=1.);
void addDirectory(TDirectory& dir, double weight);
void write(TDirectory *outdir) const;
};
#endif/*FILEMERGEOBJECTS_H*/