9 #ifndef THEPEG_FactoryBase_H
10 #define THEPEG_FactoryBase_H
15 #include "ThePEG/Interface/Interfaced.h"
16 #include "FactoryBase.fh"
22 class IAnalysisFactory;
24 class IHistogramFactory;
25 class IDataPointSetFactory;
121 operator AIDA::IDataPointSet * () {
return dset; }
237 AIDA::ITree &
tree()
const;
262 void cd(
const string &
path);
297 double lo,
double up);
313 const std::vector<double> & edges);
334 int nbx,
double xlo,
double xup,
335 int nby,
double ylo,
double yup);
356 int nbx,
double xlo,
double xup,
357 int nby,
double ylo,
double yup);
374 const std::vector<double> & xedges,
375 const std::vector<double> & yedges);
524 #include "ThePEG/Utilities/ClassTraits.h"
533 struct BaseClassTrait<FactoryBase,1> {
541 struct ClassTraits<FactoryBase>
542 :
public ClassTraitsBase<FactoryBase> {
544 static string className() {
return "ThePEG::FactoryBase"; }
AIDA::ITree & tree() const
Access the underlying AIDA::ITree object.
AIDA::IDataPointSetFactory & dataSetFactory() const
A pointer to the underlying AIDA::IDataPointSetFactory object.
string theFilename
Together with theSuffix, the name of the file where the resulting histograms will be stored...
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual void normalizeToXSec(tH1DPtr histogram, CrossSection unit=picobarn) const =0
Rescale the given histogram so that the integral over the bins will give the correct integrated cross...
void registerClient(tIPtr client)
Used by a client object to indicate that he has required histograms from this factory.
FactoryBase()
The default constructor.
void analysisFactory(AIDA::IAnalysisFactory *x)
Set the underlying AIDA::IAnalysisFactory object.
static AbstractClassDescription< FactoryBase > initFactoryBase
The static object used to initialize the description of this class.
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual void normalizeToXSecFraction(tH1DPtr histogram) const =0
Rescale the given histogram so that the integral over the bins gives the fraction of the total cross ...
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
const string & suffix() const
Together with filename(), the name of the file where the resulting histograms will be stored...
void mkdir(const string &path)
Create a new directory in the underlying AIDA tree.
AIDA::IAnalysisFactory & analysisFactory() const
Access the underlying AIDA::IAnalysisFactory object.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
AIDA::IHistogram2D * tH2DPtr
Convenient typedef for pointer to AIDA::IHistogram2D.
Here is the documentation of the FactoryBase class.
This is the main namespace within which all identifiers in ThePEG are declared.
string theSuffix
Together with theFilename, the name of the file where the resulting histograms will be stored...
FactoryBase & operator=(const FactoryBase &)
The assignment operator is private and must never be called.
string theStoreType
The format in which the histograms are stored in the output file.
virtual ~FactoryBase()
The destructor.
void clear()
Delete all associated AIDA objects.
AIDA::IHistogramFactory & histogramFactory() const
A pointer to the underlying AIDA::IHistogramFactory object.
void cd(const string &path)
Set the default working directory for the underlying AIDA tree.
AIDA::IDataPointSet * tDSetPtr
Convenient typedef for pointer to AIDA::IHistogram1D.
const AIDA::IHistogram2D * tcH2DPtr
Convenient typedef for pointer to const AIDA::IHistogram2D.
DataFiller & operator<<(double x)
Add a number to measurement currently being read.
virtual void doinitrun()
Initialize this object.
DataFiller is a helper class to facilitate adding data to a DataPointSet.
const string & storeType() const
The format in which the histograms are stored in the output file.
virtual void dofinish()
Finalize this object.
AIDA::IDataPointSet * dset
The underlying IDataPointSet.
virtual void normalizeToUnity(tH1DPtr histogram) const =0
Rescale the given histogram so that the integral over the bins gives one.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
tH2DPtr createHistogram2D(const string &path, int nbx, double xlo, double xup, int nby, double ylo, double yup)
Create and return a AIDA::IHistogram2D object in the underlying AIDA histogram factory.
deque< double > v
The collected numbers to be committed to the IDataPointSet.
set< IPtr > clients
A set of client objects which have required histograms from this factory.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
AIDA::IHistogram1D * tH1DPtr
Convenient typedef for pointer to AIDA::IHistogram1D.
DataFiller(AIDA::IDataPointSet *dps)
The standard constructor needs a IDataPointSet as argument.
AIDA::IDataPointSetFactory * theDataSetFactory
A pointer to the underlying AIDA::IDataPointSetFactory object.
static string className()
Return the name of class T.
This template class allows the compiler to check calculations with physical quantities for dimensiona...
int NthBase
The type of the BaseN'th base class (int means there are no further base classes).
const AIDA::IDataPointSet * tcDSetPtr
Convenient typedef for pointer to const AIDA::IHistogram1D.
AIDA::ITree * theTree
A pointer to the underlying AIDA::ITree object.
const AIDA::IHistogram1D * tcH1DPtr
Convenient typedef for pointer to const AIDA::IHistogram1D.
static void Init()
The standard Init function used to initialize the interfaces.
tH1DPtr createHistogram1D(const string &path, int nb, double lo, double up)
Create and return a AIDA::IHistogram1D object in the underlying AIDA histogram factory.
const string & filename() const
Together with suffix(), the name of the file where the resulting histograms will be stored...
DataFiller(const DataFiller &df)
Copy constructor.
AIDA::IAnalysisFactory * theAnalysisFactory
A pointer to the underlying AIDA::IAnalysisFactory object.
string path() const
Returns the path to this object including the trailing '/'.
AIDA::IHistogramFactory * theHistogramFactory
A pointer to the underlying AIDA::IHistogramFactory object.
void mkdirs(const string &path)
Create a new directory in the underlying AIDA tree.
DataFiller createDataSet(const string &path, const string &title, int dim)
Create a IDataPointSet with the given path and title and containing points with the given number of d...