Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:27

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 // ============================================================================
0012 #ifndef GAUDISVC_HISTOGRAMSVC_H
0013 #define GAUDISVC_HISTOGRAMSVC_H 1
0014 // ============================================================================
0015 // Include Files
0016 // ============================================================================
0017 // GaudiKernel
0018 // ============================================================================
0019 #include "GaudiKernel/DataSvc.h"
0020 #include "GaudiKernel/GaudiException.h"
0021 #include "GaudiKernel/HistoProperty.h"
0022 #include "GaudiKernel/IHistogramSvc.h"
0023 #include "GaudiKernel/IRegistry.h"
0024 #include "GaudiKernel/System.h"
0025 // ============================================================================
0026 // AIDA
0027 // ============================================================================
0028 /// @FIXME: AIDA interfaces visibility
0029 #include "AIDA/IAnnotation.h"
0030 #include "AIDA/IHistogramFactory.h"
0031 // ============================================================================
0032 // local (+PI)
0033 // ============================================================================
0034 #include "Axis.h"
0035 #include "HistogramUtility.h"
0036 #include "TH1.h"
0037 #include "TH2.h"
0038 #include "TH3.h"
0039 // ============================================================================
0040 namespace AIDA {
0041   class ICloud1D;
0042   class ICloud2D;
0043   class ICloud3D;
0044 } // namespace AIDA
0045 
0046 namespace detail {
0047   template <class T>
0048   static DataObject* cast( T* p ) {
0049     DataObject* q = dynamic_cast<DataObject*>( p );
0050     if ( !q && p ) { throw std::runtime_error( "HistogramSvc: Unexpected object type." ); }
0051     return q;
0052   }
0053 } // namespace detail
0054 
0055 // ============================================================================
0056 /** @class HistogramSvc HistogramSvc.h
0057  *
0058  *  HistogramSvc class definition
0059  *
0060  */
0061 class HistogramSvc : public extends<DataSvc, IHistogramSvc>, virtual public AIDA::IHistogramFactory {
0062 
0063 private:
0064   void not_implemented() const { error() << "Sorry, not yet implemented..." << endmsg; }
0065 
0066 protected:
0067   typedef AIDA::IHistogram3D   H3D;
0068   typedef AIDA::IProfile2D     P2D;
0069   typedef AIDA::IBaseHistogram Base;
0070 
0071   struct Helper {
0072     HistogramSvc* m_svc;
0073     Helper( HistogramSvc* p ) : m_svc( p ) {}
0074     template <class A1, class A3>
0075     StatusCode retrieve( A1 a1, A3*& a3 ) {
0076       DataObject* pObject = nullptr;
0077       StatusCode  sc      = m_svc->retrieveObject( a1, pObject );
0078       a3                  = dynamic_cast<A3*>( pObject );
0079       return sc;
0080     }
0081     template <class A1, class A2, class A3>
0082     StatusCode retrieve( A1 a1, A2 a2, A3*& a3 ) {
0083       DataObject* pObject = nullptr;
0084       StatusCode  sc      = m_svc->retrieveObject( a1, a2, pObject );
0085       a3                  = dynamic_cast<A3*>( pObject );
0086       return sc;
0087     }
0088     template <class A1, class A3>
0089     StatusCode find( A1 a1, A3*& a3 ) {
0090       DataObject* pObject = nullptr;
0091       StatusCode  sc      = m_svc->findObject( a1, pObject );
0092       a3                  = dynamic_cast<A3*>( pObject );
0093       return sc;
0094     }
0095     template <class A1, class A2, class A3>
0096     StatusCode find( A1 a1, A2 a2, A3*& a3 ) {
0097       DataObject* pObject = nullptr;
0098       StatusCode  sc      = m_svc->findObject( a1, a2, pObject );
0099       a3                  = dynamic_cast<A3*>( pObject );
0100       return sc;
0101     }
0102     template <class R, class S, class T1, class T2>
0103     static R* act( R* res, const S& b, void ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) {
0104       auto       h1 = Gaudi::getRepresentation<R, T1>( *res );
0105       const auto h2 = Gaudi::getRepresentation<R, T2>( b );
0106       if ( h1 && h2 ) {
0107         ( h1->*pmf )( h2, scale );
0108         return res;
0109       }
0110       return nullptr;
0111     }
0112     template <class R, class S, class T1, class T2>
0113     static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2*, Double_t ), Double_t scale ) {
0114       auto       h1 = Gaudi::getRepresentation<R, T1>( *res );
0115       const auto h2 = Gaudi::getRepresentation<R, T2>( b );
0116       if ( h1 && h2 ) {
0117         ( h1->*pmf )( h2, scale );
0118         return res;
0119       }
0120       return nullptr;
0121     }
0122     template <class R, class S, class T1, class T2>
0123     static R* act( R* res, const S& b, void ( T1::*pmf )( const T2* ) ) {
0124       auto       h1 = Gaudi::getRepresentation<R, T1>( *res );
0125       const auto h2 = Gaudi::getRepresentation<R, T2>( b );
0126       if ( h1 && h2 ) {
0127         ( h1->*pmf )( h2 );
0128         return res;
0129       }
0130       return nullptr;
0131     }
0132     template <class R, class S, class T1, class T2>
0133     static R* act( R* res, const S& b, Bool_t ( T1::*pmf )( const T2* ) ) {
0134       auto       h1 = Gaudi::getRepresentation<R, T1>( *res );
0135       const auto h2 = Gaudi::getRepresentation<R, T2>( b );
0136       if ( h1 && h2 ) {
0137         ( h1->*pmf )( h2 );
0138         return res;
0139       }
0140       return nullptr;
0141     }
0142   };
0143 
0144 public:
0145   using Edges        = std::vector<double>;
0146   using DBaseEntries = std::vector<std::string>;
0147 
0148   /** Statndard Constructor
0149    *  @param name service name
0150    *  @param pointer to service locator interface
0151    */
0152   HistogramSvc( const std::string& name, ISvcLocator* svc );
0153 
0154   /// Destructor
0155   ~HistogramSvc() override;
0156 
0157   /** Split full path into its components
0158    *  @param full Full path of the object
0159    *  @param dir  Resulting directory path
0160    *  @param obj  Resulting object path
0161    */
0162   std::pair<std::string, std::string> i_splitPath( const std::string& full );
0163 
0164   /** Connect input histogram file to the service
0165    *  @param ident   [IN]   Input specification
0166    */
0167   StatusCode connectInput( const std::string& ident );
0168 
0169   template <class T>
0170   inline T* i_book( DataObject* pPar, const std::string& rel, const std::string& title,
0171                     const std::pair<DataObject*, T*>& o ) {
0172     if ( o.first && registerObject( pPar, rel, (Base*)o.second ).isSuccess() ) return o.second;
0173     delete o.first;
0174     throw GaudiException( "Cannot book " + System::typeinfoName( typeid( T ) ) + " " + title, "HistogramSvc",
0175                           StatusCode::FAILURE );
0176   }
0177 
0178   /// Helper for 2D projections
0179   AIDA::IHistogram2D* i_project( const std::string& nameAndTitle, const AIDA::IHistogram3D& h, const std::string& dir );
0180 
0181 public:
0182   /// Initialise the service
0183   StatusCode initialize() override;
0184   /// Initialise the service
0185   StatusCode reinitialize() override;
0186   /// finalize the service
0187   StatusCode finalize() override;
0188 
0189   /// Retrieve the AIDA HistogramFactory interface
0190   AIDA::IHistogramFactory* histogramFactory() override { return this; }
0191 
0192   // ==========================================================================
0193   // Book 1D histogram with fix binning
0194   // ==========================================================================
0195   /** Book histogram and register it with the histogram data store
0196       @param full        Full path to the node of the object.
0197                          The basename (last part of the fullpath)
0198                          has to be an integer number
0199                          otherwise conversion to HBOOK is not possible)
0200       @param par         Path to parent node of the object,
0201                          the directory the histogram will be stored in.
0202       @param pPar        Pointer to parent node
0203       @param rel         Histogram identifier (std::string), the relative path
0204                          to the object with respect to the parent node
0205       @param hID         Histogram identifier (int) of the histogram
0206       @param title       Title property of the histogram
0207       @param nx          Number of bins on the axis X/Y
0208       @param lx          Lower histogram edge on the axis X/Y
0209       @param ux          Upper histogram edge on the axis X/Y
0210   */
0211   AIDA::IHistogram1D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
0212                             double lowx, double upx ) override;
0213 
0214   AIDA::IHistogram1D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx,
0215                             double upx ) override;
0216 
0217   AIDA::IHistogram1D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx,
0218                             double upx ) override;
0219 
0220   AIDA::IHistogram1D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0221                             double upx ) override;
0222 
0223   virtual AIDA::IHistogram1D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0224                                     double lowx, double upx );
0225 
0226   AIDA::IHistogram1D* book( const std::string& full, const std::string& title, int nx, double lowx,
0227                             double upx ) override;
0228 
0229   // ==========================================================================
0230   // Book 1D Profile histogram with fix binning
0231   // ==========================================================================
0232   /** Book histogram and register it with the histogram data store
0233       @param full        Full path to the node of the object.
0234                          The basename (last part of the fullpath)
0235                          has to be an integer number
0236                         (otherwise conversion to HBOOK is not possible)
0237       @param par         Path to parent node of the object,
0238                          the directory the histogram will be stored in.
0239       @param pPar        Pointer to parent node
0240       @param rel         Histogram identifier (std::string), the relative path
0241                          to the object with respect to the parent node
0242       @param hID         Histogram identifier (int) of the histogram
0243       @param title       Title property of the histogram
0244       @param nx          Number of bins on the axis X/Y
0245       @param lx          Lower histogram edge on the axis X/Y
0246       @param ux          Upper histogram edge on the axis X/Y
0247   */
0248   AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
0249                               double lowx, double upx, const std::string& opt ) override;
0250 
0251   AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
0252                               double upx, const std::string& opt ) override;
0253 
0254   AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
0255                               const std::string& opt ) override;
0256 
0257   virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0258                                       double lowx, double upx, const std::string& opt );
0259 
0260   AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
0261                               const std::string& opt ) override;
0262 
0263   AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0264                               double upx, const std::string& opt ) override;
0265 
0266   AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
0267                               double lowx, double upx, double upper, double lower, const std::string& opt ) override;
0268 
0269   AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
0270                               double upx, double upper, double lower, const std::string& opt ) override;
0271 
0272   AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
0273                               double upper, double lower, const std::string& opt ) override;
0274 
0275   virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0276                                       double lowx, double upx, double upper, double lower, const std::string& opt );
0277 
0278   AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
0279                               double upper, double lower, const std::string& opt ) override;
0280 
0281   AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0282                               double upx, double upper, double lower, const std::string& opt ) override;
0283 
0284   // ==========================================================================
0285   // Book 1D histogram with variable binning
0286   // ==========================================================================
0287   /** Book histogram and register it with the histogram data store
0288       @param full        Full path to the node of the object.
0289                          The basename (last part of the fullpath)
0290                          has to be an integer number
0291                         (otherwise conversion to HBOOK is not possible)
0292       @param par         Path to parent node of the object,
0293                          the directory the histogram will be stored in.
0294       @param pPar        Pointer to parent node
0295       @param rel         Histogram identifier (std::string), the relative path
0296                          to the object with respect to the parent node
0297       @param hID         Histogram identifier (int) of the histogram
0298       @param title       Title property of the histogram
0299       @param e           Bin edges for variable binned histogram.
0300   */
0301   AIDA::IHistogram1D* book( const std::string& par, int hID, const std::string& title, Edges e ) override;
0302 
0303   AIDA::IHistogram1D* book( DataObject* pPar, int hID, const std::string& title, Edges e ) override;
0304 
0305   AIDA::IHistogram1D* book( const std::string& par, const std::string& rel, const std::string& title,
0306                             Edges e ) override;
0307 
0308   virtual AIDA::IHistogram1D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges e );
0309 
0310   AIDA::IHistogram1D* book( const std::string& full, const std::string& title, Edges e ) override;
0311 
0312   AIDA::IHistogram1D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges e ) override;
0313 
0314   // ==========================================================================
0315   // Book 1D profile histogram with variable binning
0316   // ==========================================================================
0317   /** Book histogram and register it with the histogram data store
0318       @param full        Full path to the node of the object.
0319                          The basename (last part of the full)
0320                          has to be an integer number
0321                         (otherwise conversion to HBOOK is not possible)
0322       @param par         Path to parent node of the object,
0323                          the directory the histogram will be stored in.
0324       @param pPar        Pointer to parent node
0325       @param rel         Histogram identifier (std::string), the relative path
0326                          to the object with respect to the parent node
0327       @param hID         Histogram identifier (int) of the histogram
0328       @param title       Title property of the histogram
0329       @param e           Bin edges for variable binned histogram.
0330   */
0331   AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, Edges e ) override;
0332 
0333   AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title,
0334                               Edges e ) override;
0335 
0336   AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, Edges e ) override;
0337 
0338   AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges e ) override;
0339 
0340   virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title,
0341                                       Edges e );
0342 
0343   AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges e ) override;
0344 
0345   virtual AIDA::IProfile1D* bookProf( const std::string& full, const std::string& title, Edges e, double upper,
0346                                       double lower );
0347 
0348   virtual AIDA::IProfile1D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges e,
0349                                       double upper, double lower );
0350 
0351   virtual AIDA::IProfile1D* bookProf( const std::string& par, int hID, const std::string& title, Edges e, double upper,
0352                                       double lower );
0353 
0354   virtual AIDA::IProfile1D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges e, double upper,
0355                                       double lower );
0356 
0357   virtual AIDA::IProfile1D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges e,
0358                                       double upper, double lower );
0359 
0360   virtual AIDA::IProfile1D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges e,
0361                                       double upper, double lower );
0362 
0363   // ==========================================================================
0364   // Book 2D histogram with fixed binning
0365   // ==========================================================================
0366   /** Book histogram and register it with the histogram data store
0367       @param full        Full path to the node of the object.
0368                          The basename (last part of the full)
0369                          has to be an integer number
0370                         (otherwise conversion to HBOOK is not possible)
0371       @param par         Path to parent node of the object,
0372                          the directory the histogram will be stored in.
0373       @param pPar        Pointer to parent node
0374       @param rel         Histogram identifier (std::string), the relative path
0375                          to the object with respect to the parent node
0376       @param hID         Histogram identifier (int) of the histogram
0377       @param title       Title property of the histogram
0378       @param nx          Number of bins on the X-axis
0379       @param lx          Lower histogram edge on the X-axis
0380       @param ux          Upper histogram edge on the X-axis
0381       @param ny          Number of bins on the Y-axis
0382       @param ly          Lower histogram edge on the Y-axis
0383       @param uy          Upper histogram edge on the Y-axis
0384   */
0385   AIDA::IHistogram2D* book( const std::string& full, const std::string& title, int nx, double lowx, double upx, int ny,
0386                             double lowy, double upy ) override;
0387 
0388   AIDA::IHistogram2D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
0389                             double lowx, double upx, int ny, double lowy, double upy ) override;
0390 
0391   AIDA::IHistogram2D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx, double upx,
0392                             int ny, double lowy, double upy ) override;
0393 
0394   virtual AIDA::IHistogram2D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0395                                     double lowx, double upx, int ny, double lowy, double upy );
0396 
0397   AIDA::IHistogram2D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
0398                             int ny, double lowy, double upy ) override;
0399 
0400   AIDA::IHistogram2D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0401                             double upx, int ny, double lowy, double upy ) override;
0402 
0403   // ==========================================================================
0404   // Book 2D profile histogram with fixed binning
0405   // ==========================================================================
0406   /** Book histogram and register it with the histogram data store
0407       @param full        Full path to the node of the object.
0408                          The basename (last part of the full)
0409                          has to be an integer number
0410                         (otherwise conversion to HBOOK is not possible)
0411       @param par         Path to parent node of the object,
0412                          the directory the histogram will be stored in.
0413       @param pPar        Pointer to parent node
0414       @param rel         Histogram identifier (std::string), the relative path
0415                          to the object with respect to the parent node
0416       @param hID         Histogram identifier (int) of the histogram
0417       @param title       Title property of the histogram
0418       @param nx          Number of bins on the X-axis
0419       @param lx          Lower histogram edge on the X-axis
0420       @param ux          Upper histogram edge on the X-axis
0421       @param ny          Number of bins on the Y-axis
0422       @param ly          Lower histogram edge on the Y-axis
0423       @param uy          Upper histogram edge on the Y-axis
0424   */
0425   virtual AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, int nx, double lowx,
0426                                       double upx, int ny, double lowy, double upy, double upper, double lower );
0427 
0428   virtual AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
0429                                       double lowx, double upx, int ny, double lowy, double upy, double upper,
0430                                       double lower );
0431 
0432   virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0433                                       double lowx, double upx, int ny, double lowy, double upy, double upper,
0434                                       double lower );
0435 
0436   virtual AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
0437                                       double upx, int ny, double lowy, double upy, double upper, double lower );
0438 
0439   virtual AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx,
0440                                       double upx, int ny, double lowy, double upy, double upper, double lower );
0441 
0442   virtual AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx,
0443                                       double lowx, double upx, int ny, double lowy, double upy, double upper,
0444                                       double lower );
0445 
0446   AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, int nx, double lowx, double upx,
0447                               int ny, double lowy, double upy ) override;
0448 
0449   AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, int nx,
0450                               double lowx, double upx, int ny, double lowy, double upy ) override;
0451 
0452   virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0453                                       double lowx, double upx, int ny, double lowy, double upy );
0454 
0455   AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, int nx, double lowx,
0456                               double upx, int ny, double lowy, double upy ) override;
0457 
0458   AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
0459                               int ny, double lowy, double upy ) override;
0460 
0461   AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0462                               double upx, int ny, double lowy, double upy ) override;
0463 
0464   // ==========================================================================
0465   // Book 2D histogram with variable binning
0466   // ==========================================================================
0467   /** Book histogram and register it with the histogram data store
0468       @param full        Full path to the node of the object.
0469                          The basename (last part of the full)
0470                          has to be an integer number
0471                         (otherwise conversion to HBOOK is not possible)
0472       @param par         Path to parent node of the object,
0473                          the directory the histogram will be stored in.
0474       @param pPar        Pointer to parent node
0475       @param rel         Histogram identifier (std::string), the relative path
0476                          to the object with respect to the parent node
0477       @param hID         Histogram identifier (int) of the histogram
0478       @param title       Title property of the histogram
0479       @param x/y         Bin edges for variable binned histogram in X/Y.
0480   */
0481   AIDA::IHistogram2D* book( const std::string& full, const std::string& title, Edges x, Edges y ) override;
0482 
0483   AIDA::IHistogram2D* book( const std::string& par, const std::string& rel, const std::string& title, Edges x,
0484                             Edges y ) override;
0485 
0486   AIDA::IHistogram2D* book( const std::string& par, int hID, const std::string& title, Edges x, Edges y ) override;
0487 
0488   virtual AIDA::IHistogram2D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
0489                                     Edges y );
0490 
0491   AIDA::IHistogram2D* book( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y ) override;
0492 
0493   AIDA::IHistogram2D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
0494                             Edges y ) override;
0495 
0496   // ==========================================================================
0497   // Book 2D profile histogram with variable binning
0498   // ==========================================================================
0499   /** Book histogram and register it with the histogram data store
0500       @param full        Full path to the node of the object.
0501                          The basename (last part of the full)
0502                          has to be an integer number
0503                         (otherwise conversion to HBOOK is not possible)
0504       @param par         Path to parent node of the object,
0505                          the directory the histogram will be stored in.
0506       @param pPar        Pointer to parent node
0507       @param rel         Histogram identifier (std::string), the relative path
0508                          to the object with respect to the parent node
0509       @param hID         Histogram identifier (int) of the histogram
0510       @param title       Title property of the histogram
0511       @param x/y         Bin edges for variable binned histogram in X/Y.
0512   */
0513   AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, Edges x, Edges y ) override;
0514 
0515   AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges x,
0516                               Edges y ) override;
0517 
0518   AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, Edges x, Edges y ) override;
0519 
0520   AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y ) override;
0521 
0522   virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
0523                                       Edges y );
0524 
0525   AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
0526                               Edges y ) override;
0527 
0528   virtual AIDA::IProfile2D* bookProf( const std::string& full, const std::string& title, Edges x, Edges y, double upper,
0529                                       double lower );
0530 
0531   virtual AIDA::IProfile2D* bookProf( const std::string& par, const std::string& rel, const std::string& title, Edges x,
0532                                       Edges y, double upper, double lower );
0533 
0534   virtual AIDA::IProfile2D* bookProf( const std::string& par, int hID, const std::string& title, Edges x, Edges y,
0535                                       double upper, double lower );
0536 
0537   virtual AIDA::IProfile2D* bookProf( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y,
0538                                       double upper, double lower );
0539 
0540   virtual AIDA::IProfile2D* bookProf( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
0541                                       Edges y, double upper, double lower );
0542 
0543   virtual AIDA::IProfile2D* bookProf( DataObject* pPar, const std::string& rel, const std::string& title, Edges x,
0544                                       Edges y, double upper, double lower );
0545 
0546   // ==========================================================================
0547   // Book 3D histogram with fixed binning
0548   // ==========================================================================
0549   /** Book histogram and register it with the histogram data store
0550       @param full        Full path to the node of the object.
0551                          The basename (last part of the full)
0552                          has to be an integer number
0553                          (otherwise conversion to HBOOK is not possible)
0554       @param par         Path to parent node of the object,
0555                          the directory the histogram will be stored in.
0556       @param pPar        Pointer to parent node
0557       @param rel         Histogram identifier (std::string), the relative path
0558                          to the object with respect to the parent node
0559       @param hID         Histogram identifier (int) of the histogram
0560       @param title       Title property of the histogram
0561       @param n{x,y,z}    Number of bins on the axis X/Y/Z
0562       @param l{x,y,z}    Lower histogram edge on the axis X/Y/Z
0563       @param u{x,y,z}    Upper histogram edge on the axis X/Y/Z
0564   */
0565   AIDA::IHistogram3D* book( const std::string& full, const std::string& title, int nx, double lowx, double upx, int ny,
0566                             double lowy, double upy, int nz, double lowz, double upz ) override;
0567 
0568   AIDA::IHistogram3D* book( const std::string& par, const std::string& rel, const std::string& title, int nx,
0569                             double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz,
0570                             double upz ) override;
0571 
0572   AIDA::IHistogram3D* book( const std::string& par, int hID, const std::string& title, int nx, double lowx, double upx,
0573                             int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
0574 
0575   AIDA::IHistogram3D* book( DataObject* pPar, int hID, const std::string& title, int nx, double lowx, double upx,
0576                             int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
0577 
0578   virtual AIDA::IHistogram3D* book( const std::pair<std::string, std::string>& loc, const std::string& title, int nx,
0579                                     double lowx, double upx, int ny, double lowy, double upy, int nz, double lowz,
0580                                     double upz );
0581 
0582   AIDA::IHistogram3D* book( DataObject* pPar, const std::string& rel, const std::string& title, int nx, double lowx,
0583                             double upx, int ny, double lowy, double upy, int nz, double lowz, double upz ) override;
0584 
0585   // ==========================================================================
0586   // Book 3D histogram with variable binning
0587   // ==========================================================================
0588   /** Book histogram and register it with the histogram data store
0589       @param full        Full path to the node of the object.
0590                          The basename (last part of the full)
0591                          has to be an integer number
0592                         (otherwise conversion to HBOOK is not possible)
0593       @param par         Path to parent node of the object,
0594                          the directory the histogram will be stored in.
0595       @param pPar        Pointer to parent node
0596       @param rel     Histogram identifier (std::string), the relative path
0597                          to the object with respect to the parent node
0598       @param hID         Histogram identifier (int) of the histogram
0599       @param title       Title property of the histogram
0600       @param binsX/Y/Z   Number of bins on the axis X/Y/Z
0601       @param lowX/Y/Z    Lower histogram edge on the axis X/Y/Z
0602       @param highX/Y/Z   Upper histogram edge on the axis X/Y/Z
0603   */
0604   AIDA::IHistogram3D* book( const std::string& full, const std::string& title, Edges x, Edges y, Edges z ) override;
0605 
0606   AIDA::IHistogram3D* book( const std::string& par, const std::string& rel, const std::string& title, Edges x, Edges y,
0607                             Edges z ) override;
0608 
0609   AIDA::IHistogram3D* book( const std::string& par, int hID, const std::string& title, Edges x, Edges y,
0610                             Edges z ) override;
0611 
0612   AIDA::IHistogram3D* book( DataObject* pPar, int hID, const std::string& title, Edges x, Edges y, Edges z ) override;
0613 
0614   virtual AIDA::IHistogram3D* book( const std::pair<std::string, std::string>& loc, const std::string& title, Edges x,
0615                                     Edges y, Edges z );
0616 
0617   AIDA::IHistogram3D* book( DataObject* pPar, const std::string& rel, const std::string& title, Edges x, Edges y,
0618                             Edges z ) override;
0619 
0620   // ==========================================================================
0621   // Register histogram with the data store
0622   // ==========================================================================
0623   using DataSvc::registerObject;
0624   StatusCode registerObject( const std::string& parent, const std::string& rel, Base* obj ) override;
0625 
0626   StatusCode registerObject( Base* pPar, const std::string& rel, Base* obj ) override;
0627 
0628   StatusCode registerObject( const std::string& full, Base* obj ) override;
0629 
0630   StatusCode registerObject( DataObject* pPar, const std::string& rel, Base* obj ) override;
0631 
0632   // ==========================================================================
0633   // Unregister histogram from the data store
0634   // ==========================================================================
0635   StatusCode unregisterObject( Base* obj ) override;
0636 
0637   StatusCode unregisterObject( Base* obj, const std::string& objectPath ) override;
0638 
0639   StatusCode unregisterObject( Base* obj, int item ) override;
0640 
0641   // ==========================================================================
0642   // Retrieve histogram from data store
0643   // ==========================================================================
0644   StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram1D*& obj ) override;
0645 
0646   StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IProfile1D*& obj ) override;
0647 
0648   StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram2D*& obj ) override;
0649 
0650   StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IProfile2D*& obj ) override;
0651 
0652   StatusCode retrieveObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram3D*& obj ) override;
0653 
0654   StatusCode retrieveObject( const std::string& full, AIDA::IProfile1D*& obj ) override;
0655 
0656   StatusCode retrieveObject( const std::string& full, AIDA::IProfile2D*& obj ) override;
0657 
0658   StatusCode retrieveObject( const std::string& full, AIDA::IHistogram1D*& obj ) override;
0659 
0660   StatusCode retrieveObject( const std::string& full, AIDA::IHistogram2D*& obj ) override;
0661 
0662   StatusCode retrieveObject( const std::string& full, AIDA::IHistogram3D*& obj ) override;
0663 
0664   StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IProfile1D*& obj ) override;
0665 
0666   StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IProfile2D*& obj ) override;
0667 
0668   StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram1D*& obj ) override;
0669 
0670   StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram2D*& obj ) override;
0671 
0672   StatusCode retrieveObject( const std::string& parent, const std::string& rel, AIDA::IHistogram3D*& obj ) override;
0673 
0674   StatusCode retrieveObject( const std::string& parent, int item, AIDA::IProfile1D*& obj ) override;
0675 
0676   StatusCode retrieveObject( const std::string& parent, int item, AIDA::IProfile2D*& obj ) override;
0677 
0678   StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram1D*& obj ) override;
0679 
0680   StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram2D*& obj ) override;
0681 
0682   StatusCode retrieveObject( const std::string& parent, int item, AIDA::IHistogram3D*& obj ) override;
0683 
0684   StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
0685 
0686   StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
0687 
0688   StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
0689 
0690   StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
0691 
0692   StatusCode retrieveObject( DataObject* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
0693 
0694   StatusCode retrieveObject( DataObject* par, int item, AIDA::IProfile1D*& obj ) override;
0695 
0696   StatusCode retrieveObject( DataObject* par, int item, AIDA::IProfile2D*& obj ) override;
0697 
0698   StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram1D*& obj ) override;
0699 
0700   StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram2D*& obj ) override;
0701 
0702   StatusCode retrieveObject( DataObject* par, int item, AIDA::IHistogram3D*& obj ) override;
0703 
0704   StatusCode retrieveObject( Base* par, int item, AIDA::IProfile1D*& obj ) override;
0705 
0706   StatusCode retrieveObject( Base* par, int item, AIDA::IProfile2D*& obj ) override;
0707 
0708   StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram1D*& obj ) override;
0709 
0710   StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram2D*& obj ) override;
0711 
0712   StatusCode retrieveObject( Base* par, int item, AIDA::IHistogram3D*& obj ) override;
0713 
0714   StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
0715 
0716   StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
0717 
0718   StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
0719 
0720   StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
0721 
0722   StatusCode retrieveObject( Base* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
0723 
0724   // ==========================================================================
0725   // Find histogram identified by its full path in the data store
0726   // ==========================================================================
0727   StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IProfile1D*& obj ) override;
0728 
0729   StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IProfile2D*& obj ) override;
0730 
0731   StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram1D*& obj ) override;
0732 
0733   StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram2D*& obj ) override;
0734 
0735   StatusCode findObject( IRegistry* pReg, const std::string& path, AIDA::IHistogram3D*& obj ) override;
0736 
0737   StatusCode findObject( const std::string& full, AIDA::IProfile1D*& obj ) override;
0738 
0739   StatusCode findObject( const std::string& full, AIDA::IProfile2D*& obj ) override;
0740 
0741   StatusCode findObject( const std::string& full, AIDA::IHistogram1D*& obj ) override;
0742 
0743   StatusCode findObject( const std::string& full, AIDA::IHistogram2D*& obj ) override;
0744 
0745   StatusCode findObject( const std::string& full, AIDA::IHistogram3D*& obj ) override;
0746 
0747   StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IProfile1D*& obj ) override;
0748 
0749   StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IProfile2D*& obj ) override;
0750 
0751   StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram1D*& obj ) override;
0752 
0753   StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram2D*& obj ) override;
0754 
0755   StatusCode findObject( const std::string& par, const std::string& rel, AIDA::IHistogram3D*& obj ) override;
0756 
0757   StatusCode findObject( const std::string& par, int item, AIDA::IProfile1D*& obj ) override;
0758 
0759   StatusCode findObject( const std::string& par, int item, AIDA::IProfile2D*& obj ) override;
0760 
0761   StatusCode findObject( const std::string& par, int item, AIDA::IHistogram1D*& obj ) override;
0762 
0763   StatusCode findObject( const std::string& par, int item, AIDA::IHistogram2D*& obj ) override;
0764 
0765   StatusCode findObject( const std::string& par, int item, AIDA::IHistogram3D*& obj ) override;
0766 
0767   StatusCode findObject( DataObject* par, int item, AIDA::IProfile1D*& obj ) override;
0768 
0769   StatusCode findObject( DataObject* par, int item, AIDA::IProfile2D*& obj ) override;
0770 
0771   StatusCode findObject( DataObject* par, int item, AIDA::IHistogram1D*& obj ) override;
0772 
0773   StatusCode findObject( DataObject* par, int item, AIDA::IHistogram2D*& obj ) override;
0774 
0775   StatusCode findObject( DataObject* par, int item, AIDA::IHistogram3D*& obj ) override;
0776 
0777   StatusCode findObject( DataObject* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
0778 
0779   StatusCode findObject( DataObject* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
0780 
0781   StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
0782 
0783   StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
0784 
0785   StatusCode findObject( DataObject* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
0786 
0787   StatusCode findObject( Base* par, int item, AIDA::IProfile1D*& obj ) override;
0788 
0789   StatusCode findObject( Base* par, int item, AIDA::IProfile2D*& obj ) override;
0790 
0791   StatusCode findObject( Base* par, int item, AIDA::IHistogram1D*& obj ) override;
0792 
0793   StatusCode findObject( Base* par, int item, AIDA::IHistogram2D*& obj ) override;
0794 
0795   StatusCode findObject( Base* par, int item, AIDA::IHistogram3D*& obj ) override;
0796 
0797   StatusCode findObject( Base* par, const std::string& item, AIDA::IProfile1D*& obj ) override;
0798 
0799   StatusCode findObject( Base* par, const std::string& item, AIDA::IProfile2D*& obj ) override;
0800 
0801   StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram1D*& obj ) override;
0802 
0803   StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram2D*& obj ) override;
0804 
0805   StatusCode findObject( Base* par, const std::string& item, AIDA::IHistogram3D*& obj ) override;
0806 
0807   // ==========================================================================
0808   // Projections and slices.
0809   // ==========================================================================
0810   AIDA::IHistogram1D* projectionX( const std::string& name, const AIDA::IHistogram2D& h ) override;
0811 
0812   AIDA::IHistogram1D* projectionY( const std::string& name, const AIDA::IHistogram2D& h ) override;
0813 
0814   AIDA::IHistogram1D* sliceX( const std::string& name, const AIDA::IHistogram2D& h, int indexY ) override;
0815 
0816   AIDA::IHistogram1D* sliceY( const std::string& name, const AIDA::IHistogram2D& h, int indexX ) override;
0817 
0818   AIDA::IHistogram1D* sliceX( const std::string& name, const AIDA::IHistogram2D& h, int indexY1, int indexY2 ) override;
0819 
0820   AIDA::IHistogram1D* sliceY( const std::string& name, const AIDA::IHistogram2D& h, int indexX1, int indexX2 ) override;
0821 
0822   bool destroy( IBaseHistogram* hist ) override;
0823 
0824   AIDA::IHistogram1D* add( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
0825                            const AIDA::IHistogram1D& b ) override;
0826 
0827   AIDA::IHistogram1D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
0828                                 const AIDA::IHistogram1D& b ) override;
0829 
0830   AIDA::IHistogram1D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
0831                                 const AIDA::IHistogram1D& b ) override;
0832 
0833   AIDA::IHistogram1D* divide( const std::string& nameAndTitle, const AIDA::IHistogram1D& a,
0834                               const AIDA::IHistogram1D& b ) override;
0835 
0836   AIDA::IHistogram2D* add( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
0837                            const AIDA::IHistogram2D& b ) override;
0838 
0839   AIDA::IHistogram2D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
0840                                 const AIDA::IHistogram2D& b ) override;
0841 
0842   AIDA::IHistogram2D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
0843                                 const AIDA::IHistogram2D& b ) override;
0844 
0845   AIDA::IHistogram2D* divide( const std::string& nameAndTitle, const AIDA::IHistogram2D& a,
0846                               const AIDA::IHistogram2D& b ) override;
0847 
0848   AIDA::IHistogram3D* add( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
0849                            const AIDA::IHistogram3D& b ) override;
0850 
0851   AIDA::IHistogram3D* subtract( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
0852                                 const AIDA::IHistogram3D& b ) override;
0853 
0854   AIDA::IHistogram3D* multiply( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
0855                                 const AIDA::IHistogram3D& b ) override;
0856 
0857   AIDA::IHistogram3D* divide( const std::string& nameAndTitle, const AIDA::IHistogram3D& a,
0858                               const AIDA::IHistogram3D& b ) override;
0859 
0860   AIDA::IHistogram2D* projectionXY( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
0861 
0862   AIDA::IHistogram2D* projectionXZ( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
0863 
0864   AIDA::IHistogram2D* projectionYZ( const std::string& nameAndTitle, const AIDA::IHistogram3D& h ) override;
0865 
0866   AIDA::IHistogram2D* sliceXY( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
0867                                int /* high */ ) override {
0868     not_implemented();
0869     return nullptr;
0870   }
0871 
0872   AIDA::IHistogram2D* sliceXZ( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
0873                                int /* high */ ) override {
0874     not_implemented();
0875     return nullptr;
0876   }
0877 
0878   AIDA::IHistogram2D* sliceYZ( const std::string& /* nameAndTitle */, const AIDA::IHistogram3D& /* h */, int /* low */,
0879                                int /* high */ ) override {
0880     not_implemented();
0881     return nullptr;
0882   }
0883 
0884   AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, int nx, double lowx,
0885                                          double upx );
0886 
0887   AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, int nx, double lowx,
0888                                          double upx, const std::string& /*opt*/ ) override;
0889 
0890   AIDA::IHistogram1D* createHistogram1D( const std::string& name, const std::string& title, const Edges& x,
0891                                          const std::string& /*opt*/ ) override;
0892 
0893   AIDA::IHistogram1D* createHistogram1D( const std::string& nameAndTitle, int nx, double lowx, double upx ) override;
0894 
0895   AIDA::IHistogram1D* createCopy( const std::string& full, const AIDA::IHistogram1D& h ) override;
0896 
0897   AIDA::IHistogram1D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram1D& h );
0898 
0899   AIDA::IHistogram1D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram1D& h );
0900 
0901   AIDA::IHistogram1D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram1D& h );
0902 
0903   AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, int nx, double lowx,
0904                                          double upx, int ny, double lowy, double upy );
0905 
0906   AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, int nx, double lowx,
0907                                          double upx, int ny, double lowy, double upy,
0908                                          const std::string& /*opt*/ ) override;
0909 
0910   AIDA::IHistogram2D* createHistogram2D( const std::string& name, const std::string& title, const Edges& x,
0911                                          const Edges& y, const std::string& /*opt*/ ) override;
0912 
0913   AIDA::IHistogram2D* createHistogram2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
0914                                          double lowy, double upy ) override;
0915 
0916   AIDA::IHistogram2D* createCopy( const std::string& full, const AIDA::IHistogram2D& h ) override;
0917 
0918   AIDA::IHistogram2D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram2D& h );
0919 
0920   AIDA::IHistogram2D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram2D& h );
0921 
0922   AIDA::IHistogram2D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram2D& h );
0923 
0924   AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, int nx, double lowx,
0925                                          double upx, int ny, double lowy, double upy, int nz, double lowz, double upz );
0926 
0927   AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, int nx, double lowx,
0928                                          double upx, int ny, double lowy, double upy, int nz, double lowz, double upz,
0929                                          const std::string& /*opt*/ ) override;
0930 
0931   AIDA::IHistogram3D* createHistogram3D( const std::string& name, const std::string& title, const Edges& x,
0932                                          const Edges& y, const Edges& z, const std::string& /*opt*/ ) override;
0933 
0934   AIDA::IHistogram3D* createHistogram3D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
0935                                          double lowy, double upy, int nz, double lowz, double upz ) override;
0936 
0937   AIDA::IHistogram3D* createCopy( const std::string& full, const AIDA::IHistogram3D& h ) override;
0938 
0939   AIDA::IHistogram3D* createCopy( const std::string& par, const std::string& rel, const AIDA::IHistogram3D& h );
0940 
0941   AIDA::IHistogram3D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IHistogram3D& h );
0942 
0943   AIDA::IHistogram3D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IHistogram3D& h );
0944 
0945   AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0946                                      const std::string& opt ) override;
0947 
0948   AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0949                                      double upper, double lower, const std::string& opt ) override;
0950 
0951   AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, const Edges& x,
0952                                      const std::string& /* opt */ ) override;
0953 
0954   AIDA::IProfile1D* createProfile1D( const std::string& name, const std::string& title, const Edges& x, double upper,
0955                                      double lower, const std::string& /* opt */ ) override;
0956 
0957   AIDA::IProfile1D* createProfile1D( const std::string& nametit, int nx, double lowx, double upx ) override;
0958 
0959   AIDA::IProfile1D* createProfile1D( const std::string& nametit, int nx, double lowx, double upx, double upper,
0960                                      double lower ) override;
0961 
0962   AIDA::IProfile1D* createCopy( const std::string& full, const AIDA::IProfile1D& h ) override;
0963 
0964   AIDA::IProfile1D* createCopy( const std::string& par, const std::string& rel, const AIDA::IProfile1D& h );
0965 
0966   AIDA::IProfile1D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IProfile1D& h );
0967 
0968   AIDA::IProfile1D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IProfile1D& h );
0969 
0970   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0971                                      int ny, double lowy, double upy );
0972 
0973   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0974                                      int ny, double lowy, double upy, const std::string& /*opt*/ ) override;
0975 
0976   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, const Edges& x, const Edges& y,
0977                                      const std::string& /*opt*/ ) override;
0978 
0979   AIDA::IProfile2D* createProfile2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
0980                                      double lowy, double upy ) override;
0981 
0982   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0983                                      int ny, double lowy, double upy, double upper, double lower );
0984 
0985   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, int nx, double lowx, double upx,
0986                                      int ny, double lowy, double upy, double upper, double lower,
0987                                      const std::string& /*opt*/ ) override;
0988 
0989   AIDA::IProfile2D* createProfile2D( const std::string& name, const std::string& title, const Edges& x, const Edges& y,
0990                                      double upper, double lower, const std::string& /*opt*/ ) override;
0991 
0992   AIDA::IProfile2D* createProfile2D( const std::string& nameAndTitle, int nx, double lowx, double upx, int ny,
0993                                      double lowy, double upy, double upper, double lower ) override;
0994 
0995   AIDA::IProfile2D* createCopy( const std::string& full, const AIDA::IProfile2D& h ) override;
0996 
0997   AIDA::IProfile2D* createCopy( const std::string& par, const std::string& rel, const AIDA::IProfile2D& h );
0998 
0999   AIDA::IProfile2D* createCopy( const std::pair<std::string, std::string>& loc, const AIDA::IProfile2D& h );
1000 
1001   AIDA::IProfile2D* createCopy( DataObject* pPar, const std::string& rel, const AIDA::IProfile2D& h );
1002 
1003   AIDA::ICloud1D* createCloud1D( const std::string&, const std::string&, int, const std::string& ) override {
1004     not_implemented();
1005     return nullptr;
1006   }
1007 
1008   AIDA::ICloud1D* createCloud1D( const std::string& ) override {
1009     not_implemented();
1010     return nullptr;
1011   }
1012 
1013   AIDA::ICloud1D* createCopy( const std::string&, const AIDA::ICloud1D& ) override {
1014     not_implemented();
1015     return nullptr;
1016   }
1017 
1018   AIDA::ICloud2D* createCloud2D( const std::string&, const std::string&, int, const std::string& ) override {
1019     not_implemented();
1020     return nullptr;
1021   }
1022 
1023   AIDA::ICloud2D* createCloud2D( const std::string& ) override {
1024     not_implemented();
1025     return nullptr;
1026   }
1027 
1028   AIDA::ICloud2D* createCopy( const std::string&, const AIDA::ICloud2D& ) override {
1029     not_implemented();
1030     return nullptr;
1031   }
1032 
1033   AIDA::ICloud3D* createCloud3D( const std::string&, const std::string&, int, const std::string& ) override {
1034     not_implemented();
1035     return nullptr;
1036   }
1037 
1038   AIDA::ICloud3D* createCloud3D( const std::string& ) override {
1039     not_implemented();
1040     return nullptr;
1041   }
1042 
1043   AIDA::ICloud3D* createCopy( const std::string&, const AIDA::ICloud3D& ) override {
1044     not_implemented();
1045     return nullptr;
1046   }
1047 
1048   /// Avoids a compiler warning about hidden functions.
1049   using IDataProviderSvc::findObject;
1050   using IDataProviderSvc::registerObject;
1051   using IDataProviderSvc::retrieveObject;
1052   using IDataProviderSvc::unregisterObject;
1053 
1054   /// Print (ASCII) the 1D histogram into the output stream
1055   std::ostream& print( Base* h, std::ostream& s = std::cout ) const override;
1056 
1057   /// Write (ASCII) the 1D histogram table into the output stream
1058   std::ostream& write( Base* h, std::ostream& s = std::cout ) const override;
1059 
1060   /// Write (ASCII) the 1D histogram table into a file
1061   int write( Base* h, const char* file_name ) const override;
1062 
1063   /// Create all directories in a given full path
1064   DataObject* createPath( const std::string& newPath ) override;
1065 
1066   /** Create a sub-directory in a directory.
1067    *  @param parentDir name of the parent directory
1068    *  @param subDir to identify the histogram object in the store
1069    */
1070   DataObject* createDirectory( const std::string& parentDir, const std::string& subDir ) override;
1071 
1072   typedef std::map<std::string, Gaudi::Histo1DDef> Histo1DMap;
1073 
1074 private:
1075   /// handler to be invoked for updating property m_defs1D
1076   void update1Ddefs();
1077 
1078   /// extracts the path of an histogram from the related DataObject
1079   std::string buildHistoPath( DataObject const* pPar, std::string const& rel );
1080 
1081   Gaudi::Property<DBaseEntries> m_input{ this, "Input", {}, "input streams" };
1082   Gaudi::Property<Histo1DMap>   m_defs1D{
1083       this, "Predefined1DHistos", {}, &HistogramSvc::update1Ddefs, "histograms with predefined parameters" };
1084 
1085   // modified histograms:
1086   std::set<std::string> m_mods1D;
1087 };
1088 #endif // GAUDISVC_HISTOGRAMSVC_H