Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
#ifndef AIDA_H
#define AIDA_H 1
#include "AIDA/IAnalysisFactory.h"
#include "AIDA/IAnnotation.h"
#include "AIDA/IAxis.h"
#include "AIDA/IAxisStyle.h"
#include "AIDA/IBaseHistogram.h"
#include "AIDA/IBaseStyle.h"
#include "AIDA/IBrushStyle.h"
#include "AIDA/ICloud.h"
#include "AIDA/ICloud1D.h"
#include "AIDA/ICloud2D.h"
#include "AIDA/ICloud3D.h"
#include "AIDA/IConstants.h"
#include "AIDA/IDataPoint.h"
#include "AIDA/IDataPointSet.h"
#include "AIDA/IDataPointSetFactory.h"
#include "AIDA/IDataStyle.h"
#include "AIDA/IEvaluator.h"
#include "AIDA/IFillStyle.h"
#include "AIDA/IFilter.h"
#include "AIDA/IFitData.h"
#include "AIDA/IFitFactory.h"
#include "AIDA/IFitParameterSettings.h"
#include "AIDA/IFitResult.h"
#include "AIDA/IFitter.h"
#include "AIDA/IFunction.h"
#include "AIDA/IFunctionCatalog.h"
#include "AIDA/IFunctionFactory.h"
#include "AIDA/IHistogram.h"
#include "AIDA/IHistogram1D.h"
#include "AIDA/IHistogram2D.h"
#include "AIDA/IHistogram3D.h"
#include "AIDA/IHistogramFactory.h"
#include "AIDA/IInfo.h"
#include "AIDA/IInfoStyle.h"
#include "AIDA/ILineStyle.h"
#include "AIDA/IManagedObject.h"
#include "AIDA/IMarkerStyle.h"
#include "AIDA/IMeasurement.h"
#include "AIDA/IModelFunction.h"
#include "AIDA/IPlotter.h"
#include "AIDA/IPlotterFactory.h"
#include "AIDA/IPlotterLayout.h"
#include "AIDA/IPlotterRegion.h"
#include "AIDA/IPlotterStyle.h"
#include "AIDA/IProfile.h"
#include "AIDA/IProfile1D.h"
#include "AIDA/IProfile2D.h"
#include "AIDA/IRangeSet.h"
#include "AIDA/ITextStyle.h"
#include "AIDA/ITitleStyle.h"
#include "AIDA/ITree.h"
#include "AIDA/ITreeFactory.h"
#include "AIDA/ITuple.h"
#include "AIDA/ITupleFactory.h"
#endif /* ifndef AIDA_H */
@@ -0,0 +1,141 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IANALYSISFACTORY_H
#define AIDA_IANALYSISFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
namespace AIDA {
class IDataPointSetFactory;
class IFitFactory;
class IFunctionFactory;
class IHistogramFactory;
class IPlotterFactory;
class ITree;
class ITreeFactory;
class ITupleFactory;
/**
* The "master" factory from which other factories are obtained.
* Typically accessed by:
* <pre>
* IAnalysisFactory af =(IAnalysisFactory) ServiceManager.create("hep.aida.IAnalysisFactory");
* </pre>
*
* In C++ IAnalysisFactory* af = AIDA_createAnalysisFactory();
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IAnalysisFactory {
public:
/// Destructor.
virtual ~IAnalysisFactory() { /* nop */; }
/**
* Create an ITreeFactory.
* @return The ITreeFactory.
*
*/
virtual ITreeFactory * createTreeFactory() = 0;
/**
* Create an IHistogramFactory.
* @param tree The ITree which created histograms will be associated to.
* @return The IHistogramFactory.
*
*/
virtual IHistogramFactory * createHistogramFactory(ITree & tree) = 0;
/**
* Create an IDataPointSetFactory.
* @param tree The ITree which created IDataPointSet will be associated to.
* @return The IDataPointSetFactory.
*
*/
virtual IDataPointSetFactory * createDataPointSetFactory(ITree & tree) = 0;
/**
* Create an ITupleFactory.
* @param tree The ITree which created tuples will be associated to.
* @return The ITupleFactory.
*
*/
virtual ITupleFactory * createTupleFactory(ITree & tree) = 0;
/**
* Create an IFunctionFactory.
* @param tree The ITree which created functions will be associated to.
* @return The IFunctionFactory.
*
*/
virtual IFunctionFactory * createFunctionFactory(ITree & tree) = 0;
/**
* Create an IPlotterFactory.
* Due to the fact that the plotter factory may activate a GUI
* tookit, the process arguments (passed to the main function)
* could be passed to the plotter factory. Most of the GUI
* toolkit ask for them (Motif, gtk, Qt, FLTK).
*/
virtual IPlotterFactory * createPlotterFactory(int argc = 0, char * * args = 0) = 0;
/**
* Create an IFitFactory.
* @return The IFitFactory.
*
*/
virtual IFitFactory * createFitFactory() = 0;
}; // class
}; // namespace AIDA
/**
* To hook an AIDA implementation.
* For example :
* #include <AIDA/IAnalysisFactory.h>
* ...
* IAnalysisFactory* analysisFactory = AIDA_createAnalysisFactory();
* ...
*/
extern "C" {
AIDA::IAnalysisFactory* AIDA_createAnalysisFactory();
}
#endif /* ifndef AIDA_IANALYSISFACTORY_H */
@@ -0,0 +1,138 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IANNOTATION_H
#define AIDA_IANNOTATION_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
/**
* The list of the commonly accepted keys.
*
*/
#define titleKey "Title"
namespace AIDA {
/**
* The annotation holds arbitrary information represented with (key,value) pairs
* of strings. A sticky bit is associated to every item to protect it (or not)
* from a reset operation.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IAnnotation {
public:
/// Destructor.
virtual ~IAnnotation() { /* nop */; }
/**
* Add a key/value pair with a given sticky flag.
* If key alredy exists, override its value ?
* @param key The key to be added.
* @param value The key's value.
* @param sticky The key's sticky flag. If <code>true</code> the item will
* not be removed when the method reset or removeItem are invoked.
* The default value for the sticky flag is <code>false</code>.
* @return false If the key already exists.
*
*/
virtual bool addItem(const std::string & key, const std::string & value, bool sticky = false) = 0;
/**
* Remove the item indicated by a given key.
* @param key The key to be removed. If the key is flagged as "sticky" it
* will not be removed.
* @return false If the key is sticky.
*
*/
virtual bool removeItem(const std::string & key) = 0;
/**
* Retrieve the value for a given key.
* @param key The key.
* @return The corresponding value.
*
*/
virtual const std::string & value(const std::string & key) const = 0;
/**
* Set the value for a given key.
* @param key The key whose vale is to be changed.
* @param value The new value.
*
*/
virtual void setValue(const std::string & key, const std::string & value) = 0;
/**
* Set the sticky flag for a given key.
* @param key The key whose stick flag is to be set.
* @param sticky The new sticky flag.
*
*/
virtual void setSticky(const std::string & key, bool sticky) = 0;
/**
* Get the size of the IAnnotation, i.e. the number of keys contained in it.
* @return The size of the IAnnotation.
*
*/
virtual int size() const = 0;
/**
* Get the key at a given position within the IAnnotation.
* @param index The key's position within the IAnnotation.
* @return The corresponding key.
*
*/
virtual const std::string & key(int index) const = 0;
/**
* Get the value at a given position within the IAnnotation.
* @param index The value's position within the IAnnotation.
* @return The corresponding value.
*
*/
virtual const std::string & value(int index) const = 0;
/**
* Remove all the non-sticky items.
*
*/
virtual void reset() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IANNOTATION_H */
@@ -0,0 +1,124 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IAXIS_H
#define AIDA_IAXIS_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
namespace AIDA {
/**
* An IAxis represents a binned histogram axis. A 1D Histogram would have
* one Axis representing the X axis, while a 2D Histogram would have two
* axes representing the X and Y Axis.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IAxis {
public:
/// Destructor.
virtual ~IAxis() { /* nop */; }
/**
* Check if the IAxis has fixed binning, i.e. if all the bins have the same width.
* @return <code>true</code> if the binning is fixed, <code>false</code> otherwise.
*
*/
virtual bool isFixedBinning() const = 0;
/**
* Get the lower edge of the IAxis.
* @return The IAxis's lower edge.
*
*/
virtual double lowerEdge() const = 0;
/**
* Get the upper edge of the IAxis.
* @return The IAxis's upper edge.
*
*/
virtual double upperEdge() const = 0;
/**
* The number of bins (excluding underflow and overflow) on the IAxis.
* @return The IAxis's number of bins.
*
*/
virtual int bins() const = 0;
/**
* Get the lower edge of the specified bin.
* @param index The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW.
* @return The lower edge of the corresponding bin; for the underflow bin this is <tt>Double.NEGATIVE_INFINITY</tt>.
*
*/
virtual double binLowerEdge(int index) const = 0;
/**
* Get the upper edge of the specified bin.
* @param index The bin number: 0 to bins()-1 for the in-range bins or OVERFLOW or UNDERFLOW.
* @return The upper edge of the corresponding bin; for the overflow bin this is <tt>Double.POSITIVE_INFINITY</tt>.
*
*/
virtual double binUpperEdge(int index) const = 0;
/**
* Get the width of the specified bin.
* @param index The bin number: 0 to bins()-1) for the in-range bins or OVERFLOW or UNDERFLOW.
* @return The width of the corresponding bin.
*
*/
virtual double binWidth(int index) const = 0;
/**
* Convert a coordinate on the axis to a bin number.
* If the coordinate is less than the lowerEdge UNDERFLOW is returned; if the coordinate is greater or
* equal to the upperEdge OVERFLOW is returned.
* @param coord The coordinate to be converted.
* @return The corresponding bin number.
*
*/
virtual int coordToIndex(double coord) const = 0;
/**
* Constants specifying the underflow and the overflow bin.
* They can be passed to any method accepting a bin number.
*
*/
enum { UNDERFLOW_BIN = -2, OVERFLOW_BIN = -1 };
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IAXIS_H */
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IAXISSTYLE_H
#define AIDA_IAXISSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include "AIDA/IBaseStyle.h"
namespace AIDA {
class ILineStyle;
class ITextStyle;
/**
* Style for the part of the scene representing the data
* (then histograms, functions, data point sets).
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IAxisStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~IAxisStyle() { /* nop */; }
virtual ILineStyle & lineStyle() = 0;
virtual ITextStyle & tickLabelStyle() = 0;
virtual ITextStyle & labelStyle() = 0;
virtual bool setlineStyle(const ILineStyle & lineStyle) = 0;
virtual bool setTickLabelStyle(const ITextStyle & tickLabelStyle) = 0;
virtual bool setLabelStyle(const ITextStyle & labelStyle) = 0;
virtual void setLabel(const std::string & label) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IAXISSTYLE_H */
@@ -0,0 +1,103 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IBASEHISTOGRAM_H
#define AIDA_IBASEHISTOGRAM_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IAnnotation;
/**
* User level interface to Histogram.
* Provides the common functionality of the histogram-like classes.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IBaseHistogram {
public:
/// Destructor.
virtual ~IBaseHistogram() { /* nop */; }
/**
* Get the Histogram's title.
* @return The Histogram's title.
*
*/
virtual const std::string & title() const = 0;
/**
* Set the histogram title.
* @param title The title.
* @return false If title cannot be changed.
*
*/
virtual bool setTitle(const std::string & title) = 0;
/**
* Get the IAnnotation associated with the Histogram.
* @return The IAnnotation.
*
*/
virtual IAnnotation & annotation() = 0;
virtual const IAnnotation & annotation() const = 0;
/**
* Get the Histogram's dimension.
* @return The Histogram's dimension.
*
*/
virtual int dimension() const = 0;
/**
* Reset the Histogram; as if just created.
* @return false If something goes wrong.
*
*/
virtual bool reset() = 0;
/**
* Get the number of in-range entries in the Histogram.
* @return The number of in-range entries.
*
*/
virtual int entries() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IBASEHISTOGRAM_H */
@@ -0,0 +1,99 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IBASESTYLE_H
#define AIDA_IBASESTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
/**
* Superclass for all styles in AIDA Plotting package.
* All styles can be reset to their original values at construction
* time. In the case of styles which 'contain' other styles (like IStyle
* or IAxisStyle), reset() calls reset() on the aggregated styles too.
* All styles are hierarchical, so the plotter's current style is overridden by the
* region's current style, which is overridden by any 'associated' style
* which is overwritten by any style passed in explicitly at plotting time.
* Parameters and options which have been explicitly set to
* non-default (or default!) values are 'sticky'. For example, if a style
* has the default 'red' and this has been set explicitly to 'blue' at the
* Plotter level, then it will override the default 'red' at the Region level.
* IF the user explicitly sets the region to 'green' (or 'red'!) then it will
* not be overridden by the 'parent' style.
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IBaseStyle {
public:
/// Destructor.
virtual ~IBaseStyle() { /* nop */; }
/**
* Return to original (construction time) state. Explicitly
* set parameters will be set to defaults and may be overridden
*/
virtual void reset() = 0;
/**
* Set a parameter.
* @param paramName Name of the parameter.
* @param options String of options.
* @return false if parameter (or its options) unknown or invalid.
*/
virtual bool setParameter(const std::string & paramName, const std::string & options = "") = 0;
/**
* Get value of a parameter.
* @param paramName Name of the parameter.
* @return the value.
*/
virtual std::string parameterValue(const std::string & parameter) const = 0;
/**
* Get list of the available parameters (implementation-dependent)
*/
virtual std::vector<std::string> availableParameters() const = 0;
/**
* Get list of the available options for a given parameter
* (implementation-dependent).
*/
virtual std::vector<std::string> availableParameterOptions(const std::string & paramName) const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IBASESTYLE_H */
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IBRUSHSTYLE_H
#define AIDA_IBRUSHSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
#include "AIDA/IBaseStyle.h"
namespace AIDA {
/**
* Superclass for anything which can be drawn in different
* colours and with (possibly) transparent/opaque/translucent effect.
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IBrushStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~IBrushStyle() { /* nop */; }
/**
* Get a list of the colours supported by this implementation.
*/
virtual std::vector<std::string> availableColors() const = 0;
/**
* Current colour of this brush style.
*/
virtual std::string color() const = 0;
/**
* Current opacity (alpha) of this brush style.
*/
virtual double opacity() const = 0;
/**
* Set current colour, e.g. "darkGreen"
* @return false if colour not recognised by the implementation.
*/
virtual bool setColor(const std::string & newColor) = 0;
/**
* Set opacity (alpha), e.g. 0 (transparent),
* 1 (opaque), 0.5 (halfway).
* @return false if value not supported by the implementation.
*/
virtual bool setOpacity(double newOpacity) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IBRUSHSTYLE_H */
@@ -0,0 +1,88 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ICLOUD_H
#define AIDA_ICLOUD_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseHistogram.h"
namespace AIDA {
/**
* User level interface to a Cloud.
* A Cloud is an unbinned collection of points. It can be used to
* represent scatter plots or dynamically rebinnable histograms.
* If they number of entries in the cloud exceeds some threshold
* they may be automatically converted to a binned histogram.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ICloud : virtual public IBaseHistogram {
public:
/// Destructor.
virtual ~ICloud() { /* nop */; }
/**
* Get the sum of weights of all the entries.
* @return The sum of the weights of all the entries.
*
*/
virtual double sumOfWeights() const = 0;
/**
* Convert the ICloud to an IHistogram using the default number of bins.
* @return false If the ICloud has already been converted.
*
*/
virtual bool convertToHistogram() = 0;
/**
* Check if the ICloud has been converted to an IHistogram.
* @return <code>true</code> if it has been converted.
*
*/
virtual bool isConverted() const = 0;
/**
* Scale the weights by a given factor.
* @param scaleFactor The scale factor.
* @return false If a non-positive scale factor is provided.
*
*/
virtual bool scale(double scaleFactor) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ICLOUD_H */
@@ -0,0 +1,171 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ICLOUD1D_H
#define AIDA_ICLOUD1D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <vector>
#include "AIDA/ICloud.h"
namespace AIDA {
class IHistogram1D;
/**
* User level interface to a 1D Cloud.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ICloud1D : virtual public ICloud {
public:
/// Destructor.
virtual ~ICloud1D() { /* nop */; }
/**
* Fill the ICloud1D with a value and a corresponding weight.
* @param x The value.
* @param weight The corresponding weight. By default it is 1.
* @return false If the ICloud1D is full, if the weight's value is
* is not between 0 and 1.
*
*/
virtual bool fill(double x, double weight = 1.) = 0;
/**
* Get the lower edge of the ICloud1D.
* @return The lower edge.
*
*/
virtual double lowerEdge() const = 0;
/**
* Get the upper edge of the ICloud1D.
* @return The upper edge.
*
*/
virtual double upperEdge() const = 0;
/**
* Get the value corresponding to a given entry.
* @param index The entry's index.
* @return The value of the index-th entry.
* If the ICloud1D has already been converted, 0 is returned.
*
*/
virtual double value(int index) const = 0;
/**
* Get the weight corresponding to a given entry.
* @param index The entry's index.
* @return The weight of the index-th entry.
* If the ICloud1D has already been converted, 0 is returned.
*
*/
virtual double weight(int index) const = 0;
/**
* Get the mean of the ICloud1D.
* @return The mean.
*
*/
virtual double mean() const = 0;
/**
* Get the RMS of the ICloud1D.
* @return The RMS.
*
*/
virtual double rms() const = 0;
/**
* Convert internally the ICloud1D to an IHistogram1D
* with given number of bins, upper edge and lower edge.
* @param nBins The number of bins.
* @param lowerEdge The lower edge.
* @param upperEdge The upper edge.
* @return false If the ICloud1D has already been converted.
*
*/
virtual bool convert(int nBins, double lowerEdge, double upperEdge) = 0;
/**
* Convert internally the ICloud1D to an IHistogram1D
* with given bin edges.
* @param binEdges The bins edges.
* @return false If the ICloud1D has already been converted.
*
*/
virtual bool convert(const std::vector<double> & binEdges) = 0;
/**
* Get the internal IHistogram1D in which the ICloud1D converted to.
* @return The histogram.
* or because of a convert() method invocation.
*
*/
virtual const IHistogram1D & histogram() const = 0;
/**
* Project the ICloud1D on an IHistogram1D.
* @param hist The IHistogram1D to be filled.
* @return false If the ICloud1D is already converted.
*
*/
virtual bool fillHistogram(IHistogram1D & hist) const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ICLOUD1D_H */
@@ -0,0 +1,223 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ICLOUD2D_H
#define AIDA_ICLOUD2D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <vector>
#include "AIDA/ICloud.h"
namespace AIDA {
class IHistogram2D;
/**
* User level interface to a 2D Cloud.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ICloud2D : virtual public ICloud {
public:
/// Destructor.
virtual ~ICloud2D() { /* nop */; }
/**
* Fill the ICloud2D with a couple of values and a corresponding weight.
* @param x The x value.
* @param y The y value.
* @param weight The corresponding weight. By default it is 1.
* @return false If the ICloud2D is full, if the weight's value is
* is not between 0 and 1.
*
*/
virtual bool fill(double x, double y, double weight = 1.) = 0;
/**
* Get the lower edge of the ICloud2D along the x axis.
* @return The lower edge along the x axis.
*
*/
virtual double lowerEdgeX() const = 0;
/**
* Get the lower edge of the ICloud2D along the y axis.
* @return The lower edge along the y axis.
*
*/
virtual double lowerEdgeY() const = 0;
/**
* Get the upper edge of the ICloud2D along the x axis.
* @return The upper edge along the x axis.
*
*/
virtual double upperEdgeX() const = 0;
/**
* Get the upper edge of the ICloud2D along the y axis.
* @return The upper edge along the y axis.
*
*/
virtual double upperEdgeY() const = 0;
/**
* Get the x value corresponding to a given entry.
* @param index The entry's index.
* @return The x value of the index-th entry.
* If the ICloud2D has already been converted, 0 is returned.
*
*/
virtual double valueX(int index) const = 0;
/**
* Get the y value corresponding to a given entry.
* @param index The entry's index.
* @return The y value of the index-th entry.
* If the ICloud2D has already been converted, 0 is returned.
*
*/
virtual double valueY(int index) const = 0;
/**
* Get the weight corresponding to a given entry.
* @param index The entry's index.
* @return The weight of the index-th entry.
* If the ICloud2D has already been converted, 0 is returned.
*
*/
virtual double weight(int index) const = 0;
/**
* Get the mean of the ICloud2D along the x axis.
* @return The mean along the x axis.
*
*/
virtual double meanX() const = 0;
/**
* Get the mean of the ICloud2D along the y axis.
* @return The mean along the y axis.
*
*/
virtual double meanY() const = 0;
/**
* Get the RMS of the ICloud2D along the x axis.
* @return The RMS along the x axis.
*
*/
virtual double rmsX() const = 0;
/**
* Get the RMS of the ICloud2D along the y axis.
* @return The RMS along the y axis.
*
*/
virtual double rmsY() const = 0;
/**
* Convert internally the ICloud2D to an IHistogram2D
* with given number of bins, upper edge and lower edge.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of bins of the x axis.
* @param upperEdgeX The upper edge of bins of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of bins of the y axis.
* @param upperEdgeY The upper edge of bins of the y axis.
* @return false If the ICloud2D has already been converted.
*
*/
virtual bool convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) = 0;
/**
* Convert internally the ICloud2D to an IHistogram2D
* with given bin edges.
* @param binEdgesX The bins edges of the x axis.
* @param binEdgesY The bins edges of the y axis.
* @return false If the ICloud2D has already been converted.
*
*/
virtual bool convert(const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY) = 0;
/**
* Get the internal IHistogram2D in which the ICloud2D converted to.
* @return The histogram.
* or because of a convert() method invocation.
*
*/
virtual const IHistogram2D & histogram() const = 0;
/**
* Project the ICloud2D on an IHistogram2D.
* @param hist The IHistogram2D to be filled.
* @return false If the ICloud2D is already converted.
*
*/
virtual bool fillHistogram(IHistogram2D & hist) const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ICLOUD2D_H */
@@ -0,0 +1,275 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ICLOUD3D_H
#define AIDA_ICLOUD3D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <vector>
#include "AIDA/ICloud.h"
namespace AIDA {
class IHistogram3D;
/**
* User level interface to a 3D Cloud.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ICloud3D : virtual public ICloud {
public:
/// Destructor.
virtual ~ICloud3D() { /* nop */; }
/**
* Fill the ICloud3D with a triplet of values and a corresponding weight.
* @param x The x value.
* @param y The y value.
* @param z The z value.
* @param weight The corresponding weight. By default it is 1.
* @return false If the ICloud3D is full, if the weight's value is
* is not between 0 and 1.
*
*/
virtual bool fill(double x, double y, double z, double weight = 1.) = 0;
/**
* Get the lower edge of the ICloud3D along the x axis.
* @return The lower edge along the x axis.
*
*/
virtual double lowerEdgeX() const = 0;
/**
* Get the lower edge of the ICloud3D along the y axis.
* @return The lower edge along the y axis.
*
*/
virtual double lowerEdgeY() const = 0;
/**
* Get the lower edge of the ICloud3D along the z axis.
* @return The lower edge along the z axis.
*
*/
virtual double lowerEdgeZ() const = 0;
/**
* Get the upper edge of the ICloud3D along the x axis.
* @return The upper edge along the x axis.
*
*/
virtual double upperEdgeX() const = 0;
/**
* Get the upper edge of the ICloud3D along the y axis.
* @return The upper edge along the y axis.
*
*/
virtual double upperEdgeY() const = 0;
/**
* Get the upper edge of the ICloud3D along the z axis.
* @return The upper edge along the z axis.
*
*/
virtual double upperEdgeZ() const = 0;
/**
* Get the x value corresponding to a given entry.
* @param index The entry's index.
* @return The x value of the index-th entry.
* If the ICloud3D has already been converted, 0 is returned.
*
*/
virtual double valueX(int index) const = 0;
/**
* Get the y value corresponding to a given entry.
* @param index The entry's index.
* @return The y value of the index-th entry.
* If the ICloud3D has already been converted, 0 is returned.
*
*/
virtual double valueY(int index) const = 0;
/**
* Get the z value corresponding to a given entry.
* @param index The entry's index.
* @return The z value of the index-th entry.
* If the ICloud3D has already been converted, 0 is returned.
*
*/
virtual double valueZ(int index) const = 0;
/**
* Get the weight corresponding to a given entry.
* @param index The entry's index.
* @return The weight of the index-th entry.
* If the ICloud3D has already been converted, 0 is returned.
*
*/
virtual double weight(int index) const = 0;
/**
* Get the mean of the ICloud3D along the x axis.
* @return The mean along the x axis.
*
*/
virtual double meanX() const = 0;
/**
* Get the mean of the ICloud3D along the y axis.
* @return The mean along the y axis.
*
*/
virtual double meanY() const = 0;
/**
* Get the mean of the ICloud3D along the z axis.
* @return The mean along the z axis.
*
*/
virtual double meanZ() const = 0;
/**
* Get the RMS of the ICloud3D along the x axis.
* @return The RMS along the x axis.
*
*/
virtual double rmsX() const = 0;
/**
* Get the RMS of the ICloud3D along the y axis.
* @return The RMS along the y axis.
*
*/
virtual double rmsY() const = 0;
/**
* Get the RMS of the ICloud3D along the z axis.
* @return The RMS along the z axis.
*
*/
virtual double rmsZ() const = 0;
/**
* Convert internally the ICloud3D to an IHistogram3D
* with given number of bins, upper edge and lower edge.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of bins of the x axis.
* @param upperEdgeX The upper edge of bins of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of bins of the y axis.
* @param upperEdgeY The upper edge of bins of the y axis.
* @param nBinsZ The number of bins of the z axis.
* @param lowerEdgeZ The lower edge of bins of the z axis.
* @param upperEdgeZ The upper edge of bins of the z axis.
* @return false If the ICloud3D has already been converted.
*
*/
virtual bool convert(int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ) = 0;
/**
* Convert internally the ICloud3D to an IHistogram3D
* with given bin edges.
* @param binEdgesX The bins edges of the x axis.
* @param binEdgesY The bins edges of the y axis.
* @param binEdgesZ The bins edges of the z axis.
* @return false If the ICloud3D has already been converted.
*
*/
virtual bool convert(const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY, const std::vector<double> & binEdgesZ) = 0;
/**
* Get the internal IHistogram3D in which the ICloud3D converted to.
* @return The histogram.
* or because of a convert() method invocation.
*
*/
virtual const IHistogram3D & histogram() const = 0;
/**
* Project the ICloud3D on an IHistogram3D.
* @param hist The IHistogram3D to be filled.
* @return false If the ICloud3D is already converted.
*
*/
virtual bool fillHistogram(IHistogram3D & hist) const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ICLOUD3D_H */
@@ -0,0 +1,40 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ICONSTANTS_H
#define AIDA_ICONSTANTS_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#define VERSION "3.0"
#define VERSION_MAJOR 3
#define VERSION_MINOR 0
#endif /* ifndef AIDA_ICONSTANTS_H */
@@ -0,0 +1,74 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IDATAPOINT_H
#define AIDA_IDATAPOINT_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
namespace AIDA {
class IMeasurement;
/**
* Basic user-level interface class for holding and managing
* a single set of "measurements".
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IDataPoint {
public:
/// Destructor.
virtual ~IDataPoint() { /* nop */; }
/**
* Get the dimension of the IDataPoint, i.e. the number
* of coordinates the point has.
* @return The dimension.
*
*/
virtual int dimension() const = 0;
/**
* Get the IMeasurement for a given coordinate.
* @param coord The coordinate.
* @return The corresponding IMeasurement.
*
*/
virtual IMeasurement * coordinate(int coord) = 0;
virtual const IMeasurement * coordinate(int coord) const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IDATAPOINT_H */
@@ -0,0 +1,204 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IDATAPOINTSET_H
#define AIDA_IDATAPOINTSET_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IAnnotation;
class IDataPoint;
/**
* Basic user-level interface class for holding and managing
* a single set of "data points".
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IDataPointSet {
public:
/// Destructor.
virtual ~IDataPointSet() { /* nop */; }
/**
* Get the IAnnotation of the IDataPointSet.
* @return The IAnnotation.
*
*/
virtual IAnnotation & annotation() = 0;
virtual const IAnnotation & annotation() const = 0;
/**
* Get the title of the IDataPointSet.
* @return The title.
*
*/
virtual const std::string & title() const = 0;
/**
* Set the title of the IDataPointSet.
* @param title The new title.
* @return false If the title cannot be set.
*
*/
virtual bool setTitle(const std::string & title) = 0;
/**
* Get the dimension of the IDataPoints that can be stored in the set.
* @return The dimension of the IDataPoints storable in the set.
*
*/
virtual int dimension() const = 0;
/**
* Remove all the IDataPoints in the set.
* After this the IDataPointSet is as just created.
*
*/
virtual void clear() = 0;
/**
* Get the current size of the IDataPointSet, i.e. the number
* of IDataPoints contained in the set.
* @return The size of the IDataPointSet.
*
*/
virtual int size() const = 0;
/**
* Get the IDataPoint at a give index in the set.
* @param index The IDataPoint index.
* @return The corresponding IDataPoint.
*
*/
virtual IDataPoint * point(int index) = 0;
virtual const IDataPoint * point(int index) const = 0;
/**
* Add a new empty IDataPoint at the end of the set.
* @return false If a new IDataPoint cannot be added to the set.
*
*/
virtual bool addPoint() = 0;
/**
* Add a copy of an IDataPoint at the end of the set.
* @param point The IDataPoint to be added.
* @return false If the point has the wrong dimension or
* if the point cannot be added.
*
*/
virtual bool addPoint(const IDataPoint & point) = 0;
/**
* Remove the IDataPoint at a given index.
* @param index The index of the IDataPoint to be removed.
* @return false If the index is < 0 or >= size().
*
*/
virtual bool removePoint(int index) = 0;
/**
* Get the lower value for a give axis.
* @param coord The coordinate of the axis.
* @return The lower edge of the corresponding axis.
* If coord < 0 or coord >= dimension(), or if the set is empty NaN is returned.
*
*/
virtual double lowerExtent(int coord) const = 0;
/**
* Get the upper value for a give axis.
* @param coord The coordinate of the axis.
* @return The upper edge of the corresponding axis.
* If coord < 0 or coord >= dimension(), or if the set is empty NaN is returned.
*
*/
virtual double upperExtent(int coord) const = 0;
/**
* Scales the values and the errors of all the measurements
* of each point by a given factor.
* @param scaleFactor The scale factor.
* @return false If an illegal scaleFactor is provided.
*
*/
virtual bool scale(double scaleFactor) = 0;
/**
* Scales the values of all the measurements
* of each point by a given factor.
* @param scaleFactor The scale factor.
* @return false If an illegal scaleFactor is provided.
*
*/
virtual bool scaleValues(double scaleFactor) = 0;
/**
* Scales the errors of all the measurements
* of each point by a given factor.
* @param scaleFactor The scale factor.
* @return false If an illegal scaleFactor is provided.
*
*/
virtual bool scaleErrors(double scaleFactor) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IDATAPOINTSET_H */
@@ -0,0 +1,227 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IDATAPOINTSETFACTORY_H
#define AIDA_IDATAPOINTSETFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class ICloud1D;
class ICloud2D;
class ICloud3D;
class IDataPointSet;
class IHistogram1D;
class IHistogram2D;
class IHistogram3D;
class IProfile1D;
class IProfile2D;
/**
* Basic user-level interface for creating a factory
* of IDataPointSet.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IDataPointSetFactory {
public:
/// Destructor.
virtual ~IDataPointSetFactory() { /* nop */; }
/**
* Create an empty IDataPointSet.
* @param name The name of the IDataPointSet.
* @param title The title of the IDataPointSet.
* @param dimOfPoints The dimension of the IDataPoints that can be stored in the set.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const std::string & title, int dimOfPoints) = 0;
/**
* Create an empty IDataPointSet.
* @param nameAndTitle The name and the title of the IDataPointSet.
* @param dimOfPoints The dimension of the IDataPoints that can be stored in the set.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & nameAndTitle, int dimOfPoints) = 0;
/**
* Make a copy of a given IDataPointSet.
* @param name The name of the copy IDataPointSet.
* @param dataPointSet The IDataPointSet to be copied.
* @return The copy of the given IDataPointSet.
*
*/
virtual IDataPointSet * createCopy(const std::string & name, const IDataPointSet & dataPointSet) = 0;
/**
* Destroy a given IDataPointSet.
* @param dataPointSet The IDataPointSet to be destroyed.
* @return false If dataPointSet cannot be destroyed.
*
*/
virtual bool destroy(IDataPointSet * dataPointSet) = 0;
/**
* Create an IDataPointSet from an IHistogram1D.
* @param name The name of the IDataPointSet.
* @param hist The IHistogram1D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const IHistogram1D & hist) = 0;
/**
* Create an IDataPointSet from an IHistogram2D.
* @param name The name of the IDataPointSet.
* @param hist The IHistogram2D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const IHistogram2D & hist) = 0;
/**
* Create an IDataPointSet from an IHistogram3D.
* @param name The name of the IDataPointSet.
* @param hist The IHistogram3D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const IHistogram3D & hist) = 0;
/**
* Create an IDataPointSet from an ICloud1D.
* @param name The name of the IDataPointSet.
* @param cloud The ICloud1D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const ICloud1D & cloud) = 0;
/**
* Create an IDataPointSet from an ICloud2D.
* @param name The name of the IDataPointSet.
* @param cloud The ICloud2D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const ICloud2D & cloud) = 0;
/**
* Create an IDataPointSet from an ICloud3D.
* @param name The name of the IDataPointSet.
* @param cloud The ICloud3D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const ICloud3D & cloud) = 0;
/**
* Create an IDataPointSet from an IProfile1D.
* @param name The name of the IDataPointSet.
* @param profile The IProfile1D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const IProfile1D & profile) = 0;
/**
* Create an IDataPointSet from an IProfile2D.
* @param name The name of the IDataPointSet.
* @param profile The IProfile2D from which the data is taken.
* @return The newly created IDataPointSet.
*
*/
virtual IDataPointSet * create(const std::string & name, const IProfile2D & profile) = 0;
/**
* Add two IDataSetPoint, point by point and measurement by measurement.
* @param name The name of the resulting IDataPointSet
* @param dataPointSet1 The first member of the addition.
* @param dataPointSet2 The second member of the addition.
*
*/
virtual IDataPointSet * add(const std::string & name, const IDataPointSet & dataPointSet1, const IDataPointSet & dataPointSet2) = 0;
/**
* Subtract two IDataSetPoint, point by point and measurement by measurement.
* @param name The name of the resulting IDataPointSet
* @param dataPointSet1 The first member of the subtraction.
* @param dataPointSet2 The second member of the subtraction.
* @param strategy The strategy of how to perform the subtraction. The default corresponds to
* uncorrelated Gaussian error propagation.
*
*/
virtual IDataPointSet * subtract(const std::string & name, const IDataPointSet & dataPointSet1, const IDataPointSet & dataPointSet2) = 0;
/**
* Multiply two IDataSetPoint, point by point and measurement by measurement.
* @param name The name of the resulting IDataPointSet
* @param dataPointSet1 The first member of the multiplication.
* @param dataPointSet2 The second member of the multiplication.
* @param strategy The strategy of how to perform the multiplication. The default corresponds to
* uncorrelated Gaussian error propagation.
*
*/
virtual IDataPointSet * multiply(const std::string & name, const IDataPointSet & dataPointSet1, const IDataPointSet & dataPointSet2) = 0;
/**
* Divide two IDataSetPoint, point by point and measurement by measurement.
* @param name The name of the resulting IDataPointSet
* @param dataPointSet1 The first member of the division.
* @param dataPointSet2 The second member of the division.
* @param strategy The strategy of how to perform the division. The default corresponds to
* uncorrelated Gaussian error propagation.
*
*/
virtual IDataPointSet * divide(const std::string & name, const IDataPointSet & dataPointSet1, const IDataPointSet & dataPointSet2) = 0;
/**
* Calculate weighted means of two IDataSetPoint, point by point and measurement by measurement.
* @param name The name of the resulting IDataPointSet
* @param dataPointSet1 The first IDataPointSet.
* @param dataPointSet2 The second IDataPointSet.
* @param strategy The strategy of how to calculate the weighted means. The default corresponds to
* uncorrelated Gaussian error propagation.
*
*/
virtual IDataPointSet * weightedMean(const std::string & name, const IDataPointSet & dataPointSet1, const IDataPointSet & dataPointSet2) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IDATAPOINTSETFACTORY_H */
@@ -0,0 +1,79 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IDATASTYLE_H
#define AIDA_IDATASTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseStyle.h"
namespace AIDA {
class IFillStyle;
class ILineStyle;
class IMarkerStyle;
/**
* Style for the part of the scene representing the data
* (then histograms, functions, data point sets).
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IDataStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~IDataStyle() { /* nop */; }
/**
* Return various styles that may be used to
* customize the data representation.
*/
virtual ILineStyle & lineStyle() = 0;
virtual IMarkerStyle & markerStyle() = 0;
virtual IFillStyle & fillStyle() = 0;
/**
* Set various basic style on the data style.
*/
virtual bool setLineStyle(const ILineStyle & lineStyle) = 0;
virtual bool setMarkerStyle(const IMarkerStyle & markerStyle) = 0;
virtual bool setFillStyle(const IFillStyle & fillStyle) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IDATASTYLE_H */
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IEVALUATOR_H
#define AIDA_IEVALUATOR_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class ITuple;
/**
* User's level interface of an IEvaluator.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IEvaluator {
public:
/// Destructor.
virtual ~IEvaluator() { /* nop */; }
/**
* Initialize the IEvaluator and associate it to an ITuple.
* @param tuple The ITuple to which the IEvaluator is sssociated.
* @return false If the IEvaluator and
* the ITuple are not compatible.
*
*/
virtual bool initialize(ITuple & tuple) = 0;
/**
* Evaluate the IEvaluator from the data in the
* current row of the ITuple it is associated to.
* @return The current value of the Evaluator.
*
*/
virtual double evaluateDouble() const = 0;
/**
* Get the expression that defined the IEvaluator.
* @return The expression.
*
*/
virtual const std::string & expression() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IEVALUATOR_H */
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFILLSTYLE_H
#define AIDA_IFILLSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
#include "AIDA/IBrushStyle.h"
namespace AIDA {
/**
* Style for all filled areas (boxes, regions, histograms, etc.)
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IFillStyle : virtual public IBrushStyle {
public:
/// Destructor.
virtual ~IFillStyle() { /* nop */; }
/**
* Get a list of patterns available in this implementation.
*/
virtual std::vector<std::string> availablePatterns() const = 0;
/**
* Get name of current pattern.
*/
virtual std::string pattern() const = 0;
/**
* Set current pattern, e.g. "crossHatch", "solid".
* @return false if pattern not known to this implementation.
*/
virtual bool setPattern(const std::string & pattern) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFILLSTYLE_H */
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFILTER_H
#define AIDA_IFILTER_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class ITuple;
/**
* User's level interface of an IFilter.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFilter {
public:
/// Destructor.
virtual ~IFilter() { /* nop */; }
/**
* Initialize the IFilter and associate it to an ITuple.
* @param tuple The ITuple to which the IFilter is sssociated.
* @return false If the IFilter and
* the ITuple are not compatible.
*
*/
virtual bool initialize(ITuple & tuple) = 0;
/**
* Check if the IFilter accepts or not the data in the
* current row of the ITuple it is associated to.
* @return <code>true</code> if the current data is accepted.
*
*/
virtual bool accept() const = 0;
/**
* Get the expression that defined the IFilter.
* @return The expression.
*
*/
virtual const std::string & expression() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFILTER_H */
@@ -0,0 +1,353 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFITDATA_H
#define AIDA_IFITDATA_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class ICloud1D;
class ICloud2D;
class ICloud3D;
class IDataPointSet;
class IEvaluator;
class IHistogram1D;
class IHistogram2D;
class IHistogram3D;
class IProfile1D;
class IProfile2D;
class IRangeSet;
class ITuple;
/** @interface
*
* Abstract representation of the fit data. Serves for several purposes:
* - decouple fitter from the details of the particular data
* objects (Histograms etc)
* - provide range restriction capability ("cut of the tails...")
* - creates the image of the virtual data source
*
* Design notes:
*
* 1)
* we try to be explicit in the method names which should indicate the
* dimensionality of the fit data.
*
* this way we have more compile-time/run-time safety and clearer code.
* in C++ we can handle default arguments which otherwise would be ambigeous.
*
* 2)
* string names of the arguments are at the end of the methods'
* signatures and have default (empty) values.
* so if function argument name is missing,
* assume the ordering is taken from the histogram axis it connects to
* the name of the pipes then are generated automatically using
* the same default scheme as for functions x[1], x[2] etc.
*
* 3)
* There are two ends to pipes: one connected to the
* data source and one pouring data out. Both their orders has to be specified.
*
* For IHistogram, ICloud, IProfile the connections to the data source are
* ordered as the axis (x=0, y=1, z=2); the user has to provide the order
* with which the pipes are providing the data. So for example in the constructor
* create2DConnection(hist2D,xIndex,yIndex);
* xIndex specifies the exit order of the pipe connected to the x Axis (and similarly
* for yIndex). So the default method
* create2DConnection(hist2D);
* corresponds to
* create2DConnection(hist2D,0,1);
* In the methods for IHistograms, IClouds, and IProfiles one index could have
* been dropped as the second could be inferred by the dimensionality. We
* preferred being redundant just to avoid confusion in interpreting what
* create2DConnection(hist2D,1);
* really means.
*
* For ITuple and IDataPointSet the order in the connection to the data source
* is specified by the user by providing, respectively, the array of column names (or evaluators)
* and the array of coordinate indexes to which to connect the pipes.
* In this case we assume that the pipes are parallel, i.e. the exit order is the same
* as the one of the connection to the data source.
* In the createXDConnection methods to IDataPointSets we preferred not to provide
* defaults for the valIndex to avoid confusion in interpreting it.
* We can always add it later.
*
* PENDING: clarify the relation between data range and normalization range
*
* @author The AIDA Team.
*
*/
class IFitData {
public:
/// Destructor.
virtual ~IFitData() { /* nop */; }
/**
* One dimensional connections.
*
*/
/**
* Create a one dimensional connection to an IHistogram1D.
* @param h The 1D histogram to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create1DConnection(const IHistogram1D & h) = 0;
/**
* Create a one dimensional connection to an ICloud1D.
* @param c The 1D cloud to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create1DConnection(const ICloud1D & c) = 0;
/**
* Create a one dimensional connection to an IProfile1D.
* @param p The 1D profile to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create1DConnection(const IProfile1D & p) = 0;
/**
* Create a one dimensional connection to an IDataPointSet.
* @param dp The dataPointSet to which to connect to.
* @param xIndex The index of the coordinate to which the variable is connected.
* @param valIndex The index of the coordinate used as "height".
* @return false If something is wrong.
*
*/
virtual bool create1DConnection(const IDataPointSet & dp, int xIndex, int valIndex) = 0;
/**
* Two dimensional connections.
*
*/
/**
* Create a two dimensional connection to an IHistogram2D.
* @param h The 2D histogram to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const IHistogram2D & h) = 0;
/**
* Create a two dimensional connection to an IHistogram2D.
* @param h The 2D histogram to which to connect to.
* @param xIndex The index of the axis to which the x variable is connected.
* @param yIndex The index of the axis to which the y variable is connected.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const IHistogram2D & h, int xIndex, int yIndex) = 0;
/**
* Create a two dimensional connection to an ICloud2D.
* @param c The 2D cloud to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const ICloud2D & c) = 0;
/**
* Create a two dimensional connection to an ICloud2D.
* @param c The 2D cloud to which to connect to.
* @param xIndex The index of the axis to which the x variable is connected.
* @param yIndex The index of the axis to which the y variable is connected.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const ICloud2D & c, int xIndex, int yIndex) = 0;
/**
* Create a two dimensional connection to an IProfile2D.
* @param p The 2D profile to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const IProfile2D & p) = 0;
/**
* Create a two dimensional connection to an IProfile2D.
* @param p The 2D profile to which to connect to.
* @param xIndex The index of the axis to which the x variable is connected.
* @param yIndex The index of the axis to which the y variable is connected.
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const IProfile2D & p, int xIndex, int yIndex) = 0;
/**
* Create a two dimensional connection to an IDataPointSet.
* @param dp The dataPointSet to which to connect to.
* @param xIndex The index of the coordinate to which the x variable is connected.
* @param yIndex The index of the coordinate to which the y variable is connected.
* @param valIndex The index of the coordinate used as "height".
* @return false If something is wrong.
*
*/
virtual bool create2DConnection(const IDataPointSet & dp, int xIndex, int yIndex, int valIndex) = 0;
/**
* Three dimensional connections.
*
*/
/**
* Create a three dimensional connection to an IHistogram3D.
* @param h The 3D histogram to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create3DConnection(const IHistogram3D & h) = 0;
/**
* Create a three dimensional connection to an IHistogram3D.
* @param h The 3D histogram to which to connect to.
* @param xIndex The index of the axis to which the x variable is connected.
* @param yIndex The index of the axis to which the y variable is connected.
* @param zIndex The index of the axis to which the z variable is connected.
* @return false If something is wrong.
*
*/
virtual bool create3DConnection(const IHistogram3D & h, int xIndex, int yIndex, int zIndex) = 0;
/**
* Create a three dimensional connection to an ICloud3D.
* @param c The 3D cloud to which to connect to.
* @return false If something is wrong.
*
*/
virtual bool create3DConnection(const ICloud3D & c) = 0;
/**
* Create a three dimensional connection to an ICloud3D.
* @param c The 3D cloud to which to connect to.
* @param xIndex The index of the axis to which the x variable is connected.
* @param yIndex The index of the axis to which the y variable is connected.
* @param zIndex The index of the axis to which the z variable is connected.
* @return false If something is wrong.
*
*/
virtual bool create3DConnection(const ICloud3D & c, int xIndex, int yIndex, int zIndex) = 0;
/**
* Create a three dimensional connection to an IDataPointSet.
* @param dp The dataPointSet to which to connect to.
* @param xIndex The index of the coordinate to which the x variable is connected.
* @param yIndex The index of the coordinate to which the y variable is connected.
* @param zIndex The index of the coordinate to which the z variable is connected.
* @param valIndex The index of the coordinate used as "height".
* @return false If something is wrong.
*
*/
virtual bool create3DConnection(const IDataPointSet & dp, int xIndex, int yIndex, int zIndex, int valIndex) = 0;
/**
* General connections.
*
*/
/**
* Tuples are for UNBINNED fits, so no value column required.
*/
/**
* Create a connection to an ITuple.
* @param t The ITuple.
* @param colNames The names of the columns to which to connect.
* @return false If something is wrong.
*
*/
virtual bool createConnection(const ITuple & t, std::vector<std::string> colNames) = 0;
/**
* Create a connection to an ITuple.
* @param t The ITuple.
* @param evals The list of the IEvaluator used to calculate the variable's value.
* @return false If something is wrong.
*
*/
virtual bool createConnection(const ITuple & t, std::vector<IEvaluator *> & evals) = 0;
/**
* Create a connection to an IDataPointSet.
* @param dp The dataPointSet to which to connect to.
* @param indeces The indeces of the coordinates to which the variables are connected.
* @param valIndex The index of the coordinate used as "height".
* @return false If something is wrong.
*
*/
virtual bool createConnection(const IDataPointSet & dp, std::vector<int> indeces, int valIndex) = 0;
/**
* Remove all Ranges and connections; after this is like newly create.
*
*/
virtual void reset() = 0;
/**
* The dimension of this IFitData, i.e. the number of connections.
* @return The dimension of the IFitData.
*
*/
virtual int dimension() const = 0;
/// Return a string describing the data. This should be considered as a
/// hint to the user where to find the original data objects and how
/// to connect the data pipes. PENDING: probably this can be part of
/// XML streaming.
virtual std::string dataDescription() const = 0;
/**
* Get Range of the corresponding connection by index.
* The index represent the order in which
* connections are coming out of the IFitData.
* @param The index of the connection.
* @return The Range
*
*/
virtual IRangeSet & range(int index) const = 0;
/** @link aggregation */
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFITDATA_H */
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFITFACTORY_H
#define AIDA_IFITFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IFitData;
class IFitter;
/** @interface IFitFactory
*
* Factory for fitter and fit data objects.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFitFactory {
public:
/// Destructor.
virtual ~IFitFactory() { /* nop */; }
virtual IFitData * createFitData() = 0;
/**
* Create a new IFitter.
* @param fitterType The type of fitter. The supported types are:
* - "CHI2" or "Chi2" or "ChiSquared" for chi squared fitter (this is the default),
* - "ML" or "MaxLikelihood" for maximum likelihood fitter,
* - "LS" or "LeastSquares" for Last Squares fitter.
* @param engineType The type of optimization engine used by the fitter. The available types depend on the
* specific implementation in use. The default is "" (the implementation specific default).
* @param options A string of options. The default is "".
* @return The IFitter.
*
*/
virtual IFitter * createFitter(std::string fitterType = "Chi2", std::string engineType = "", std::string options = "") = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFITFACTORY_H */
@@ -0,0 +1,108 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFITPARAMETERSETTINGS_H
#define AIDA_IFITPARAMETERSETTINGS_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
/** @interface
*
* Fitting-specific settings applied to a parameter of the fitted function.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFitParameterSettings {
public:
/// Destructor.
virtual ~IFitParameterSettings() { /* nop */; }
/// Name of the parameter to which settings apply.
virtual std::string name() const = 0;
/// Step size allows to control the "sensitivity" of the change of the parameter
/// when fitters looks for the optimal parameter value. Default is 1.0.
virtual double stepSize() const = 0;
/// Bounds.
virtual double upperBound() const = 0;
virtual double lowerBound() const = 0;
/// Shortcut for lowerBound() == -INF && upperBound() == +INF.
virtual bool isBound() const = 0;
/// Value of the parameter cannot change if isFixed() == true.
/// Parameter can be fixed independently from setting the bounds.
virtual bool isFixed() const = 0;
/// Set the step size for the fitter.
virtual void setStepSize(double step) = 0;
/// Set bounds. If bounds not set, then default bound is (-INF,+INF).
virtual void setBounds(double lo, double up) = 0;
/// Shortcut for setBounds(-INF,+INF).
virtual void removeBounds() = 0;
/// Fix/unfix parameter.
virtual void setFixed(bool isFixed) = 0;
/**
* Set the lower bound. When this method is
* invoked any previous bound is reset. The new bounds
* are (lowerBound, +INF).
* @param lowerBound The lower bound.
*
*/
virtual void setLowerBound(double lowerBound) = 0;
/**
* Set the upper bound. When this method is
* invoked any previous bound is reset. The new bounds
* are (-INF, upperBound).
* @param upperBound The upper bound.
*
*/
virtual void setUpperBound(double upperBound) = 0;
/// Reset all settings to the default values (remove bounds, step size = 1.0, no fix).
virtual void reset() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFITPARAMETERSETTINGS_H */
@@ -0,0 +1,151 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFITRESULT_H
#define AIDA_IFITRESULT_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IFitParameterSettings;
class IFunction;
/** @interface
*
* Represents the result of the fit.
*
* Holds internal copies of fit parameter settings (set in IFitter) and the
* fitted function (clone of original function). The value of the parameters
* of the fitted function are obtained from the fitting.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFitResult {
public:
/// Destructor.
virtual ~IFitResult() { /* nop */; }
/// True if fit successful, otherwise false.
virtual bool isValid() = 0;
/// Status of the fit. PENDING: what are the suggested values?
virtual int fitStatus() = 0;
/// Fitted function. The parameters hold the results of the fit.
virtual IFunction * fittedFunction() = 0;
/// Quality of the fit. Depending on the fit method this may be the value
/// of Chi2 or Maximu Likelihood.
virtual double quality() = 0;
/// Number of degrees of freedom.
virtual int ndf() = 0;
/// Covariance matrix. PENDING: interface for matrix to be defined.
virtual double covMatrixElement(int i, int j) = 0;
/// Fit method name as set in the fitter.
virtual std::string fitMethodName() = 0;
/// Engine used to do fitting.
virtual std::string engineName() = 0;
/// Textual description of data - this is a hint for the user how to find
/// the data in the tree if he wanted to repeat the fit later and lost
/// the pointer to his orignal data object.
/// PENDING: the contents and format of this string to be defined.
/// PENDING: XML? stor name and path? ranges of DataPipe?
virtual std::string dataDescription() = 0;
/// Vector of constraints.
virtual const std::vector<std::string> & constraints() = 0;
/// Access to applied parameter settings.
virtual IFitParameterSettings * fitParameterSettings(std::string name) = 0;
/**
* Get the array of the fitted parameter values (including fixed and constrained ones).
* @return The array containing the fitted values.
*
*/
virtual const std::vector<double> & fittedParameters() const = 0;
/**
* Get the names of the fitted parameters (including fixed and constrained ones).
* @return The array containing the names of the fitted parameters.
*
*/
virtual const std::vector<std::string> & fittedParameterNames() const = 0;
/**
* Get the value of a fitted parameter by name.
* @return The value.
*
*/
virtual double fittedParameter(std::string & name) = 0;
/**
* Get the parabolic errors on the fitted parameters. If a parameter was fixed
* or constrained the error is zero.
* @return The parabolic errors on the fitted parameters.
*
*/
virtual const std::vector<double> & errors() const = 0;
/**
* Get the positive part of the asymmetric errors on the fitted parameters. If a parameter was fixed
* or constrained the error is zero.
* @return The positive part of the asymmetric errors on the fitted parameters.
*
*/
virtual const std::vector<double> & errorsPlus() const = 0;
/**
* Get the negative part of the asymmetric errors on the fitted parameters. If a parameter was fixed
* or constrained the error is zero.
* @return The negative part of the asymmetric errors on the fitted parameters.
*
*/
virtual const std::vector<double> & errorsMinus() const = 0;
/** @link aggregation
* @supplierRole <<internal copy>>*/
/*# IFitParameterSettings lnkIFitParameterProperty; */
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFITRESULT_H */
@@ -0,0 +1,275 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFITTER_H
#define AIDA_IFITTER_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IBaseHistogram;
class IDataPointSet;
class IFitData;
class IFitParameterSettings;
class IFitResult;
class IFunction;
/** @interface IFitter
*
* Fitter performs fits, scans and computes contours.
*
* Fitter never stores association to the data and functions which are
* used for fitting. Results of the fit are availabe in the IFitResult
* object, which also remebers the initial fit configuration.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFitter {
public:
/// Destructor.
virtual ~IFitter() { /* nop */; }
/**
* Fit an IFunction to an IFitData.
* The result of the fit is an IFitResult.
* @param fitData The IFitData to be fitted.
* @param func The IFunction to fit on the data.
* @return The IFitResult containing the results of the fit.
*
*/
virtual IFitResult * fit(IFitData & fitData, IFunction & func) = 0;
/**
* Shortcut to fit an IBaseHistogram directly with an IFunction.
* The dimension of the IBaseHistogram must match the dimension of the IFunction.
* IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
* @param hist The IBaseHistogram to be fitted.
* @param func The IFunction to fit on the data.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IBaseHistogram & hist, IFunction & func) = 0;
/**
* Shortcut to fit an IBaseHistogram directly with an IFunction.
* The dimension of the IBaseHistogram must match the dimension of the IFunction.
* IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
* @param hist The IBaseHistogram to be fitted.
* @param model The string defining the function to be used.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IBaseHistogram & hist, std::string model) = 0;
/**
* Shortcut to fit an IBaseHistogram directly with an IFunction.
* The dimension of the IBaseHistogram must match the dimension of the IFunction.
* IHistograms and IProfiles are for binned fits only, IClouds only for unbinned fits.
* @param hist The IBaseHistogram to be fitted.
* @param model The string defining the function to be used.
* @param initialParameters The array of the initial parameter values; its size must match the number of
* parameters in the function.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IBaseHistogram & hist, std::string model, std::vector<double> & initialParameters) = 0;
/**
* Shortcut to fit an IDataPointSet directly with an IFunction.
* The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1.
* This are binned fits only; the last coordinate of the IDataPointSet is used as
* the "height" in a fit to an IBaseHistogram.
* @param dataPointSet The IDataPointSet to be fitted.
* @param func The IFunction to fit on the data.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IDataPointSet & dataPointSet, IFunction & f) = 0;
/**
* Shortcut to fit an IDataPointSet directly with an IFunction.
* The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1.
* This are binned fits only; the last coordinate of the IDataPointSet is used as
* the "height" in a fit to an IBaseHistogram.
* @param dataPointSet The IDataPointSet to be fitted.
* @param model The string defining the function to be used.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IDataPointSet & dataPointSet, std::string model) = 0;
/**
* Shortcut to fit an IDataPointSet directly with an IFunction.
* The dimension of the IDataPointSet must be equal the dimension of the IFunction + 1.
* This are binned fits only; the last coordinate of the IDataPointSet is used as
* the "height" in a fit to an IBaseHistogram.
* @param dataPointSet The IDataPointSet to be fitted.
* @param model The string defining the function to be used.
* @param initialParameters The array of the initial parameter values; its size must match the number of
* parameters in the function.
* @return The IFitResult containing the result of the fit.
*
*/
virtual IFitResult * fit(IDataPointSet & dataPointSet, std::string model, std::vector<double> & initialParameters) = 0;
/// Shortcut for the predefined models.
virtual IFitResult * fit(IFitData & d, std::string model) = 0;
virtual IFitResult * fit(IFitData & d, std::string model, std::vector<double> & initialParameters) = 0;
/**
* Set the optimization engine which is used internally for fitting.
* @param name The name of the optimizer engine.
* Examples of predefined engines: "minuit". The engine name is case-insensitive.
* Different engines are provided by different implementations.
* @return false If the name does not correspond to a valid engine.
*
*/
virtual bool setEngine(std::string name) = 0;
/**
* Get the name of the engine currently in use.
* @return The name of the optimizer engine used by the IFitter.
*
*/
virtual std::string engineName() = 0;
/**
* Access to fit parameter settings. FitParameterSettings object belongs to
* and is managed by the fitter. Fitter implementation takes care that the
* returned reference is valid thru the lifetime of fitter.
* User can set the settings of the parameters independently of the
* parameters of the fitted function.
* Setting for parameters unknown in the function and set in the
* fitter are ignored in the fit.
* If settings are not explicitly set in the fitter, their default
* values are attached to function parameters during the fit.
*/
virtual IFitParameterSettings & fitParameterSettings(std::string name) = 0;
/**
* Get a vector of names of all parameter settings defined in the fitter.
*/
virtual const std::vector<std::string> & listParameterSettings() = 0;
/**
* Reset all parameter settings which fitter remebers.
*/
virtual void resetParameterSettings() = 0;
/**
* Set a general constraint in the parameter space. The constraint
* is a parsed expression. PENDING: The syntax to be fixed.
*/
virtual bool setConstraint(std::string expr) = 0;
/// Get the list of all constraints.
virtual const std::vector<std::string> & constraints() = 0;
/**
* Reset all the constraints.
*/
virtual void resetConstraints() = 0;
/**
* Set the fit method type. Examples of pre-defined methods: "chi2", "ml".
* The method names are case-insensitive.
* @param name The name of the fit method.
* @return false If the name does not correspond to a valid fit method.
*
*/
virtual bool setFitMethod(std::string name) = 0;
/**
* Get the name of the fit method currently in use.
* @return The name of the fit method.
*
*/
virtual std::string fitMethodName() = 0;
/// Create a 1D scan of the fit quality for given parameter 'par' of
/// the function.
/// User must make sure that the returned vector is properly deleted
/// after use.
/// The vector containes 'npts' points which are evenly sampled in the
/// interval ('pmin','pmax').
virtual IDataPointSet * createScan1D(IFitData & d, IFunction & f, std::string par, int npts, double pmin, double pmax) = 0;
/// Create a 2D contour spanned on 'par1' and 'par2',
/// with given number of npts points. Contour is create using previously
/// obtained fit results. Argument 'up' tells the vertical distance of
/// the contour plane above the minimal fit quality value.
virtual IDataPointSet * createContour(IFitData & d, IFitResult & r, std::string par1, std::string par2, int npts, double up) = 0;
/**
* Choose between using or not using the
* analytical derivatives if provided by the function.
* @param useGrad If <code>true</code> the IFitter will use the
* analytical derivatives if provided by the IFunction.
*
*/
virtual void setUseFunctionGradient(bool useGrad) = 0;
/**
* Check if the IFitter is set to use the analytical derivatives provided
* by the IFunction.
* @return <code>true</code> if the IFitter uses the analytical derivatives.
*
*/
virtual bool useFunctionGradient() = 0;
/**
* @link association
* @directed
* @label <<create>>
*/
/*# IFitResult lnkIFitResult; */
/** @link dependency */
/*# IFitData lnkIFitData; */
/** @link aggregation
* @supplierRole <<internal copy>>*/
/*# IFitParameterSettings lnkIFitParameter; */
/** @link dependency
* @label fitter uses function for fitting*/
/*# IFunction lnkIFunction; */
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFITTER_H */
@@ -0,0 +1,191 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFUNCTION_H
#define AIDA_IFUNCTION_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IAnnotation;
/** @interface IFunction
*
* Principal user-level function interface. Function is a self
* contained object, which remembers the current value of its parameters
* which are simple doubles. IFunction may be directly plotted or fitted.
*
* The standard convention of referring to variables by name:
* "x[0]" corresponds to variable number 0 etc.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFunction {
public:
/// Destructor.
virtual ~IFunction() { /* nop */; }
/**
* Scalar value of the function.
*/
virtual double value(const std::vector<double> & x) const = 0;
/**
* Dimensionality of the domain space.
*/
virtual int dimension() const = 0;
/**
* Compare if functions are the same.
* PENDING: define exactly what it means ;)
*/
virtual bool isEqual(const IFunction * f) const = 0;
/**
* Gradient of the function.
* The result is valid only if providesGradient()==true.
* Otherwise the result is some default (empty) vector.
*/
virtual const std::vector<double> & gradient(const std::vector<double> & x) const = 0;
/**
* Determine whether function is able to compute gradient.
*/
virtual bool providesGradient() const = 0;
/**
* Get the symbolic name of i-th variable.
*/
virtual std::string variableName(int i) const = 0;
/**
* Get all the names in a vector.
*/
virtual const std::vector<std::string> & variableNames() const = 0;
/**
* Set new vector of parameters.
*/
virtual void setParameters(const std::vector<double> & params) = 0;
/**
* Retrieve current vector of parameters.
*/
virtual const std::vector<double> & parameters() const = 0;
/**
* Number of parameters.
*/
virtual int numberOfParameters() const = 0;
/**
* Names of paramaters.
* Names should be unique. Case-insensitive for comparison.
* Case-sensitive for storage and output.
* All or several names may be left blank "" if the implementation
* does not want to provide them.
*/
virtual const std::vector<std::string> & parameterNames() const = 0;
/**
* Set parameter's value by name.
* @param name The name of the parameter.
* @param x The new value of the parameter.
* @return false If name does not correspond to a parameter.
*
*/
virtual bool setParameter(std::string name, double x) = 0;
virtual double parameter(std::string name) const = 0;
/**
* Return -1 if parameter not found (name undefined).
* Leave it because there are use cases - some users prefer to use numbers.
*/
virtual int indexOfParameter(std::string name) const = 0;
virtual IAnnotation & annotation() = 0;
virtual const IAnnotation & annotation() const = 0;
/**
* String describing the metatype and implementation of the function.
*
* Generic format of the string:
*
* codelet:TYPE:LOCATION
*
* TYPE part contains only a 'typename' string
* which is a metatype identifier (used in plugins and catalogues)
*
* LOCATION may be: 'file', 'verbatim', or 'catalogue'
*
* Detailed description:
*
* codelet:typename - no location specified (using 'catalogue')
*
* codelet:typename:file:/filename.cpp - a c++ source file
* codelet:typename:file:/filename.py - a python source file
* codelet:typename:file:/filename.so - a shared library
*
* codelet:typename:catalogue - entry in a catalogue repository
*
* codelet:typename:verbatim:cpp \n - c++ source file included verbatim
* after \n
*
* codelet:typename:verbatim:py \n - python source file included
* verbatim aftern \n
*
*
* Comments:
*
* file:/filename is a relative path to $AIDA_FUNCTION_DEFAULT_DIR
* file://filename is an absolute path
*
* Examples:
*
* codelet:G:catalogue
* codelet:userSinus:verbatim:cpp \n { return sin(x); }
*/
virtual std::string codeletString() const = 0;
/** @link aggregation */
/*# IAnnotation lnkIAnnotation; */
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFUNCTION_H */
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFUNCTIONCATALOG_H
#define AIDA_IFUNCTIONCATALOG_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IFunction;
/** @interface
*
* Function catalog.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IFunctionCatalog {
public:
/// Destructor.
virtual ~IFunctionCatalog() { /* nop */; }
/**
* Remember persistently definition (code!) of a function under a name.
* Scripted function created by the user may be automatically available
* in the subsequent analysis sessions. This is also a way to create
* new names for combinations of exisiting model functions ("G+G+E+P5").
* Last but not least, system may be easily extended with model functions
* developed in the programming language directly.
* Predefined functions: "G","E","Pn".
*/
virtual bool add(std::string nameId, IFunction * f) = 0;
virtual bool add(std::string nameId, const std::string & codelet) = 0;
/*
* Get a list of all available functions.
*/
virtual const std::vector<std::string> & list() = 0;
/*
* Remove function from the catalog.
*/
virtual void remove(const std::string & nameId) = 0;
/*
* Write contents of the catalog to disk.
* We have to agree on the format here, or define and XML
* entry for IFunctionCatalog!
*/
virtual bool storeAll(const std::string & nameOnDisk) = 0;
/*
* Load contents of the catalog from disk
* We have to agree on the format here, or define and XML
* entry for IFunctionCatalog!
*/
virtual bool loadAll(const std::string & nameOnDisk) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFUNCTIONCATALOG_H */
@@ -0,0 +1,87 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IFUNCTIONFACTORY_H
#define AIDA_IFUNCTIONFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IFunction;
class IFunctionCatalog;
/** @interface IFunctionFactory
*
* Function factory.
*
* @author The AIDA team (http://aida.freehep.org/)
*
* @stereotype abstractfactory
*/
class IFunctionFactory {
public:
/// Destructor.
virtual ~IFunctionFactory() { /* nop */; }
/**
* Create function from a name registered in the catalog.
* This is the easiest way to create simple model functions for fitting.
* Every AIDA compliant implementation should predefine "G", "E", "Pn"
* (n is an integer, e.e "P0","P5"). Simple operations are permitted,
* e.g. "G+P2".
*/
virtual IFunction * createFunctionByName(const std::string & name, std::string model) = 0;
/**
* Create function from script. Script conventions:
* example: createFunctionFromScript("f1", 2, "a*x[0]*x[0] + b*x[1]", "a,b",
"this is my function", "2*a*x[0],b")
*/
virtual IFunction * createFunctionFromScript(const std::string & name, int dim, std::string valexpr, std::string parameters, std::string description, std::string gradexpr = "") = 0;
virtual IFunction * cloneFunction(const std::string & name, IFunction * f) = 0;
/**
* get access to the function catalog
*/
virtual IFunctionCatalog * catalog() = 0;
/** @link association
* @directed*/
/*# IFunctionCatalog lnkIFunctionCatalog; */
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IFUNCTIONFACTORY_H */
@@ -0,0 +1,127 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IHISTOGRAM_H
#define AIDA_IHISTOGRAM_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseHistogram.h"
namespace AIDA {
/**
* User level interface to Histogram.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IHistogram : virtual public IBaseHistogram {
public:
/// Destructor.
virtual ~IHistogram() { /* nop */; }
/**
* Sum of the entries in all the IHistogram's bins,
* i.e in-range bins, UNDERFLOW and OVERFLOW.
* This is equivalent to the number of times the
* method fill was invoked.
* @return The sum of all the entries.
*
*/
virtual int allEntries() const = 0;
/**
* Number of entries in the UNDERFLOW and OVERFLOW bins.
* @return The number of entries outside the range of the IHistogram.
*
*/
virtual int extraEntries() const = 0;
/**
* Number of equivalent entries, i.e. <tt>SUM[ weight ] ^ 2 / SUM[ weight^2 ]</tt>
* @return The number of equivalent entries.
*
*/
virtual double equivalentBinEntries() const = 0;
/**
* Sum of in-range bin heights in the IHistogram,
* UNDERFLOW and OVERFLOW bins are excluded.
* @return The sum of the in-range bins heights.
*
*/
virtual double sumBinHeights() const = 0;
/**
* Sum of the heights of all the IHistogram's bins,
* i.e in-range bins, UNDERFLOW and OVERFLOW.
* @return The sum of all the bins heights.
*
*/
virtual double sumAllBinHeights() const = 0;
/**
* Sum of heights in the UNDERFLOW and OVERFLOW bins.
* @return The sum of the heights of the out-of-range bins.
*
*/
virtual double sumExtraBinHeights() const = 0;
/**
* Minimum height of the in-range bins,
* i.e. not considering the UNDERFLOW and OVERFLOW bins.
* @return The minimum height among the in-range bins.
*
*/
virtual double minBinHeight() const = 0;
/**
* Maximum height of the in-range bins,
* i.e. not considering the UNDERFLOW and OVERFLOW bins.
* @return The maximum height among the in-range bins.
*
*/
virtual double maxBinHeight() const = 0;
/**
* Scale the weights and the errors of all the IHistogram's bins
* (in-range and out-of-range ones) by a given scale factor.
* @param scaleFactor The scale factor.
* @return false If the scale factor is negative.
*
*/
virtual bool scale(double scaleFactor) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IHISTOGRAM_H */
@@ -0,0 +1,138 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IHISTOGRAM1D_H
#define AIDA_IHISTOGRAM1D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IHistogram.h"
namespace AIDA {
class IAxis;
/**
* User level interface to 1D Histogram.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IHistogram1D : virtual public IHistogram {
public:
/// Destructor.
virtual ~IHistogram1D() { /* nop */; }
/**
* Fill the IHistogram1D with a value and the
* corresponding weight.
* @param x The value to be filled in.
* @param weight The corresponding weight (by default 1).
* @return false If the weight is <0 or >1 (?).
*
*/
virtual bool fill(double x, double weight = 1.) = 0;
/**
* The weighted mean of a bin.
* @param index The bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin.
*
*/
virtual double binMean(int index) const = 0;
/**
* Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
* @param index The bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding bin.
*
*/
virtual int binEntries(int index) const = 0;
/**
* Total height of the corresponding bin (ie the sum of the weights in this bin).
* @param index The bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The height of the corresponding bin.
*
*/
virtual double binHeight(int index) const = 0;
/**
* The error of a given bin.
* @param index The bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The error on the corresponding bin.
*
*/
virtual double binError(int index) const = 0;
/**
* The mean of the whole IHistogram1D.
* @return The mean of the IHistogram1D.
*
*/
virtual double mean() const = 0;
/**
* The RMS of the whole IHistogram1D.
* @return The RMS if the IHistogram1D.
*
*/
virtual double rms() const = 0;
/**
* Get the x axis of the IHistogram1D.
* @return The x coordinate IAxis.
*
*/
virtual const IAxis & axis() const = 0;
/**
* Get the bin number corresponding to a given coordinate along the x axis.
* This is a convenience method, equivalent to <tt>axis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the x axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndex(double coord) const = 0;
/**
* Add to this IHistogram1D the contents of another IHistogram1D.
* @param hist The IHistogram1D to be added to this IHistogram1D.
* @return false If the IHistogram1Ds binnings are incompatible.
*
*/
virtual bool add(const IHistogram1D & hist) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IHISTOGRAM1D_H */
@@ -0,0 +1,219 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IHISTOGRAM2D_H
#define AIDA_IHISTOGRAM2D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IHistogram.h"
namespace AIDA {
class IAxis;
/**
* User level interface to 2D Histogram.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IHistogram2D : virtual public IHistogram {
public:
/// Destructor.
virtual ~IHistogram2D() { /* nop */; }
/**
* Fill the IHistogram2D with a couple of values and the
* corresponding weight.
* @param x The x value to be filled in.
* @param y The y value to be filled in.
* @param weight The corresponding weight (by default 1).
* @return false If the weight is <0 or >1 (?).
*
*/
virtual bool fill(double x, double y, double weight = 1.) = 0;
/**
* The weighted mean along the x axis of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the x axis.
*
*/
virtual double binMeanX(int indexX, int indexY) const = 0;
/**
* The weighted mean along the y axis of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the y axis.
*
*/
virtual double binMeanY(int indexX, int indexY) const = 0;
/**
* Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding bin.
*
*/
virtual int binEntries(int indexX, int indexY) const = 0;
/**
* Sum of all the entries of the bins along a given x bin.
* This is equivalent to <tt>projectionX().binEntries(index)</tt>.
* @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding set of bins.
*
*/
virtual int binEntriesX(int index) const = 0;
/**
* Sum of all the entries of the bins along a given y bin.
* This is equivalent to <tt>projectionY().binEntries(index)</tt>.
* @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding set of bins.
*
*/
virtual int binEntriesY(int index) const = 0;
/**
* Total height of a give bin (ie the sum of the weights in this bin).
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The height of the corresponding bin.
*
*/
virtual double binHeight(int indexX, int indexY) const = 0;
/**
* Sum of all the heights of the bins along a given x bin.
* This is equivalent to <tt>projectionX().binHeight(index)</tt>.
* @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The sum of the heights in the corresponding set of bins.
*
*/
virtual double binHeightX(int index) const = 0;
/**
* Sum of all the heights of the bins along a given y bin.
* This is equivalent to <tt>projectionY().binHeight(index)</tt>.
* @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The sum of the heights in the corresponding set of bins.
*
*/
virtual double binHeightY(int index) const = 0;
/**
* The error of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The error on the corresponding bin.
*
*/
virtual double binError(int indexX, int indexY) const = 0;
/**
* The mean of the IHistogram2D along the x axis.
* @return The mean of the IHistogram2D along the x axis.
*
*/
virtual double meanX() const = 0;
/**
* The mean of the IHistogram2D along the y axis.
* @return The mean of the IHistogram2D along the y axis.
*
*/
virtual double meanY() const = 0;
/**
* The RMS of the IHistogram2D along the x axis.
* @return The RMS if the IHistogram2D along the x axis.
*
*/
virtual double rmsX() const = 0;
/**
* The RMS of the IHistogram2D along the y axis.
* @return The RMS if the IHistogram2D along the y axis.
*
*/
virtual double rmsY() const = 0;
/**
* Get the x axis of the IHistogram2D.
* @return The x coordinate IAxis.
*
*/
virtual const IAxis & xAxis() const = 0;
/**
* Get the y axis of the IHistogram2D.
* @return The y coordinate IAxis.
*
*/
virtual const IAxis & yAxis() const = 0;
/**
* Get the bin number corresponding to a given coordinate along the x axis.
* This is a convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the x axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndexX(double coord) const = 0;
/**
* Get the bin number corresponding to a given coordinate along the y axis.
* This is a convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the y axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndexY(double coord) const = 0;
/**
* Add to this IHistogram2D the contents of another IHistogram2D.
* @param hist The IHistogram2D to be added to this IHistogram2D.
* @return false If the IHistogram2Ds binnings are incompatible.
*
*/
virtual bool add(const IHistogram2D & hist) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IHISTOGRAM2D_H */
@@ -0,0 +1,284 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IHISTOGRAM3D_H
#define AIDA_IHISTOGRAM3D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IHistogram.h"
namespace AIDA {
class IAxis;
/**
* User level interface to 3D Histogram.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IHistogram3D : virtual public IHistogram {
public:
/// Destructor.
virtual ~IHistogram3D() { /* nop */; }
/**
* Fill the IHistogram3D with a triplet of values and the
* corresponding weight.
* @param x The x value to be filled in.
* @param y The y value to be filled in.
* @param z The z value to be filled in.
* @param weight The corresponding weight (by default 1).
* @return false If the weight is <0 or >1 (?).
*
*/
virtual bool fill(double x, double y, double z, double weight = 1.) = 0;
/**
* The weighted mean along the x axis of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the x axis.
*
*/
virtual double binMeanX(int indexX, int indexY, int indexZ) const = 0;
/**
* The weighted mean the y axis of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the y axis.
*
*/
virtual double binMeanY(int indexX, int indexY, int indexZ) const = 0;
/**
* The weighted mean the z axis of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the z axis.
*
*/
virtual double binMeanZ(int indexX, int indexY, int indexZ) const = 0;
/**
* Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding bin.
*
*/
virtual int binEntries(int indexX, int indexY, int indexZ) const = 0;
/**
* Sum of all the entries of the bins along a given x bin.
* This is equivalent to <tt>projectionXY().binEntriesX(index)</tt>.
* @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding set of bins.
*
*/
virtual int binEntriesX(int index) const = 0;
/**
* Sum of all the entries of the bins along a given y bin.
* This is equivalent to <tt>projectionXY().binEntriesY(index)</tt>.
* @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding set of bins.
*
*/
virtual int binEntriesY(int index) const = 0;
/**
* Sum of all the entries of the bins along a given z bin.
* This is equivalent to <tt>projectionXZ().binEntriesZ(index)</tt>.
* @param index The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The number of entries in the corresponding set of bins.
*
*/
virtual int binEntriesZ(int index) const = 0;
/**
* Total height of a give bin (ie the sum of the weights in this bin).
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The height of the corresponding bin.
*
*/
virtual double binHeight(int indexX, int indexY, int indexZ) const = 0;
/**
* Sum of all the heights of the bins along a given x bin.
* This is equivalent to <tt>projectionXY().binHeightX(index)</tt>.
* @param index The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The sum of the heights in the corresponding set of bins.
*
*/
virtual double binHeightX(int index) const = 0;
/**
* Sum of all the heights of the bins along a given y bin.
* This is equivalent to <tt>projectionXY().binHeightY(index)</tt>.
* @param index The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The sum of the heights in the corresponding set of bins.
*
*/
virtual double binHeightY(int index) const = 0;
/**
* Sum of all the heights of the bins along a given z bin.
* This is equivalent to <tt>projectionXZ().binHeightZ(index)</tt>.
* @param index The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The sum of the heights in the corresponding set of bins.
*
*/
virtual double binHeightZ(int index) const = 0;
/**
* The error of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexZ The z bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The error on the corresponding bin.
*
*/
virtual double binError(int indexX, int indexY, int indexZ) const = 0;
/**
* The mean of the IHistogram3D along the x axis.
* @return The mean of the IHistogram3D along the x axis.
*
*/
virtual double meanX() const = 0;
/**
* The mean of the IHistogram3D along the y axis.
* @return The mean of the IHistogram3D along the y axis.
*
*/
virtual double meanY() const = 0;
/**
* The mean of the IHistogram3D along the z axis.
* @return The mean of the IHistogram3D along the z axis.
*
*/
virtual double meanZ() const = 0;
/**
* The RMS of the IHistogram3D along the x axis.
* @return The RMS if the IHistogram3D along the x axis.
*
*/
virtual double rmsX() const = 0;
/**
* The RMS of the IHistogram3D along the y axis.
* @return The RMS if the IHistogram3D along the y axis.
*
*/
virtual double rmsY() const = 0;
/**
* The RMS of the IHistogram3D along the z axis.
* @return The RMS if the IHistogram3D along the z axis.
*
*/
virtual double rmsZ() const = 0;
/**
* Get the x axis of the IHistogram3D.
* @return The x coordinate IAxis.
*
*/
virtual const IAxis & xAxis() const = 0;
/**
* Get the y axis of the IHistogram3D.
* @return The y coordinate IAxis.
*
*/
virtual const IAxis & yAxis() const = 0;
/**
* Get the z axis of the IHistogram3D.
* @return The z coordinate IAxis.
*
*/
virtual const IAxis & zAxis() const = 0;
/**
* Get the bin number corresponding to a given coordinate along the x axis.
* This is a convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the x axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndexX(double coord) const = 0;
/**
* Get the bin number corresponding to a given coordinate along the y axis.
* This is a convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the y axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndexY(double coord) const = 0;
/**
* Get the bin number corresponding to a given coordinate along the z axis.
* This is a convenience method, equivalent to <tt>zAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
* @param coord The coordinalte along the z axis.
* @return The corresponding bin number.
*
*/
virtual int coordToIndexZ(double coord) const = 0;
/**
* Add to this IHistogram3D the contents of another IHistogram3D.
* @param hist The IHistogram3D to be added to this IHistogram3D.
* @return false If the IHistogram3Ds binnings are incompatible.
*
*/
virtual bool add(const IHistogram3D & hist) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IHISTOGRAM3D_H */
@@ -0,0 +1,767 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IHISTOGRAMFACTORY_H
#define AIDA_IHISTOGRAMFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IBaseHistogram;
class ICloud1D;
class ICloud2D;
class ICloud3D;
class IHistogram1D;
class IHistogram2D;
class IHistogram3D;
class IProfile1D;
class IProfile2D;
/**
* User level interface for factory classes of Histograms (binned, unbinned, and profile)
* The created objects are assumed to be managed by the tree which is associated to the factory.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IHistogramFactory {
public:
/// Destructor.
virtual ~IHistogramFactory() { /* nop */; }
/**
* Destroy an IBaseHistogram ogject.
* @param hist The IBaseHistogram to be destroyed.
* @return false If the histogram cannot be destroyed.
*
*/
virtual bool destroy(IBaseHistogram * hist) = 0;
/**
* Create a ICloud1D, an unbinned 1-dimensioal histogram.
* @param name The name of the ICloud1D.
* @param title The title of the ICloud1D.
* @param nMax The maximum number of entries after which the ICloud1D
* will convert to an IHistogram1D. The default nMax = -1
* indicates no limit of entries before aoutoconversion to a IHistogram1D.
* @param options The options for the ICloud1D. "autoconvert=true" to enable autoconversion
* to an IHistogram1D.
* @return The newly created ICloud1D.
*
*/
virtual ICloud1D * createCloud1D(const std::string & name, const std::string & title, int nMax = -1, const std::string & options = "") = 0;
/**
* Create a ICloud1D, an unbinned 1-dimensional histogram.
* @param nameAndTitle The name of the ICloud1D; it is also its title.
* @return The newly created ICloud1D.
*
*/
virtual ICloud1D * createCloud1D(const std::string & nameAndTitle) = 0;
/**
* Create a copy of an ICloud1D.
* @param name The name of the new copy.
* @param cloud The ICloud1D to be copied.
* @return The copy of the ICloud1D.
*
*/
virtual ICloud1D * createCopy(const std::string & name, const ICloud1D & cloud) = 0;
/**
* Create a ICloud2D, an unbinned 2-dimensional histogram.
* @param name The name of the ICloud2D.
* @param title The title of the ICloud2D.
* @param nMax The maximum number of entries after which the ICloud2D
* will convert to an IHistogram2D. The default nMax = -1
* indicates no limit of entries before aoutoconversion to a IHistogram2D.
* @param options The options for the ICloud2D. "autoconvert=true" to enable autoconversion
* to an IHistogram2D.
* @return The newly created ICloud2D.
*
*/
virtual ICloud2D * createCloud2D(const std::string & name, const std::string & title, int nMax = -1, const std::string & options = "") = 0;
/**
* Create a ICloud2D, an unbinned 2-dimensional histogram.
* @param nameAndTitle The name of the ICloud2D; it is also its title.
* @return The newly created ICloud2D.
*
*/
virtual ICloud2D * createCloud2D(const std::string & nameAndTitle) = 0;
/**
* Create a copy of an ICloud2D.
* @param name The name of the new copy.
* @param cloud The ICloud2D to be copied.
* @return The copy of the ICloud2D.
*
*/
virtual ICloud2D * createCopy(const std::string & name, const ICloud2D & cloud) = 0;
/**
* Create a ICloud3D, an unbinned 3-dimensional histogram.
* @param name The name of the ICloud3D.
* @param title The title of the ICloud3D.
* @param nMax The maximum number of entries after which the ICloud3D
* will convert to an IHistogram3D. The default nMax = -1
* indicates no limit of entries before aoutoconversion to a IHistogram3D.
* @param options The options for the ICloud3D. "autoconvert=true" to enable autoconversion
* to an IHistogram3D.
* @return The newly created ICloud3D.
*
*/
virtual ICloud3D * createCloud3D(const std::string & name, const std::string & title, int nMax = -1, const std::string & options = "") = 0;
/**
* Create a ICloud3D, an unbinned 3-dimensional histogram.
* @param nameAndTitle The name of the ICloud3D; it is also its title.
* @return The newly created ICloud3D.
*
*/
virtual ICloud3D * createCloud3D(const std::string & nameAndTitle) = 0;
/**
* Create a copy of an ICloud3D.
* @param name The name of the new copy.
* @param cloud The ICloud3D to be copied.
* @return The copy of the ICloud3D.
*
*/
virtual ICloud3D * createCopy(const std::string & name, const ICloud3D & cloud) = 0;
/**
* Create a IHistogram1D.
* @param name The name of the IHistogram1D.
* @param title The title of the IHistogram1D.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @param options The options for the IHistogram1D. The default is "".
* "type=efficiency" for an efficiency IHistogram1D.
* @return The newly created IHistogram1D.
*
*/
virtual IHistogram1D * createHistogram1D(const std::string & name, const std::string & title, int nBins, double lowerEdge, double upperEdge, const std::string & options = "") = 0;
/**
* Create a IHistogram1D.
* @param nameAndTitle The name of the IHistogram1D; it is also the title.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @return The newly created IHistogram1D.
*
*/
virtual IHistogram1D * createHistogram1D(const std::string & nameAndTitle, int nBins, double lowerEdge, double upperEdge) = 0;
/**
* Create a IHistogram1D.
* @param name The name of the IHistogram1D.
* @param title The title of the IHistogram1D.
* @param binEdges The array of the bin edges for the x axis.
* @param options The options for the IHistogram1D. The default is "".
* "type=efficiency" for an efficiency IHistogram1D.
* @return The newly created IHistogram1D.
*
*/
virtual IHistogram1D * createHistogram1D(const std::string & name, const std::string & title, const std::vector<double> & binEdges, const std::string & options = "") = 0;
/**
* Create a copy of an IHistogram1D.
* @param name The name of the new copy.
* @param hist The IHistogram1D to be copied.
* @return The copy of the IHistogram1D.
*
*/
virtual IHistogram1D * createCopy(const std::string & name, const IHistogram1D & hist) = 0;
/**
* Create a IHistogram2D.
* @param name The name of the IHistogram2D.
* @param title The title of the IHistogram2D.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param options The options for the IHistogram2D. The default is "".
* "type=efficiency" for an efficiency IHistogram2D.
* @return The newly created IHistogram2D.
*
*/
virtual IHistogram2D * createHistogram2D(const std::string & name, const std::string & title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, const std::string & options = "") = 0;
/**
* Create a IHistogram2D.
* @param nameAndTitle The name of the IHistogram2D; it is also the title.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @return The newly created IHistogram2D.
*
*/
virtual IHistogram2D * createHistogram2D(const std::string & nameAndTitle, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) = 0;
/**
* Create a IHistogram2D.
* @param name The name of the IHistogram2D.
* @param title The title of the IHistogram2D.
* @param binEdgesX The array of the bin edges for the x axis.
* @param binEdgesY The array of the bin edges for the y axis.
* @param options The options for the IHistogram2D. The default is "".
* "type=efficiency" for an efficiency IHistogram2D.
* @return The newly created IHistogram2D.
*
*/
virtual IHistogram2D * createHistogram2D(const std::string & name, const std::string & title, const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY, const std::string & options = "") = 0;
/**
* Create a copy of an IHistogram2D.
* @param name The name of the new copy.
* @param hist The IHistogram2D to be copied.
* @return The copy of the IHistogram2D.
*
*/
virtual IHistogram2D * createCopy(const std::string & name, const IHistogram2D & hist) = 0;
/**
* Create a IHistogram3D.
* @param name The name of the IHistogram3D.
* @param title The title of the IHistogram3D.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param nBinsZ The number of bins of the z axis.
* @param lowerEdgeZ The lower edge of the z axis.
* @param upperEdgeZ The upper edge of the z axis.
* @param options The options for the IHistogram3D. The default is "".
* "type=efficiency" for an efficiency IHistogram3D.
* @return The newly created IHistogram3D.
*
*/
virtual IHistogram3D * createHistogram3D(const std::string & name, const std::string & title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ, const std::string & options = "") = 0;
/**
* Create a IHistogram3D.
* @param nameAndTitle The name of the IHistogram3D; it is also the title.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param nBinsZ The number of bins of the z axis.
* @param lowerEdgeZ The lower edge of the z axis.
* @param upperEdgeZ The upper edge of the z axis.
* @return The newly created IHistogram3D.
*
*/
virtual IHistogram3D * createHistogram3D(const std::string & nameAndTitle, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, int nBinsZ, double lowerEdgeZ, double upperEdgeZ) = 0;
/**
* Create a IHistogram3D.
* @param name The name of the IHistogram3D.
* @param title The title of the IHistogram3D.
* @param binEdgesX The array of the bin edges for the x axis.
* @param binEdgesY The array of the bin edges for the y axis.
* @param binEdgesZ The array of the bin edges for the z axis.
* @param options The options for the IHistogram3D. The default is "".
* "type=efficiency" for an efficiency IHistogram3D.
* @return The newly created IHistogram3D.
*
*/
virtual IHistogram3D * createHistogram3D(const std::string & name, const std::string & title, const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY, const std::vector<double> & binEdgesZ, const std::string & options = "") = 0;
/**
* Create a copy of an IHistogram3D.
* @param name The name of the new copy.
* @param hist The IHistogram3D to be copied.
* @return The copy of the IHistogram3D.
*
*/
virtual IHistogram3D * createCopy(const std::string & name, const IHistogram3D & hist) = 0;
/**
* Create a IProfile1D.
* @param name The name of the IProfile1D.
* @param title The title of the IProfile1D.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @param options The options for the IProfile1D. The default is "".
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & name, const std::string & title, int nBins, double lowerEdge, double upperEdge, const std::string & options = "") = 0;
/**
* Create a IProfile1D.
* @param name The name of the IProfile1D.
* @param title The title of the IProfile1D.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @param lowerValue The lower value displayed along the y axis.
* @param upperValue The upper value displayed along the y axis.
* @param options The options for the IProfile1D. The default is "".
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & name, const std::string & title, int nBins, double lowerEdge, double upperEdge, double lowerValue, double upperValue, const std::string & options = "") = 0;
/**
* Create a IProfile1D.
* @param name The name of the IProfile1D.
* @param title The title of the IProfile1D.
* @param binEdges The array of the bin edges for the x axis.
* @param options The options for the IProfile1D. The default is "".
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & name, const std::string & title, const std::vector<double> & binEdges, const std::string & options = "") = 0;
/**
* Create a IProfile1D.
* @param name The name of the IProfile1D.
* @param title The title of the IProfile1D.
* @param binEdges The array of the bin edges for the x axis.
* @param lowerValue The lower value displayed along the y axis.
* @param upperValue The upper value displayed along the y axis.
* @param options The options for the IProfile1D. The default is "".
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & name, const std::string & title, const std::vector<double> & binEdges, double lowerValue, double upperValue, const std::string & options = "") = 0;
/**
* Create a IProfile1D.
* @param nameAndTitle The name of the IProfile1D; it is also the title.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & nameAndTitle, int nBins, double lowerEdge, double upperEdge) = 0;
/**
* Create a IProfile1D.
* @param nameAndTitle The name of the IProfile1D; it is also the title.
* @param nBins The number of bins of the x axis.
* @param lowerEdge The lower edge of the x axis.
* @param upperEdge The upper edge of the x axis.
* @param lowerValue The lower value displayed along the y axis.
* @param upperValue The upper value displayed along the y axis.
* @return The newly created IProfile1D.
*
*/
virtual IProfile1D * createProfile1D(const std::string & nameAndTitle, int nBins, double lowerEdge, double upperEdge, double lowerValue, double upperValue) = 0;
/**
* Create a copy of an IProfile1D.
* @param name The name of the new copy.
* @param profile The IProfile1D to be copied.
* @return The copy of the IProfile1D.
*
*/
virtual IProfile1D * createCopy(const std::string & name, const IProfile1D & profile) = 0;
/**
* Create a IProfile2D.
* @param name The name of the IProfile2D.
* @param title The title of the IProfile2D.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param options The options for the IProfile2D. The default is "".
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & name, const std::string & title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, const std::string & options = "") = 0;
/**
* Create a IProfile2D.
* @param name The name of the IProfile2D.
* @param title The title of the IProfile2D.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param lowerValue The lower value displayed along the z axis.
* @param upperValue The upper value displayed along the z axis.
* @param options The options for the IProfile2D. The default is "".
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & name, const std::string & title, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, double lowerValue, double upperValue, const std::string & options = "") = 0;
/**
* Create a IProfile2D.
* @param name The name of the IProfile2D.
* @param title The title of the IProfile2D.
* @param binEdgesX The array of the bin edges for the x axis.
* @param binEdgesY The array of the bin edges for the y axis.
* @param options The options for the IProfile2D. The default is "".
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & name, const std::string & title, const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY, const std::string & options = "") = 0;
/**
* Create a IProfile2D.
* @param name The name of the IProfile2D.
* @param title The title of the IProfile2D.
* @param binEdgesX The array of the bin edges for the x axis.
* @param binEdgesY The array of the bin edges for the y axis.
* @param lowerValue The lower value displayed along the y axis.
* @param upperValue The upper value displayed along the y axis.
* @param options The options for the IProfile2D. The default is "".
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & name, const std::string & title, const std::vector<double> & binEdgesX, const std::vector<double> & binEdgesY, double lowerValue, double upperValue, const std::string & options = "") = 0;
/**
* Create a IProfile2D.
* @param nameAndTitle The name of the IProfile2D; it is also the title.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & nameAndTitle, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY) = 0;
/**
* Create a IProfile2D.
* @param nameAndTitle The name of the IProfile2D; it is also the title.
* @param nBinsX The number of bins of the x axis.
* @param lowerEdgeX The lower edge of the x axis.
* @param upperEdgeX The upper edge of the x axis.
* @param nBinsY The number of bins of the y axis.
* @param lowerEdgeY The lower edge of the y axis.
* @param upperEdgeY The upper edge of the y axis.
* @param lowerValue The lower value displayed along the z axis.
* @param upperValue The upper value displayed along the z axis.
* @return The newly created IProfile2D.
*
*/
virtual IProfile2D * createProfile2D(const std::string & nameAndTitle, int nBinsX, double lowerEdgeX, double upperEdgeX, int nBinsY, double lowerEdgeY, double upperEdgeY, double lowerValue, double upperValue) = 0;
/**
* Create a copy of an IProfile2D.
* @param name The name of the new copy.
* @param profile The IProfile2D to be copied.
* @return The copy of the IProfile2D.
*
*/
virtual IProfile2D * createCopy(const std::string & name, const IProfile2D & profile) = 0;
/**
* Create an IHistogram1D by adding two IHistogram1D.
* @param name The name of the resulting IHistogram1D.
* @param hist1 The first member of the addition.
* @param hist2 The second member of the addition.
* @return The sum of the two IHistogram1D.
*
*/
virtual IHistogram1D * add(const std::string & name, const IHistogram1D & hist1, const IHistogram1D & hist2) = 0;
/**
* Create an IHistogram1D by subtracting two IHistogram1D.
* @param name The name of the resulting IHistogram1D.
* @param hist1 The first member of the subtraction.
* @param hist2 The second member of the subtraction.
* @return The difference of the two IHistogram1D.
*
*/
virtual IHistogram1D * subtract(const std::string & name, const IHistogram1D & hist1, const IHistogram1D & hist2) = 0;
/**
* Create an IHistogram1D by multiplying two IHistogram1D.
* @param name The name of the resulting IHistogram1D.
* @param hist1 The first member of the multiplication.
* @param hist2 The second member of the multiplication.
* @return The product of the two IHistogram1D.
*
*/
virtual IHistogram1D * multiply(const std::string & name, const IHistogram1D & hist1, const IHistogram1D & hist2) = 0;
/**
* Create an IHistogram1D by dividing two IHistogram1D.
* @param name The name of the resulting IHistogram1D.
* @param hist1 The first member of the division.
* @param hist2 The second member of the division.
* @return The ration of the two IHistogram1D.
*
*/
virtual IHistogram1D * divide(const std::string & name, const IHistogram1D & hist1, const IHistogram1D & hist2) = 0;
/**
* Create an IHistogram2D by adding two IHistogram2D.
* @param name The name of the resulting IHistogram2D.
* @param hist1 The first member of the addition.
* @param hist2 The second member of the addition.
* @return The sum of the two IHistogram2D.
*
*/
virtual IHistogram2D * add(const std::string & name, const IHistogram2D & hist1, const IHistogram2D & hist2) = 0;
/**
* Create an IHistogram2D by subtracting two IHistogram2D.
* @param name The name of the resulting IHistogram2D.
* @param hist1 The first member of the subtraction.
* @param hist2 The second member of the subtraction.
* @return The difference of the two IHistogram2D.
*
*/
virtual IHistogram2D * subtract(const std::string & name, const IHistogram2D & hist1, const IHistogram2D & hist2) = 0;
/**
* Create an IHistogram2D by multiplying two IHistogram2D.
* @param name The name of the resulting IHistogram2D.
* @param hist1 The first member of the multiplication.
* @param hist2 The second member of the multiplication.
* @return The product of the two IHistogram2D.
*
*/
virtual IHistogram2D * multiply(const std::string & name, const IHistogram2D & hist1, const IHistogram2D & hist2) = 0;
/**
* Create an IHistogram2D by dividing two IHistogram2D.
* @param name The name of the resulting IHistogram2D.
* @param hist1 The first member of the division.
* @param hist2 The second member of the division.
* @return The ration of the two IHistogram2D.
*
*/
virtual IHistogram2D * divide(const std::string & name, const IHistogram2D & hist1, const IHistogram2D & hist2) = 0;
/**
* Create an IHistogram3D by adding two IHistogram3D.
* @param name The name of the resulting IHistogram3D.
* @param hist1 The first member of the addition.
* @param hist2 The second member of the addition.
* @return The sum of the two IHistogram3D.
*
*/
virtual IHistogram3D * add(const std::string & name, const IHistogram3D & hist1, const IHistogram3D & hist2) = 0;
/**
* Create an IHistogram3D by subtracting two IHistogram3D.
* @param name The name of the resulting IHistogram3D.
* @param hist1 The first member of the subtraction.
* @param hist2 The second member of the subtraction.
* @return The difference of the two IHistogram3D.
*
*/
virtual IHistogram3D * subtract(const std::string & name, const IHistogram3D & hist1, const IHistogram3D & hist2) = 0;
/**
* Create an IHistogram3D by multiplying two IHistogram3D.
* @param name The name of the resulting IHistogram3D.
* @param hist1 The first member of the multiplication.
* @param hist2 The second member of the multiplication.
* @return The product of the two IHistogram3D.
*
*/
virtual IHistogram3D * multiply(const std::string & name, const IHistogram3D & hist1, const IHistogram3D & hist2) = 0;
/**
* Create an IHistogram3D by dividing two IHistogram3D.
* @param name The name of the resulting IHistogram3D.
* @param hist1 The first member of the division.
* @param hist2 The second member of the division.
* @return The ration of the two IHistogram3D.
*
*/
virtual IHistogram3D * divide(const std::string & name, const IHistogram3D & hist1, const IHistogram3D & hist2) = 0;
/**
* Create an IHistogram1D by projecting an IHistogram2D along its x axis.
* This is equivalent to <tt>sliceX(UNDERFLOW_BIN,OVERFLOW_BIN)</tt>.
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be projected.
* @return The resulting projection.
*
*/
virtual IHistogram1D * projectionX(const std::string & name, const IHistogram2D & hist) = 0;
/**
* Create an IHistogram1D by projecting an IHistogram2D along its y axis.
* This is equivalent to <tt>sliceY(UNDERFLOW_BIN,OVERFLOW_BIN)</tt>.
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be projected.
* @return The resulting projection.
*
*/
virtual IHistogram1D * projectionY(const std::string & name, const IHistogram2D & hist) = 0;
/**
* Create an IHistogram1D by slicing an IHistogram2D parallel to the y axis at a given bin.
* This is equivalent to <tt>sliceX(indexY,indexY)</tt>.
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be sliced.
* @param index The index of the bin along the y axis where the IHistogram2D has to be sliced.
* @return The resulting slice.
*
*/
virtual IHistogram1D * sliceX(const std::string & name, const IHistogram2D & hist, int index) = 0;
/**
* Create an IHistogram1D by slicing an IHistogram2D parallel to the x axis at a given bin.
* This is equivalent to <tt>sliceY(indexX,indexX)</tt>.
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be sliced.
* @param index The index of the bin along the x axis where the IHistogram2D has to be sliced.
* @return The resulting slice.
*
*/
virtual IHistogram1D * sliceY(const std::string & name, const IHistogram2D & hist, int index) = 0;
/**
* Create an IHistogram1D by slicing an IHistogram2D parallel to the y axis between two bins (inclusive).
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be sliced.
* @param index1 The index of the bin along the y axis that marks the lower edge of the slice.
* @param index2 The index of the bin along the y axis that marks the upper edge of the slice.
* @return The resulting slice.
*
*/
virtual IHistogram1D * sliceX(const std::string & name, const IHistogram2D & hist, int index1, int index2) = 0;
/**
* Create an IHistogram1D by slicing an IHistogram2D parallel to the x axis between two bins (inclusive).
* @param name The name of the resulting IHistogram1D.
* @param hist The IHistogram2D to be sliced.
* @param index1 The index of the bin along the x axis that marks the lower edge of the slice.
* @param index2 The index of the bin along the x axis that marks the upper edge of the slice.
* @return The resulting slice.
*
*/
virtual IHistogram1D * sliceY(const std::string & name, const IHistogram2D & hist, int index1, int index2) = 0;
/**
* Create an IHistogram2D by projecting an IHistogram3D on the x-y plane.
* This is equivalent to <tt>sliceXY(UNDERFLOW_BIN,OVERFLOW_BIN)</tt>.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to be projected.
* @return The resulting projection.
*
*/
virtual IHistogram2D * projectionXY(const std::string & name, const IHistogram3D & hist) = 0;
/**
* Create an IHistogram2D by projecting an IHistogram3D on the x-z plane.
* This is equivalent to <tt>sliceXZ(UNDERFLOW_BIN,OVERFLOW_BIN)</tt>.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to be projected.
* @return The resulting projection.
*
*/
virtual IHistogram2D * projectionXZ(const std::string & name, const IHistogram3D & hist) = 0;
/**
* Create an IHistogram2D by projecting an IHistogram3D on the y-z plane.
* This is equivalent to <tt>sliceYZ(UNDERFLOW_BIN,OVERFLOW_BIN)</tt>.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to be projected.
* @return The resulting projection.
*
*/
virtual IHistogram2D * projectionYZ(const std::string & name, const IHistogram3D & hist) = 0;
/**
* Create an IHistogram2D by slicing an IHistogram3D perpendicular to the Z axis,
* between "index1" and "index2" (inclusive).
* The X axis of the IHistogram2D corresponds to the X axis of this IHistogram3D.
* The Y axis of the IHistogram2D corresponds to the Y axis of this IHistogram3D.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to sliced.
* @param index1 The index of the bin along the z axis that marks the lower edge of the slice.
* @param index2 The index of the bin along the z axis that marks the upper edge of the slice.
* @return The resulting slice.
*
*/
virtual IHistogram2D * sliceXY(const std::string & name, const IHistogram3D & hist, int index1, int index2) = 0;
/**
* Create an IHistogram2D by slicing an IHistogram3D perpendicular to the Y axis,
* between "index1" and "index2" (inclusive).
* The X axis of the IHistogram2D corresponds to the X axis of this IHistogram3D.
* The Z axis of the IHistogram2D corresponds to the Z axis of this IHistogram3D.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to sliced.
* @param index1 The index of the bin along the y axis that marks the lower edge of the slice.
* @param index2 The index of the bin along the y axis that marks the upper edge of the slice.
* @return The resulting slice.
*
*/
virtual IHistogram2D * sliceXZ(const std::string & name, const IHistogram3D & hist, int index1, int index2) = 0;
/**
* Create an IHistogram2D by slicing an IHistogram3D perpendicular to the X axis,
* between "index1" and "index2" (inclusive).
* The Y axis of the IHistogram2D corresponds to the Y axis of this IHistogram3D.
* The Z axis of the IHistogram2D corresponds to the Z axis of this IHistogram3D.
* @param name The name of the resulting IHistogram2D.
* @param hist The IHistogram3D to sliced.
* @param index1 The index of the bin along the x axis that marks the lower edge of the slice.
* @param index2 The index of the bin along the x axis that marks the upper edge of the slice.
* @return The resulting slice.
*
*/
virtual IHistogram2D * sliceYZ(const std::string & name, const IHistogram3D & hist, int index1, int index2) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IHISTOGRAMFACTORY_H */
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IINFO_H
#define AIDA_IINFO_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IFillStyle;
class ILineStyle;
class IMarkerStyle;
/**
* The info class permits to access the info area of a region.
* Through it legends, statistics, text could be displayed.
* A legend is an association of a graphical marker and a text.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IInfo {
public:
/// Destructor.
virtual ~IInfo() { /* nop */; }
/**
* Clear the info area.
*/
virtual void clear() = 0;
/**
* Add a text. The text is appended to existing info elements.
*/
virtual void addText(const std::string & text) = 0;
/**
* Add a marker, line or fill area legend.
* The legend is appended to existing elements.
*/
virtual void addLegend(const IMarkerStyle & style, const std::string & description) = 0;
virtual void addLegend(const ILineStyle & style, const std::string & description) = 0;
virtual void addLegend(const IFillStyle & style, const std::string & description) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IINFO_H */
@@ -0,0 +1,61 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IINFOSTYLE_H
#define AIDA_IINFOSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseStyle.h"
namespace AIDA {
class ITextStyle;
/**
* Style for the part of the scene representing the info area.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IInfoStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~IInfoStyle() { /* nop */; }
virtual ITextStyle & textStyle() = 0;
virtual bool setTextStyle(const ITextStyle & textStyle) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IINFOSTYLE_H */
@@ -0,0 +1,85 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ILINESTYLE_H
#define AIDA_ILINESTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
#include "AIDA/IBrushStyle.h"
namespace AIDA {
/**
* Style for all lines (axis lines, legend box outlines, etc.)
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class ILineStyle : virtual public IBrushStyle {
public:
/// Destructor.
virtual ~ILineStyle() { /* nop */; }
/**
* Get list of line types supported by this implementation.
*/
virtual std::vector<std::string> availableLineTypes() const = 0;
/**
* Get line type currently in use.
*/
virtual std::string lineType() const = 0;
/**
* Get current line thickness.
*/
virtual int thickness() const = 0;
/**
* Set current line type e.g. "dotted".
* @return false if line type not known to this implementation.
*/
virtual bool setLineType(const std::string & newLineType) = 0;
/**
* Set thickness (exact meaning is implementation-dependent,
* but <0 means invisible).
* @return false if value not supported by this implementation.
*/
virtual bool setThickness(int newThickness) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ILINESTYLE_H */
@@ -0,0 +1,64 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IMANAGEDOBJECT_H
#define AIDA_IMANAGEDOBJECT_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
/**
* An object which can be stored in a tree.
* @see ITree
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IManagedObject {
public:
/// Destructor.
virtual ~IManagedObject() { /* nop */; }
/**
* Get the name of an IManagedObject.
* Names can only be changed using the ITree.mv().
* @return The name of the IManagedObject.
*
*/
virtual const std::string & name() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IMANAGEDOBJECT_H */
@@ -0,0 +1,73 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IMARKERSTYLE_H
#define AIDA_IMARKERSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
#include "AIDA/IBrushStyle.h"
namespace AIDA {
/**
* Style for all markers (histo representation, legend box etc.)
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IMarkerStyle : virtual public IBrushStyle {
public:
/// Destructor.
virtual ~IMarkerStyle() { /* nop */; }
/**
* Get list of shapes available in this implementation.
*/
virtual std::vector<std::string> availableShapes() const = 0;
/**
* Get current marker shape.
*/
virtual std::string shape() const = 0;
/**
* Set current marker shape, e.g. "openCircle".
* @return false if shape not available in this implementation.
*/
virtual bool setShape(const std::string & shape) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IMARKERSTYLE_H */
@@ -0,0 +1,100 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IMEASUREMENT_H
#define AIDA_IMEASUREMENT_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
namespace AIDA {
/**
* Basic user-level interface class for holding a single "measurement"
* with positive and negative errors (to allow for asymmetric errors).
* "IMeasurement" = "value" + "errorPlus" - "errorMinus"
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IMeasurement {
public:
/// Destructor.
virtual ~IMeasurement() { /* nop */; }
/**
* Get the value of the IMeasurement.
* @return The value of the IMeasurement.
*
*/
virtual double value() const = 0;
/**
* Get the plus error of the IMeasurement.
* @return The plus error.
*
*/
virtual double errorPlus() const = 0;
/**
* Get the minus error of the IMeasurement.
* @return The minus error.
*
*/
virtual double errorMinus() const = 0;
/**
* Set the value of the IMeasurement.
* @param value The new value of the IMeasurement.
* @return false If the value cannot be set.
*
*/
virtual bool setValue(double value) = 0;
/**
* Set the plus error of the IMeasurement.
* @param value The new plus error of the IMeasurement.
* @return false If the error cannot be set or it is negative.
*
*/
virtual bool setErrorPlus(double errorPlus) = 0;
/**
* Set the minus error of the IMeasurement.
* @param value The new minus error of the IMeasurement.
* @return false If the error cannot be set or it is negative.
*
*/
virtual bool setErrorMinus(double errorMinus) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IMEASUREMENT_H */
@@ -0,0 +1,119 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IMODELFUNCTION_H
#define AIDA_IMODELFUNCTION_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <vector>
#include "AIDA/IFunction.h"
namespace AIDA {
class IRangeSet;
/** @interface IModelFunction
*
* Interface of model function for fitting (for advanced users).
*
* OPEN QUESTIONS:
*
* How to treat normalization at user level? Two possibilities:
* - we have "Gauss" and "NormalizedGauss", the first one user cannot
* use for ML fit
* - we have only one "Gauss" function, but it's smart and when normalized,
* gets rid of one of its parameters
*
* Normalization range might be set directly on the function by the user?
* Now we set it in the data pipe, Victor thinks that it is not very clear
* and should be on the function ;)
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IModelFunction : virtual public IFunction {
public:
/// Destructor.
virtual ~IModelFunction() { /* nop */; }
/// Return false if function does not provide the normalization capability.
virtual bool providesNormalization() const = 0;
/**
* Normalize by internally adjusting some of the parameters.
* When normalization is on then integral of the function in
* the normalization range equals to 1.
*/
virtual void normalize(bool on) = 0;
/**
* Return true if normalization is currently switched on.
*/
virtual bool isNormalized() const = 0;
/**
* Compute gradient with respect to parameters.
*/
virtual const std::vector<double> & parameterGradient(const std::vector<double> & x) const = 0;
/**
* Return true if provides parameter gradient.
*/
virtual bool providesParameterGradient() const = 0;
/**
* Set the normalization range from -inf to +inf in the i-th
* axis (dimension).
*
* Full range is the default if not set otherwise.
* It is still possible to evaluate function outside of the
* normalization range.
*
* PENDING: no methods to retrieve current range!
*/
virtual IRangeSet & normalizationRange(int iAxis) = 0;
/**
* Set full range in all axes.
*/
virtual void includeNormalizationAll() = 0;
/**
* Set empty range in all axes.
*/
virtual void excludeNormalizationAll() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IMODELFUNCTION_H */
@@ -0,0 +1,211 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPLOTTER_H
#define AIDA_IPLOTTER_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IPlotterRegion;
class ITitleStyle;
/**
* User level interface to plotter.
*
* This IPlotter interface assumes the handling of
* multiple plotting regions. Then the IPlotter should
* be seen as a "page" managing multiple drawing region.
* It assumes that a "current" region mechanism is used.
*
* The keyword "region" is borrowed from the OpenInventor
* terminology (viewing region).
*
* See also the IPlotterRegion for more comments.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IPlotter {
public:
/// Destructor.
virtual ~IPlotter() { /* nop */; }
/**
* Region management methods.
*/
/**
* Create a new region.
* @param x, y, w, h Position and size in normal coordinates
* that is to say between 0 and 1.
* Then a region with (x=0,y=0,w=1,h=1) maps
* the full page. "x" goes left to right. "y" bottom
* to top.
* @return The newly created region. Return null in case not failure.
* Note that the plotter manages the regions ; user does not
* have to delete a region object directly.
*/
virtual IPlotterRegion * createRegion(double x = 0, double y = 0, double w = 1.0, double h = 1.0) = 0;
/**
* Create a grid of regions.
* By default the current region is the top left one (with index 0).
* Region are indexed from zero, with increasing order
* left to right, top to bottom.
* @param index Set the current region.
*/
virtual bool createRegions(int columns = 1, int rows = 1, int index = 0) = 0;
/**
* @return The current region.
*/
virtual IPlotterRegion & currentRegion() const = 0;
/**
* @return The current region index.
*/
virtual int currentRegionNumber() const = 0;
/**
* @return The number of regions.
*/
virtual int numberOfRegions() const = 0;
/**
* Set current region by giving its index [0,n-1]
*/
virtual bool setCurrentRegionNumber(int index) = 0;
/**
* Set current region to be the "next" one.
* If exceeding the number of regions,
* the current region index return to 0.
* @return The new current region.
*/
virtual IPlotterRegion & next() = 0;
/**
* @return A region, knowing its index.
*/
virtual IPlotterRegion * region(int index) const = 0;
/**
* Destroy regions.
*/
virtual void destroyRegions() = 0;
/**
* Clear all regions. It does not reset the number
* and position of regions. This can be done through
* a destroyRegions.
*/
virtual void clearRegions() = 0;
/*
* Set various plotting paramters for the whole page.
* Activate the graphic layer and update the screen window(s)
* if needed.
*/
virtual bool setParameter(const std::string & parameter, const std::string & options = "") = 0;
/**
* Get value of a parameter.
* @param paramName Name of the parameter.
* @return the value.
*/
virtual std::string parameterValue(const std::string & parameter) const = 0;
virtual std::vector<std::string> availableParameterOptions(const std::string & parameter) const = 0;
virtual std::vector<std::string> availableParameters() const = 0;
/*
* GUI related methods :
*/
/**
* Map the plotter on the screen.
*/
virtual bool show() = 0;
/**
* Refresh the screen window(s).
* Used when a plotted data analysis object
* received new data.
*/
virtual bool refresh() = 0;
/**
* Unmap the plotter on the screen.
*/
virtual bool hide() = 0;
/**
* Give control to the plotter GUI. The plotter must be able
* to return from this function from a user action in its GUI.
*/
virtual bool interact() = 0;
/*
* Other methods.
*/
/**
* Produce an output file.
* @param type A string to describe the type of the output :
* "PS" or "PostScript" for PostScript, "JPEG" for JPEG.
* If nothing is given, the type is guessed
* from the given file name suffix (.ps for PostScript,
* .jpg for JPEG, etc...).
*/
virtual bool writeToFile(const std::string & filename, const std::string & type = "") = 0;
/**
* Set the global title of the plotter (page).
*/
virtual void setTitle(const std::string & title) = 0;
/**
* Get/set title style.
*/
virtual ITitleStyle & titleStyle() = 0;
virtual void setTitleStyle(const ITitleStyle & style) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPLOTTER_H */
@@ -0,0 +1,103 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPLOTTERFACTORY_H
#define AIDA_IPLOTTERFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class IAxisStyle;
class IDataStyle;
class IFillStyle;
class ILineStyle;
class IMarkerStyle;
class IPlotter;
class IPlotterStyle;
class ITextStyle;
class ITitleStyle;
/**
* Factory for plotter and styles.
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class IPlotterFactory {
public:
/// Destructor.
virtual ~IPlotterFactory() { /* nop */; }
/**
* @param name A string identifier.
A plotter is in general managed by a GUI.
The "name" of the plotter could be used as
the string identifier for the GUI plotter widget.
If "" is passed, some default plotter is used.
*/
virtual IPlotter * create(const std::string & name = "") = 0;
/**
* Create various basic styles.
* The returned styles are not managed by the plotter.
* A user have to delete these objects.
*/
virtual IMarkerStyle * createMarkerStyle() = 0;
virtual ITextStyle * createTextStyle() = 0;
virtual ILineStyle * createLineStyle() = 0;
virtual IFillStyle * createFillStyle() = 0;
/**
* Create various "scene part" styles.
* The returned styles are not managed by the plotter.
*/
virtual IDataStyle * createDataStyle() = 0;
virtual IAxisStyle * createAxisStyle() = 0;
virtual ITitleStyle * createTitleStyle() = 0;
/**
* Create a global plotter style.
* The returned style is not managed by the plotter.
*/
virtual IPlotterStyle * createPlotterStyle() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPLOTTERFACTORY_H */
@@ -0,0 +1,81 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPLOTTERLAYOUT_H
#define AIDA_IPLOTTERLAYOUT_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
/**
* Interface to permit customization of the layout
* of scene objects.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IPlotterLayout {
public:
/// Destructor.
virtual ~IPlotterLayout() { /* nop */; }
/**
* Return to original (construction time) state. Explicitly
* set parameters will be set to defaults and may be overridden
*/
virtual void reset() = 0;
/**
* Set a parameter.
* @param paramName Name of the parameter.
* @param options String of options.
* @return false if parameter (or its options) unknown or invalid.
*/
virtual bool setParameter(const std::string & paramName, double paramValue) = 0;
/**
* Get parameter value.
*/
virtual double parameterValue(const std::string & paramName) = 0;
/**
* Get list of the available parameters (implementation-dependent)
*/
virtual std::vector<std::string> availableParameters() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPLOTTERLAYOUT_H */
@@ -0,0 +1,187 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPLOTTERREGION_H
#define AIDA_IPLOTTERREGION_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IBaseHistogram;
class IDataPointSet;
class IFunction;
class IInfo;
class IPlotterLayout;
class IPlotterStyle;
/**
* User level interface to a plotter region.
* A region is managed by a plotter.
* A region must be seen as a scene manager handling
* a custome "plotting" scene. In general this kind of scene
* may be in 2D or 3D. In 2D, the scene have "coarse graining parts"
* like two axis, data representations within the axis. It may have
* various other parts like a grid, a title, an info area. In 3D,
* the scene have in general three axis,
* a different global layout, some data representations within the
* axis area and also scene parts like title, grid, etc...
*
* To customize all these, some "style" interfaces had been introduced.
* In general there is one style interface per "scene part" ; then
* IAxisStyle, IDataStyle, ITitleStyle, IInfoStyle. Oftenly
* a "scene part" contains text, line, fill area, etc.... For example
* an "axis" have a line, ticks, text for tick labels, text for
* the label of the axis, the magnitude, etc... A "coarse graining scene part"
* style contains various accessor to "atomic" styles like IMarkerStyle,
* ILineStyle, IFillStyle that permits to build a "customization block"
* to modify a scene part.
*
* A global style "block", the IPlotterStyle, could be retreived
* from a plotting region. This global style block have accessors
* to the various "coarse graining scene parts" of the plotting scene.
* Through it, we hope to offer a lot of customization in a convenient
* way...
*
* The keywords "scene" and "part" had been borrowed from the
* OpenInventor terminology.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IPlotterRegion {
public:
/// Destructor.
virtual ~IPlotterRegion() { /* nop */; }
/**
* Add a data analysis object (histogram, function, cloud,...)
* in the list of things to plot in the region.
* Activate the underlying graphic toolkit in order to bring
* something in the screen window(s) attached to the plotter.
* It assumes that the plotter had been mapped on the
* screen with its show method.
*/
virtual bool plot(const IBaseHistogram & histogram, const std::string & options = "") = 0;
virtual bool plot(const IBaseHistogram & histogram, const IPlotterStyle & style, const std::string & options = "") = 0;
virtual bool plot(const IFunction & function, const std::string & options = "") = 0;
virtual bool plot(const IFunction & function, const IPlotterStyle & style, const std::string & options = "") = 0;
virtual bool plot(const IDataPointSet & dataPointSet, const std::string & options = "") = 0;
virtual bool plot(const IDataPointSet & dataPointSet, const IPlotterStyle & style, const std::string & options = "") = 0;
/**
* Remove a data analysis object in the list of things to plot in the region.
* Activate the graphic layer to update the screen window.
*/
virtual bool remove(const IBaseHistogram & histogram) = 0;
virtual bool remove(const IFunction & function) = 0;
virtual bool remove(const IDataPointSet & dataPointSet) = 0;
/**
* Clear the list of things to plot in the region.
* Clear the corresponding area on screen window(s).
*/
virtual void clear() = 0;
/**
* Set various plotting paramters for the region.
* Activate the graphic layer and update the screen window(s)
* if needed.
*/
virtual bool setParameter(const std::string & parameter, const std::string & options = "") = 0;
/**
* Get value of a parameter.
* @param paramName Name of the parameter.
* @return the value.
*/
virtual std::string parameterValue(const std::string & parameter) const = 0;
virtual std::vector<std::string> availableParameterOptions(const std::string & parameter) const = 0;
virtual std::vector<std::string> availableParameters() const = 0;
/**
* Get the style of the region.
*/
virtual IPlotterStyle & style() = 0;
/**
* Set the style of a region.
*/
virtual bool setStyle(const IPlotterStyle & style) = 0;
/**
* Set the style of a region and apply it to scene objects.
*/
virtual bool applyStyle(const IPlotterStyle & style) = 0;
/**
* Set the title of a region.
*/
virtual void setTitle(const std::string & title) = 0;
/**
* Set limit of an axis representation the region area.
*/
virtual bool setXLimits(double min = 0, double max = 0) = 0;
virtual bool setYLimits(double min = 0, double max = 0) = 0;
virtual bool setZLimits(double min = 0, double max = 0) = 0;
/**
* To customize axis position,etc...
* Change object position in the scence.
*/
virtual IPlotterLayout & layout() = 0;
virtual bool setLayout(const IPlotterLayout & layout) = 0;
/**
* Return an IInfo object describing the info area.
*/
virtual IInfo & info() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPLOTTERREGION_H */
@@ -0,0 +1,93 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPLOTTERSTYLE_H
#define AIDA_IPLOTTERSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseStyle.h"
namespace AIDA {
class IAxisStyle;
class IDataStyle;
class IInfoStyle;
class ITitleStyle;
/**
* User level interface to plotter style.
* A plotter style permit to customize various part
* of the plotting "scene" (axes, titles, data
* representations, etc...)
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IPlotterStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~IPlotterStyle() { /* nop */; }
/**
* Get style of various plotting scene parts.
*/
virtual IDataStyle & dataStyle() = 0;
virtual IAxisStyle & xAxisStyle() = 0;
virtual IAxisStyle & yAxisStyle() = 0;
virtual IAxisStyle & zAxisStyle() = 0;
virtual ITitleStyle & titleStyle() = 0;
virtual IInfoStyle & infoStyle() = 0;
/**
* Set style of various plotting scene parts.
*/
virtual bool setDataStyle(const IDataStyle & dataStyle) = 0;
virtual bool setAxisStyleX(const IAxisStyle & xAxisStyle) = 0;
virtual bool setAxisStyleY(const IAxisStyle & yAxisStyle) = 0;
virtual bool setAxisStyleZ(const IAxisStyle & zAxisStyle) = 0;
virtual bool setTitleStyle(const ITitleStyle & textStyle) = 0;
virtual bool setInfoStyle(const IInfoStyle & infoStyle) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPLOTTERSTYLE_H */
@@ -0,0 +1,105 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPROFILE_H
#define AIDA_IPROFILE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseHistogram.h"
namespace AIDA {
/**
* User level interface to a Profile histogram
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IProfile : virtual public IBaseHistogram {
public:
/// Destructor.
virtual ~IProfile() { /* nop */; }
/**
* Get the number or all the entries, both in range and
* underflow/overflow bins of the IProfile.
* @return The sum of all the entries.
*
*/
virtual int allEntries() const = 0;
/**
* Get the number of entries in the underflow and overflow bins.
* @return The numer of entries in the out-of-range bins.
*
*/
virtual int extraEntries() const = 0;
/**
* Get the sum of in range bin heights in the IProfile.
* @return The sum of all the in-range bins heights.
*
*/
virtual double sumBinHeights() const = 0;
/**
* Get the sum of all the bins heights (including underflow and overflow bin).
* @return The sum of all the bins heights.
*
*/
virtual double sumAllBinHeights() const = 0;
/**
* Get the sum of the underflow and overflow bin height.
* @return The sum of the out-of-range bins heights.
*
*/
virtual double sumExtraBinHeights() const = 0;
/**
* Get the minimum height of the in-range bins.
* @return The minimum height among the in-range bins.
*
*/
virtual double minBinHeight() const = 0;
/**
* Get the maximum height of the in-range bins.
* @return The maximum height among the in-range bins.
*
*/
virtual double maxBinHeight() const = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPROFILE_H */
@@ -0,0 +1,125 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPROFILE1D_H
#define AIDA_IPROFILE1D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IProfile.h"
namespace AIDA {
class IAxis;
/**
* User level interface to a 1-dimensional profile histogram
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IProfile1D : virtual public IProfile {
public:
/// Destructor.
virtual ~IProfile1D() { /* nop */; }
/**
* Fill the IProfile1D.
*
*/
virtual bool fill(double x, double y, double weight = 1) = 0;
/**
* The weighted mean of the corresponding bin.
* @param index the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the x axis.
*
*/
virtual double binMean(int index) const = 0;
/**
* Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
* @param index the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
*/
virtual int binEntries(int index) const = 0;
/**
* Total height of the corresponding bin (ie the sum of the weights in this bin).
* @param index the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
*/
virtual double binHeight(int index) const = 0;
/**
* The error on this bin.
* @param index the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
*/
virtual double binError(int index) const = 0;
/**
* The spread (RMS) of a bin.
* @param index the bin number (0...N-1) or OVERFLOW or UNDERFLOW.
*
*/
virtual double binRms(int index) const = 0;
/**
* Returns the mean of the whole profile as calculated on filling-time.
*/
virtual double mean() const = 0;
/**
* Returns the rms of the whole profile as calculated on filling-time.
*/
virtual double rms() const = 0;
/**
* Returns the X axis.
*/
virtual const IAxis & axis() const = 0;
/**
* Convenience method, equivalent to <tt>axis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
*/
virtual int coordToIndex(double coord) const = 0;
/**
* Modifies this IProfile1D by adding the contents of profile to it.
*
* @param profile The IProfile1D to be added to this IProfile1D
* @return false if profile binnings are incompatible
*/
virtual bool add(const IProfile1D & profile) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPROFILE1D_H */
@@ -0,0 +1,196 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IPROFILE2D_H
#define AIDA_IPROFILE2D_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IProfile.h"
namespace AIDA {
class IAxis;
/**
* User level interface to a 2-dimensional profile histogram
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IProfile2D : virtual public IProfile {
public:
/// Destructor.
virtual ~IProfile2D() { /* nop */; }
/**
* Fill the IProfile2D.
*
*/
virtual bool fill(double x, double y, double z, double weight = 1) = 0;
/**
* The weighted mean along x of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the x axis.
*
*/
virtual double binMeanX(int indexX, int indexY) const = 0;
/**
* The weighted mean along y of a given bin.
* @param indexX The x bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @param indexY The y bin number (0...N-1) or OVERFLOW or UNDERFLOW.
* @return The mean of the corresponding bin along the x axis.
*
*/
virtual double binMeanY(int indexX, int indexY) const = 0;
/**
* The number of entries (ie the number of times fill was called for this bin).
* @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
* @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
*
*/
virtual int binEntries(int indexX, int indexY) const = 0;
/**
* Equivalent to <tt>projectionX().binEntries(indexX)</tt>.
*
*/
virtual int binEntriesX(int indexX) const = 0;
/**
* Equivalent to <tt>projectionY().binEntries(indexY)</tt>.
*
*/
virtual int binEntriesY(int indexY) const = 0;
/**
* Total height of the corresponding bin (ie the sum of the weights in this bin).
* @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
* @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
*
*/
virtual double binHeight(int indexX, int indexY) const = 0;
/**
* Equivalent to <tt>projectionX().binHeight(indexX)</tt>.
*
*/
virtual double binHeightX(int indexX) const = 0;
/**
* Equivalent to <tt>projectionY().binHeight(indexY)</tt>.
*
*/
virtual double binHeightY(int indexY) const = 0;
/**
* The error on this bin.
* @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
* @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
*
*/
virtual double binError(int indexX, int indexY) const = 0;
/**
* The spread (RMS) of this bin.
* @param indexX the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.
* @param indexY the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
*
*/
virtual double binRms(int indexX, int indexY) const = 0;
/**
* Returns the mean of the profile, as calculated on filling-time projected on the X axis.
*
*/
virtual double meanX() const = 0;
/**
* Returns the mean of the profile, as calculated on filling-time projected on the Y axis.
*
*/
virtual double meanY() const = 0;
/**
* Returns the rms of the profile as calculated on filling-time projected on the X axis.
*
*/
virtual double rmsX() const = 0;
/**
* Returns the rms of the profile as calculated on filling-time projected on the Y axis.
*
*/
virtual double rmsY() const = 0;
/**
* Return the X axis.
*
*/
virtual const IAxis & xAxis() const = 0;
/**
* Return the Y axis.
*
*/
virtual const IAxis & yAxis() const = 0;
/**
* Convenience method, equivalent to <tt>xAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
*
*/
virtual int coordToIndexX(double coordX) const = 0;
/**
* Convenience method, equivalent to <tt>yAxis().coordToIndex(coord)</tt>.
* @see IAxis#coordToIndex(double)
*
*/
virtual int coordToIndexY(double coordY) const = 0;
/**
* Modifies this profile by adding the contents of profile to it.
*
* @param profile The IProfile2D to be added to this IProfile2D
* @return false if the profile binnings are incompatible
*
*/
virtual bool add(const IProfile2D & h) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IPROFILE2D_H */
@@ -0,0 +1,131 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_IRANGESET_H
#define AIDA_IRANGESET_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <vector>
namespace AIDA {
/**
* User level interface to RangeSet.
*
*
* Proposed rules for ranges:
*
* - By default (no arguments) RangeSet object is created with
* one valid range: (-infinity, +infinity).
*
* - size=0 means no valid ranges (isInRange(double point) will
* return false for any point). It also can be used to check if
* any range is set - RangeSet include valid interval only
* if size!=0.
*
* - RangeSet can be smart, e.g merge overlapping valid ranges.
* So size() does not always equal to the number of times
* user call include method.
*
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class IRangeSet {
public:
/// Destructor.
virtual ~IRangeSet() { /* nop */; }
/**
* Return array of lower Bounds for the current set of ranges
* @return Array of lower bounds for all valid ranges
*/
virtual const std::vector<double> & lowerBounds() = 0;
/**
* Return array of upper Bounds for the current set of ranges
* @return Array of upper bounds for all valid ranges
*/
virtual const std::vector<double> & upperBounds() = 0;
/**
* Add [xMin, xMax] interval to existing set of valid ranges
* @param xMin - lower bound of a new valid range
* @param xMax - upper bound of a new valid range
*/
virtual void include(double xMin, double xMax) = 0;
/**
* Exclude [xMin, xMax] interval from the existing set of valid ranges
* @param xMin - lower bound of range to be excluded
* @param xMax - upper bound of range to be excluded
*/
virtual void exclude(double xMin, double xMax) = 0;
/**
* Set full range (from MINUS_INF to PLUS_INF ).
*/
virtual void includeAll() = 0;
/**
* Set empty range.
*/
virtual void excludeAll() = 0;
/*
* @return Return true if the point is in range
*/
virtual bool isInRange(double point) = 0;
/**
* Return current number of disjoint ranges (non-overlapping intervals).
* Note: it is not always equal to the number of times user set the range
* @return Number of disjoint ranges
*/
virtual int size() = 0;
/*
* Define +infinity according to specific implementation
* @return Numeric definition for +infinity
*/
virtual double PLUS_INF() = 0;
/*
* Define -infinity according to specific implementation
* @return Numeric definition for -infinity
*/
virtual double MINUS_INF() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_IRANGESET_H */
@@ -0,0 +1,96 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITEXTSTYLE_H
#define AIDA_ITEXTSTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
#include "AIDA/IBrushStyle.h"
namespace AIDA {
/**
* Style for all text (e.g. axis labels, legend box text etc.)
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class ITextStyle : virtual public IBrushStyle {
public:
/// Destructor.
virtual ~ITextStyle() { /* nop */; }
/**
* Get list of fonts available in this implementation.
*/
virtual std::vector<std::string> availableFonts() const = 0;
/**
* Get current font size.
*/
virtual double fontSize() const = 0;
/**
* Set current font size.
* @return false if size not supported by this implementation.
*/
virtual bool setFontSize(double size) = 0;
/**
* Get name of current font.
*/
virtual std::string font() const = 0;
/**
* Set current font, e.g. "timesNewRoman" or "courier".
* @return false if font not supported by this implementation.
*/
virtual bool setFont(const std::string & font) = 0;
virtual bool isBold() const = 0;
virtual bool isItalic() const = 0;
virtual bool isUnderlined() const = 0;
virtual bool setBold(bool bold = true) = 0;
virtual bool setItalic(bool italic = true) = 0;
virtual bool setUnderlined(bool underlined = true) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITEXTSTYLE_H */
@@ -0,0 +1,62 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITITLESTYLE_H
#define AIDA_ITITLESTYLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include "AIDA/IBaseStyle.h"
namespace AIDA {
class ITextStyle;
/**
* Style for the "title scene part" of a plotting region or
* for the global title of a plotting page.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ITitleStyle : virtual public IBaseStyle {
public:
/// Destructor.
virtual ~ITitleStyle() { /* nop */; }
virtual ITextStyle & textStyle() = 0;
virtual bool setTextStyle(const ITextStyle & textStyle) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITITLESTYLE_H */
@@ -0,0 +1,259 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITREE_H
#define AIDA_ITREE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <iostream>
#include <string>
#include <vector>
namespace AIDA {
class IManagedObject;
/**
* User level interface to a Tree.
*
* All paths follow unix convention .., ., /,
* backslash is the escape character.
* Relative paths are allowed.
*
* NOTE: - this tree keeps a current position(pwd) within the tree.
* This may be implemented on a per-thread basis.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ITree {
public:
/// Destructor.
virtual ~ITree() { /* nop */; }
/**
* Get the name of the store.
* @return The store's name.
*
*/
virtual const std::string & storeName() const = 0;
/**
* Get the IManagedObject at a given path in the ITree. The path can either be
* absolute or relative to the current working directory.
* @param path The path.
* @return The corresponding IManagedObject.
*
*/
virtual IManagedObject * find(const std::string & path) = 0;
/**
* Change to a given directory.
* @param path The absolute or relative path of the directory we are changing to.
* @return false If the path does not exist.
*
*/
virtual bool cd(const std::string & path) = 0;
/**
* Get the path of the current working directory.
* @return The path of the current working directory.
*
*/
virtual const std::string & pwd() const = 0;
/**
* List, into a given output stream, all the IManagedObjects, including directories
* (but not "." and ".."), in a given path. Directories end with "/". The list can be recursive.
* @param path The path where the list has to be performed (by default the current directory ".").
* @param recursive If <code>true</code> the list is extended recursively
* in all the directories under path (the default is <code>false</code>.
* @param os The output stream into which the list is dumped (by default the standard output).
* @return false If the path does not exist.
*
*/
virtual bool ls(const std::string & path = ".", bool recursive = false, std::ostream & os = std::cout) const = 0;
/**
* Get the list of names of the IManagedObjects under a given path, including directories
* (but not "." and ".."). Directories end with "/".
* The returned names are appended to the given path unless the latter is ".".
* @param path The path where the list has to be performed (by default the current directory ".").
* @param recursive If <code>true</code> the list is extended recursively
* in all the directories under path (the default is <code>false</code>.
*
*/
virtual std::vector<std::string> listObjectNames(const std::string & path = ".", bool recursive = false) const = 0;
/**
* Get the list of types of the IManagedObjects under a given path.
* The types are the leaf class of the Interface, e.g. "IHistogram1D", "ITuple", etc.
* Directories are marked with "dir".
* The order of the types is the same as the order for the listObjectNames() method
* to achieve a one-to-one correspondance between object names and types.
* @param path The path where the list has to be performed (by default the current directory ".").
* @param recursive If <code>true</code> the list is extended recursively
* in all the directories under path (the default is <code>false</code>.
*
*/
virtual std::vector<std::string> listObjectTypes(const std::string & path = ".", bool recursive = false) const = 0;
/**
* Create a new directory. Given a path only the last directory
* in it is created if all the intermediate subdirectories already exist.
* @param path The absolute or relative path of the new directory.
* @return false If a subdirectory within the path does
* not exist or it is not a directory. Also if the directory already exists.
*
*/
virtual bool mkdir(const std::string & path) = 0;
/**
* Create a directory recursively. Given a path the last directory
* and all the intermediate non-existing subdirectories are created.
* @param path The absolute or relative path of the new directory.
* @return false If an intermediate subdirectory
* is not a directory, or if the directory already exists.
*
*/
virtual bool mkdirs(const std::string & path) = 0;
/**
* Remove a directory and all the contents underneeth.
* @param path The absolute or relative path of the directory to be removed.
* @return false If path does not exist or if it is not
* a directory.
*
*/
virtual bool rmdir(const std::string & path) = 0;
/**
* Remove an IManagedObject by specifying its path.
* If the path points to a mount point, the mount point should first commit, then
* close and delete the tree object.
* @param path The absolute or relative path of the IManagedObject to be removed.
* @return false If path does not exist.
*
*/
virtual bool rm(const std::string & path) = 0;
/**
* Get the full path of an IManagedObject.
* @param object The IManagedObject whose path is to be returned.
* @return The object's absolute path.
* In C++ if the object does not exist, an empty string is returned.
*
*/
virtual std::string findPath(const IManagedObject & object) const = 0;
/**
* Move an IManagedObject or a directory from one directory to another.
* @param oldPath The path of the IManagedObject or direcoty to be moved.
* @param newPath The path of the diretory in which the object has to be moved to.
* @return false If either path does not exist.
*
*/
virtual bool mv(const std::string & oldPath, const std::string & newPath) = 0;
/**
* Commit any open transaction to the underlying store(s).
* It flushes objects into the disk for non-memory-mapped stores.
* @return false If the underlying store cannot be written out.
*
*/
virtual bool commit() = 0;
/**
* Set the strategy of what should happen if two objects have the same path.
* Default is overwrite.
* @param overwrite <code>true</code> to enable overwriting.
*
*/
virtual void setOverwrite(bool overwrite = true) = 0;
/**
* Copy an object from a path to another.
* @param oldPath The path of the object to be copied.
* @param newPath The path where the object is to be copied.
* @param recursive <code>true</code> if a recursive copy has to be performed.
* @return false If either path does not exist.
*
*/
virtual bool cp(const std::string & oldPath, const std::string & newPath, bool recursive = false) = 0;
/**
* Create a symbolic link to an object in the ITree.
* @param path The absolute or relative path of the object to be linked.
* @param alias The absolute or relative name of the link.
* @return false If path or any
* subidrectory within path does not exist.
*
*/
virtual bool symlink(const std::string & path, const std::string & alias) = 0;
/**
* Mounts a tree within another (target) tree. A tree can only be mounted once.
* Example:
* <pre>
* target.mount("/home/tonyj",tree,"/");
* </pre>
* @param path The path in the target tree
* @param tree The tree to mount within the target tree
* @param treePath The mount point within the tree to be mounted.
* @return false If something does not exist.
*
*/
virtual bool mount(const std::string & path, ITree & tree, const std::string & treePath) = 0;
/**
* Unmount a subtree at a given path (mount point).
* Whenever a tree is destroyed it first unmounts all dependent trees.
* @param path The path of the subtree to be unmounted.
* @return false If path does not exist.
*
*/
virtual bool unmount(const std::string & path) = 0;
/**
* Closes the underlying store.
* Changes will be saved only if commit() has been called before.
* The call is propagated to the dependent mounted trees.
* @return false If there are problems writing out
* the underlying store.
*
*/
virtual bool close() = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITREE_H */
@@ -0,0 +1,75 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITREEFACTORY_H
#define AIDA_ITREEFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
namespace AIDA {
class ITree;
/**
* The creator of trees.
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class ITreeFactory {
public:
/// Destructor.
virtual ~ITreeFactory() { /* nop */; }
/**
* Creates a new tree that is not associated with a store.
*/
virtual ITree * create() = 0;
/**
* Creates a new tree and associates it with a store.
* The store is assumed to be read/write.
* The store will be created if it does not exist.
* @param storeName The name of the store, if empty (""), the tree is created
* in memory and therefore will not be associated with a file.
* @param storeType Implementation specific string, may control store type
* @param readOnly If true the store is opened readonly, an exception if it does not exist
* @param createNew If false the file must exist, if true the file will be created
* @param options Other options, currently are not specified
*
*/
virtual ITree * create(const std::string & storeName, const std::string & storeType = "", bool readOnly = false, bool createNew = false, const std::string & options = "") = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITREEFACTORY_H */
@@ -0,0 +1,906 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITUPLE_H
#define AIDA_ITUPLE_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IAnnotation;
class ICloud1D;
class ICloud2D;
class ICloud3D;
class IEvaluator;
class IFilter;
class IHistogram1D;
class IHistogram2D;
class IHistogram3D;
class IProfile1D;
class IProfile2D;
class ITupleEntry;
/**
* User level interface to a Tuple.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ITuple {
public:
/// Destructor.
virtual ~ITuple() { /* nop */; }
/**
* Get the title of this ITuple.
* @return The ITuple's title.
*
*/
virtual const std::string & title() const = 0;
/**
* Set the title of the ITuple.
* @param title The new ITuple's title.
* @return false If title cannot be changed.
*
*/
virtual bool setTitle(const std::string & title) = 0;
/**
* Get the IAnnotation corresponding to this ITuple.
* @return The ITuple's IAnnotation.
*
*/
virtual IAnnotation & annotation() = 0;
virtual const IAnnotation & annotation() const = 0;
/**
* Fill a given column with a double.
* @param column The column's index within the ITuple.
* @param value The double.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, double value) = 0;
/**
* Fill a given column with a float.
* @param column The column's index within the ITuple.
* @param value The float.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, float value) = 0;
/**
* Fill a given column with an integer.
* @param column The column's index within the ITuple.
* @param value The integer.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, int value) = 0;
/**
* Fill a given column with a short.
* @param column The column's index within the ITuple.
* @param value The short.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, short value) = 0;
/**
* Fill a given column with a long.
* @param column The column's index within the ITuple.
* @param value The long.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, long value) = 0;
/**
* Fill a given column with a char.
* @param column The column's index within the ITuple.
* @param value The char.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, char value) = 0;
/**
* Fill a given column with a boolean.
* @param column The column's index within the ITuple.
* @param value The boolean.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, bool value) = 0;
/**
* Fill a given column with a string.
* @param column The column's index within the ITuple.
* @param value The string.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, const std::string & value) = 0;
/**
* Fill a given column with an object.
* @param column The column's index within the ITuple.
* @param value The object.
* @return false If the column is of the wrong type.
*
*/
virtual bool fill(int column, const ITupleEntry & value) = 0;
/**
* Fill all the columns at once with doubles.
* @param values The array of doubles.
* @return false If any column is not of type double or if
* the array has the wrong dimension.
*
*/
virtual bool fill(const std::vector<double> & values) = 0;
/**
* Fill all the columns at once with floats.
* @param values The array of floats.
* @return false If any column is not of type float or if
* the array has the wrong dimension.
*
*/
virtual bool fill(const std::vector<float> & values) = 0;
/**
* Add the current row to the ITuple. This method should be called after
* fill has been called for the columns; unfilled columns will be filled
* with their default value.
* @return false When the ITuple runs out of storage space.
*
*/
virtual bool addRow() = 0;
/**
* Clear the current(not yet added) row.
*
*/
virtual void resetRow() = 0;
/**
* Reset the ITuple. All the rows are reset.
* The ITuple is as just created.
*
*/
virtual void reset() = 0;
/**
* Get the number of rows currently filled in the ITuple.
* @return The number of rows. -1 if empty or if it cannot be determined.
*
*/
virtual int rows() const = 0;
/**
* Positions the read cursor immediately before the first row.
*
*/
virtual void start() = 0;
/**
* Skips a given number of rows.
* @param rows The number of rows to skip.
* @return false If rows is less than zero or
* if it is not possible to perform the jump.
*
*/
virtual bool skip(int rows) = 0;
/**
* Positions the cursor at the next row.
* @return false if there is no next row.
*
*/
virtual bool next() = 0;
/**
* Position the cursor at a give row.
* @param rowIndex The row where the cursor has to be positioned.
* @return false If the cursor cannot be positioned
* at the give row.
*
*/
virtual bool setRow(int rowIndex) = 0;
/**
* Get the index within the ITuple of a given column.
* @param name The colum's name.
* @return The corresponding column's index. Note: in C++ -1 may
* be returned if the column does not exist.
*/
virtual int findColumn(const std::string & name) const = 0;
/**
* Get the double stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The double.
*
*/
virtual double getDouble(int column) const = 0;
/**
* Get the float stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The float.
*
*/
virtual float getFloat(int column) const = 0;
/**
* Get the integer stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The integer.
*
*/
virtual int getInt(int column) const = 0;
/**
* Get the short stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The short.
*
*/
virtual short getShort(int column) const = 0;
/**
* Get the long stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The long.
*
*/
virtual long getLong(int column) const = 0;
/**
* Get the character stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The character.
*
*/
virtual char getChar(int column) const = 0;
/**
* Get the boolean stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The boolean.
*
*/
virtual bool getBoolean(int column) const = 0;
/**
* Get the string stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The string.
*
*/
virtual const std::string & getString(int column) const = 0;
/**
* Get the object stored in a given column at the current cursor's position.
* @param column The column's index within the ITuple.
* @return The object.
*
*/
virtual const ITupleEntry * getObject(int column) const = 0;
/**
* Return method for tuple variables of type ITuple for a given column.
* This method can be used in order to fill a tuple variable in the master tuple.
* @param column The column's index.
* @return The ITuple representing the structure of this column.
*
*/
virtual const ITuple * getTuple(int column) const = 0;
virtual ITuple * getTuple(int column) = 0;
/**
* Get the number of columns in the ITuple
* @return The number of columns.
*
*/
virtual int columns() const = 0;
/**
* Get the name of a column from its index.
* @param column The column's index.
* @return The column's name.
*
*/
virtual const std::string & columnName(int column) const = 0;
/**
* Get the type of a give column.
* @param column The column's type.
* @return The column's Class.
*
*/
virtual const std::string & columnType(int column) const = 0;
/**
* Get the minimum value of a given column (if it can be converted to a double).
* @param column The column's index.
* @return The column's minimum value. In Java Double.NaN might be returned.
*
*/
virtual double columnMin(int column) const = 0;
/**
* Get the maximum value of a given column (if it can be converted to a double).
* @param column The column's index.
* @return The column's maximum value. In Java Double.NaN might be returned.
*
*/
virtual double columnMax(int column) const = 0;
/**
* Get the mean value of a given column (if it can be converted to a double).
* @param column The column's index.
* @return The column's mean value. In Java Double.NaN might be returned.
*
*/
virtual double columnMean(int column) const = 0;
/**
* Get the RMS of a given column (if it can be converted to a double).
* @param column The column's index.
* @return The column's RMS. In Java Double.NaN might be returned.
*
*/
virtual double columnRms(int column) const = 0;
/**
* Fill an IHistogram1D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram. The value is computed
* from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram1D & histogram, IEvaluator & evaluatorX) = 0;
/**
* Fill an IHistogram1D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram. The value is computed
* from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram1D & histogram, IEvaluator & evaluatorX, IFilter & filter) = 0;
/**
* Fill an IHistogram1D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram. The value is computed
* from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram1D & histogram, IEvaluator & evaluatorX, IEvaluator & weight) = 0;
/**
* Fill an IHistogram1D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram. The value is computed
* from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram1D & histogram, IEvaluator & evaluatorX, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an IHistogram2D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram2D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY) = 0;
/**
* Fill an IHistogram2D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram2D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter) = 0;
/**
* Fill an IHistogram2D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram2D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & weight) = 0;
/**
* Fill an IHistogram2D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram2D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an IHistogram3D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the histogram along the z axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram3D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ) = 0;
/**
* Fill an IHistogram3D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the histogram along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram3D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter) = 0;
/**
* Fill an IHistogram3D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the histogram along the z axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram3D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IEvaluator & weight) = 0;
/**
* Fill an IHistogram3D from the tuple.
* @param histogram The histogram to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the histogram along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the histogram along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the histogram along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the histogram is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IHistogram3D & histogram, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an ICloud1D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud. The value is computed
* from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud1D & cloud, IEvaluator & evaluatorX) = 0;
/**
* Fill an ICloud1D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud. The value is computed
* from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud1D & cloud, IEvaluator & evaluatorX, IFilter & filter) = 0;
/**
* Fill an ICloud1D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud. The value is computed
* from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud1D & cloud, IEvaluator & evaluatorX, IEvaluator & weight) = 0;
/**
* Fill an ICloud1D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud. The value is computed
* from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud1D & cloud, IEvaluator & evaluatorX, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an ICloud2D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud2D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY) = 0;
/**
* Fill an ICloud2D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud2D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter) = 0;
/**
* Fill an ICloud2D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud2D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & weight) = 0;
/**
* Fill an ICloud2D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud2D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an ICloud3D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the cloud along the z axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud3D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ) = 0;
/**
* Fill an ICloud3D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the cloud along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud3D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter) = 0;
/**
* Fill an ICloud3D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the cloud along the z axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud3D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IEvaluator & weight) = 0;
/**
* Fill an ICloud3D from the tuple.
* @param cloud The cloud to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the cloud along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the cloud along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the cloud along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the cloud is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(ICloud3D & cloud, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an IProfile1D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile1D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY) = 0;
/**
* Fill an IProfile1D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the profile is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile1D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter) = 0;
/**
* Fill an IProfile1D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile1D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & weight) = 0;
/**
* Fill an IProfile1D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the profile is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile1D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IFilter & filter, IEvaluator & weight) = 0;
/**
* Fill an IProfile2D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the profile along the z axis.
* The value is computed from the current row of the tuple.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile2D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ) = 0;
/**
* Fill an IProfile2D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the profile along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the profile is not filled.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile2D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter) = 0;
/**
* Fill an IProfile2D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the profile along the z axis.
* The value is computed from the current row of the tuple.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile2D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IEvaluator & weight) = 0;
/**
* Fill an IProfile2D from the tuple.
* @param profile The profile to fill.
* @param evaluatorX The evaluator used to compute the value
* to be filled in the profile along the x axis.
* The value is computed from the current row of the tuple.
* @param evaluatorY The evaluator used to compute the value
* to be filled in the profile along the y axis.
* The value is computed from the current row of the tuple.
* @param evaluatorZ The evaluator used to compute the value
* to be filled in the profile along the z axis.
* The value is computed from the current row of the tuple.
* @param filter The filter object used to accept or not the current row.
* If rejected, the profile is not filled.
* @param weight The evaluator which determines the weight which is used during the filling.
* @return false If something goes wrong.
*
*/
virtual bool project(IProfile2D & profile, IEvaluator & evaluatorX, IEvaluator & evaluatorY, IEvaluator & evaluatorZ, IFilter & filter, IEvaluator & weight) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITUPLE_H */
@@ -0,0 +1,47 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// DUMMY CLASS
#ifndef AIDA_ITUPLEENTRY_H
#define AIDA_ITUPLEENTRY_H 1
#include <string>
#include <vector>
namespace AIDA {
/**
* User level interface to a Tuple.
*
* @author The AIDA team (http://aida.freehep.org/)
*
*/
class ITupleEntry {
public:
/// Destructor.
virtual ~ITupleEntry() { /* nop */; }
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITUPLEENTRY_H */
@@ -0,0 +1,148 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
// -*- C++ -*-
// AID-GENERATED
// =========================================================================
// This class was generated by AID - Abstract Interface Definition
// DO NOT MODIFY, but use the org.freehep.aid.Aid utility to regenerate it.
// =========================================================================
#ifndef AIDA_ITUPLEFACTORY_H
#define AIDA_ITUPLEFACTORY_H 1
// This file is part of the AIDA library
// Copyright (C) 2002 by the AIDA team. All rights reserved.
// This library is free software and under the terms of the
// GNU Library General Public License described in the LGPL.txt
#include <string>
#include <vector>
namespace AIDA {
class IEvaluator;
class IFilter;
class ITuple;
/**
* A factory for creating ITuples.
*
* @author The AIDA team (http://aida.freehep.org/)
*/
class ITupleFactory {
public:
/// Destructor.
virtual ~ITupleFactory() { /* nop */; }
/**
* Creates an NTuple
* @param name The persistency name of the n-tuple
* @param title The title of the n-tuple
* @param columnNames The names of the columns
* @param columnType The types of the columns
* @param options NTuple options (currently undefined)
*
*/
virtual ITuple * create(const std::string & name, const std::string & title, const std::vector<std::string> & columnNames, const std::vector<std::string> & columnType, const std::string & options = "") = 0;
/**
* Creates an NTuple
* @param name The persistency name of the n-tuple
* @param title The title of the n-tuple
* @param columns The names and types of the columns e.g. "float px, py, pz, float energy, int charge"
* @param options NTuple options (currently undefined)
*
*/
virtual ITuple * create(const std::string & name, const std::string & title, const std::string & columns, const std::string & options = "") = 0;
/**
* Creates a logical chain of ITuples. All ITuples in the set must
* have the same structure. Chained ITuple can not be filled.
* Original n-tuple data is not copied.
* @param name The persistency name of the new n-tuple
* @param title The title of the new n-tuple
* @param set The array of ITuples to chain
*
*/
virtual ITuple * createChained(const std::string & name, const std::string & title, const std::vector<ITuple *> & set) = 0;
/**
* Creates a logical chain of ITuples. All ITuples in the set must
* have the same structure. Chained ITuple can not be filled.
* Original n-tuple data is not copied.
* @param name The persistency name of the new n-tuple
* @param title The title of the new n-tuple
* @param set The array of the names of the ITuples to chain
*
*/
virtual ITuple * createChained(const std::string & name, const std::string & title, const std::vector<std::string> & set) = 0;
/**
* Creates a new reduced tuple (less rows) from an existing one
* by applying a filter. Data is explicitly copied to a new n-tuple.
* @param name The persistency name of the new n-tuple
* @param tuple Original n-tuple
* @param filter IFilter to be used
*
*/
virtual ITuple * createFiltered(const std::string & name, ITuple & tuple, IFilter & filter) = 0;
/**
* Creates a new reduced tuple (less rows) from an existing one
* by applying a filter. Only subset of the variables (columns) is copied.
* Data is explicitly copied to a new n-tuple.
* @param name The persistency name of the new n-tuple
* @param tuple Original n-tuple
* @param filter IFilter to be used
* @param columns Names of columns to for a new n-tuple
*
*/
virtual ITuple * createFiltered(const std::string & name, ITuple & tuple, IFilter & filter, const std::vector<std::string> & columns) = 0;
/**
* Creates IFilter object given a string defining of the "cut" expression.
* @param expression String defining of the "cut" expression.
*
*/
virtual IFilter * createFilter(const std::string & expression) = 0;
/**
* Creates a filter object given a string defining the "cut" expression.
* Filter processes only subset of data.
* @param expression String defining of the "cut" expression.
* @param rowsToProcess How many rows to process
* @param startingRow Row number where to start
*
*/
virtual IFilter * createFilter(const std::string & expression, int rowsToProcess, int startingRow = 0) = 0;
/**
* Create IEvaluator object given its expression.
* @param expression String defining of the evaluator expression.
*
*/
virtual IEvaluator * createEvaluator(const std::string & expression) = 0;
}; // class
}; // namespace AIDA
#endif /* ifndef AIDA_ITUPLEFACTORY_H */
@@ -0,0 +1,9 @@
These are a copy of the official AIDA header files taken from:
CVSROOT :pserver:anoncvs@cvs.freehep.org:/cvs/aida
MODULE aida
DIRECTORY cpp/AIDA
Version : 3.0
added ITupleEntry dummy class.