thepeg
is hosted by
Hepforge
,
IPPP Durham
ThePEG
2.3.0
Analysis
LWH
AnalysisFactory.h
1
// -*- C++ -*-
2
//
3
// AnalysisFactory.h is a part of ThePEG - Toolkit for HEP Event Generation
4
// Copyright (C) 1999-2019 Leif Lonnblad
5
//
6
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
7
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
8
//
9
#ifndef LWH_AnalysisFactory_H
10
#define LWH_AnalysisFactory_H
11
//
12
// This is the declaration of the AnalysisFactory class.
13
//
14
15
#include "AIAnalysisFactory.h"
16
#include "TreeFactory.h"
17
#include "HistogramFactory.h"
18
#include "DataPointSetFactory.h"
19
#include <set>
20
35
namespace
LWH
{
36
37
using namespace
AIDA;
38
44
class
AnalysisFactory
:
public
IAnalysisFactory {
45
46
public
:
48
virtual
~AnalysisFactory
() {
49
clear
();
50
}
51
56
ITreeFactory *
createTreeFactory
() {
57
return
new
TreeFactory
;
58
}
59
66
IHistogramFactory *
createHistogramFactory
(ITree & tree) {
67
Tree
& tr =
dynamic_cast<
Tree
&
>
(tree);
68
HistogramFactory
* hf =
new
HistogramFactory
(tr);
69
histfacs
.insert(hf);
70
return
hf;
71
}
72
78
IDataPointSetFactory *
createDataPointSetFactory
(ITree & tree) {
79
Tree
& tr =
dynamic_cast<
Tree
&
>
(tree);
80
DataPointSetFactory
* df =
new
DataPointSetFactory
(tr);
81
datafacs
.insert(df);
82
return
df;
83
}
84
89
ITupleFactory *
createTupleFactory
(ITree &) {
90
return
0;
91
}
92
97
IFunctionFactory *
createFunctionFactory
(ITree &) {
98
return
0;
99
}
100
105
IPlotterFactory *
createPlotterFactory
(
int
= 0,
char
* * = 0,
106
const
std::string & =
""
,
107
const
std::string & =
""
) {
108
return
0;
109
}
110
115
IFitFactory *
createFitFactory
() {
116
return
0;
117
}
118
119
private
:
120
122
void
clear
() {
123
for
( std::set<HistogramFactory *>::iterator it =
histfacs
.begin();
124
it !=
histfacs
.end(); ++it )
delete
*it;
125
for
( std::set<DataPointSetFactory *>::iterator it =
datafacs
.begin();
126
it !=
datafacs
.end(); ++it )
delete
*it;
127
for
( std::set<TreeFactory *>::iterator it =
treefacs
.begin();
128
it !=
treefacs
.end(); ++it )
delete
*it;
129
histfacs
.clear();
130
datafacs
.clear();
131
treefacs
.clear();
132
}
133
135
std::set<HistogramFactory *>
histfacs
;
136
138
std::set<DataPointSetFactory *>
datafacs
;
139
141
std::set<TreeFactory *>
treefacs
;
142
143
};
144
145
}
146
147
#endif
/* LWH_AnalysisFactory_H */
LWH::AnalysisFactory
The "master" factory from which other factories are obtained.
Definition:
AnalysisFactory.h:44
LWH::AnalysisFactory::createFitFactory
IFitFactory * createFitFactory()
Not implemented in LWH.
Definition:
AnalysisFactory.h:115
LWH::AnalysisFactory::~AnalysisFactory
virtual ~AnalysisFactory()
Destructor.
Definition:
AnalysisFactory.h:48
LWH::AnalysisFactory::createPlotterFactory
IPlotterFactory * createPlotterFactory(int=0, char **=0, const std::string &="", const std::string &="")
Not implemented in LWH.
Definition:
AnalysisFactory.h:105
LWH::AnalysisFactory::treefacs
std::set< TreeFactory * > treefacs
The tree factories.
Definition:
AnalysisFactory.h:141
LWH::AnalysisFactory::histfacs
std::set< HistogramFactory * > histfacs
The histogram factories.
Definition:
AnalysisFactory.h:135
LWH::AnalysisFactory::clear
void clear()
Delete all produced factories.
Definition:
AnalysisFactory.h:122
LWH::AnalysisFactory::createTupleFactory
ITupleFactory * createTupleFactory(ITree &)
Not implemented in LWH.
Definition:
AnalysisFactory.h:89
LWH::AnalysisFactory::createDataPointSetFactory
IDataPointSetFactory * createDataPointSetFactory(ITree &tree)
Not implemented in LWH.
Definition:
AnalysisFactory.h:78
LWH::AnalysisFactory::createTreeFactory
ITreeFactory * createTreeFactory()
Create an ITreeFactory.
Definition:
AnalysisFactory.h:56
LWH::AnalysisFactory::createHistogramFactory
IHistogramFactory * createHistogramFactory(ITree &tree)
Create an HistogramFactory.
Definition:
AnalysisFactory.h:66
LWH::AnalysisFactory::datafacs
std::set< DataPointSetFactory * > datafacs
The dataset factories.
Definition:
AnalysisFactory.h:138
LWH::AnalysisFactory::createFunctionFactory
IFunctionFactory * createFunctionFactory(ITree &)
Not implemented in LWH.
Definition:
AnalysisFactory.h:97
LWH::DataPointSetFactory
Basic user-level interface for creating a factory of IDataPointSet.
Definition:
DataPointSetFactory.h:31
LWH::HistogramFactory
User level interface for factory classes of Histograms (binned, unbinned, and profile).
Definition:
HistogramFactory.h:32
LWH::TreeFactory
The creator of trees.
Definition:
TreeFactory.h:27
LWH::Tree
The Tree class is a simple implementation of the AIDA::ITree interface.
Definition:
Tree.h:32
LWH
The LWH namespace contains a Light-Weight Histogram package which implements the most rudimentary his...
Definition:
AnalysisFactory.h:35
Generated on Thu Jun 20 2024 14:47:00 for ThePEG by
1.9.6