Fork me on GitHub

source: svn/trunk/classes/DelphesFactory.h@ 1101

Last change on this file since 1101 was 687, checked in by Pavel Demin, 12 years ago

move ExRootClasses, ExRootModule, ExRootFactory to classes, move ExRootAnalysis to modules, remove ExRoot prefix from all Delphes classes

File size: 968 bytes
Line 
1#ifndef DelphesFactory_h
2#define DelphesFactory_h
3
4/** \class DelphesFactory
5 *
6 * Class handling creation of Candidate,
7 * TObjArray and all other objects.
8 *
9 * $Date: 2008-06-04 13:57:25 $
10 * $Revision: 1.1 $
11 *
12 *
13 * \author P. Demin - UCL, Louvain-la-Neuve
14 *
15 */
16
17#include "TNamed.h"
18
19#include <map>
20#include <set>
21
22class TObjArray;
23class Candidate;
24
25class ExRootTreeBranch;
26
27class DelphesFactory: public TNamed
28{
29public:
30
31 DelphesFactory(const char *name = "ObjectFactory");
32 ~DelphesFactory();
33
34 void Clear();
35
36 TObjArray *NewPermanentArray();
37
38 TObjArray *NewArray() { return New<TObjArray>(); }
39
40 Candidate *NewCandidate();
41
42 TObject *New(TClass *cl);
43
44 template<typename T>
45 T *New() { return static_cast<T *>(New(T::Class())); }
46
47private:
48
49 ExRootTreeBranch *fObjArrays; //!
50
51 std::map< const TClass*, ExRootTreeBranch* > fBranches; //!
52 std::set< TObject* > fPool; //!
53
54 ClassDef(DelphesFactory, 1)
55};
56
57#endif /* DelphesFactory */
58
Note: See TracBrowser for help on using the repository browser.