|
[Rivet-svn] rivet: AHandler almost working.Rivet Mercurial rivet at projects.hepforge.orgThu Sep 29 09:45:01 BST 2016
details: https://rivet.hepforge.org/hg/rivet/rev/9447383fa754 branches: multiweight changeset: 5536:9447383fa754 user: Chris Pollard <cspollard at gmail.com> date: Wed Sep 28 19:29:09 2016 +0100 description: AHandler almost working. diffs (truncated from 734 to 50 lines): --- a/include/Rivet/Analysis.hh Wed Sep 28 15:08:26 2016 +0100 +++ b/include/Rivet/Analysis.hh Wed Sep 28 19:29:09 2016 +0100 @@ -586,6 +586,8 @@ /// data's x values and errors, but with the y values and errors zeroed... /// assuming that there is a reference histo with the same name: if there /// isn't, an exception will be thrown. + + /* Scatter2DPtr bookScatter2D(const std::string& name, bool copy_pts=false, const std::string& title="", @@ -627,6 +629,7 @@ const std::string& ytitle); //@} + */ public: @@ -808,7 +811,7 @@ public: /// List of registered analysis data objects - const vector<AnalysisObjectPtr>& analysisObjects() const { + const vector<shared_ptr<MultiweightAOPtr> >& analysisObjects() const { return _analysisobjects; } @@ -819,15 +822,15 @@ //@{ /// Register a data object in the histogram system - void addAnalysisObject(AnalysisObjectPtr ao); + void addAnalysisObject(shared_ptr<MultiweightAOPtr> ao); /// Get a data object from the histogram system /// @todo Use this default function template arg in C++11 // template <typename AO=AnalysisObjectPtr> template <typename AOPtr> const AOPtr& getAnalysisObject(const std::string& name) const { - foreach (const AnalysisObjectPtr& ao, analysisObjects()) { - if (ao->path() == histoPath(name)) return dynamic_cast<AOPtr&>(ao); + for (const shared_ptr<MultiweightAOPtr>& ao : analysisObjects()) { + if ((*ao)->path() == histoPath(name)) return dynamic_cast<const AOPtr&>(*ao); } throw Exception("Data object " + histoPath(name) + " not found"); } @@ -837,9 +840,10 @@ // template <typename AO=AnalysisObjectPtr> template <typename AOPtr>
More information about the Rivet-svn mailing list |