Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-07-12 08:35:57

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2024 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 #pragma once
0012 // ============================================================================
0013 // Include files
0014 // ============================================================================
0015 #include <GaudiKernel/Kernel.h>
0016 // ============================================================================
0017 // Forward declarations
0018 // ============================================================================
0019 namespace AIDA {
0020   class IBaseHistogram;
0021   class IHistogram;
0022   class IHistogram1D;
0023   class IHistogram2D;
0024   class IHistogram3D;
0025   class IProfile1D;
0026   class IProfile2D;
0027 } // namespace AIDA
0028 // ============================================================================
0029 // ROOT
0030 // ============================================================================
0031 class TH1D;
0032 class TH2D;
0033 class TH3D;
0034 class TProfile;
0035 class TProfile2D;
0036 class TObject;
0037 // ============================================================================
0038 namespace Gaudi {
0039   namespace Utils {
0040     // ========================================================================
0041     /** @class Aida2ROOT Aida2ROOT.h GaudiKernel/Aida2ROOT.h
0042      *
0043      *  Accessor to underlying ROOT-representation of
0044      *  transient histograms
0045      *  The actual code is imported from Bender project.
0046      *
0047      *  It relies on PI implementation of AIDA interface,
0048      *  modified by Markus FRANK.
0049      *
0050      *  @see Gaudi::H1D
0051      *  @see Gaudi::H2D
0052      *  @see Gaudi::H3D
0053      *  @see Gaudi::Profile1D
0054      *  @see Gaudi::Profile2D
0055      *
0056      *  @see AIDA::IHistogram1D
0057      *  @see AIDA::IHistogram2D
0058      *  @see AIDA::IHistogram3D
0059      *  @see AIDA::IProfile1D
0060      *  @see AIDA::IProfile2D
0061      *
0062      *  @author Vanya BELYAEV ibelyaev@physics.syr.edu
0063      *  @date   2007-01-23
0064      */
0065     class GAUDI_API Aida2ROOT {
0066     public:
0067       /// get the underlying pointer for 1D-histogram
0068       static TH1D*       aida2root( AIDA::IHistogram1D* aida );
0069       static const TH1D* aida2root( const AIDA::IHistogram1D* aida );
0070       /// get the underlying pointer for 2D-histogram
0071       static TH2D*       aida2root( AIDA::IHistogram2D* aida );
0072       static const TH2D* aida2root( const AIDA::IHistogram2D* aida );
0073       /// get the underlying pointer for 3D-histogram
0074       static TH3D*       aida2root( AIDA::IHistogram3D* aida );
0075       static const TH3D* aida2root( const AIDA::IHistogram3D* aida );
0076       /// get the underlying pointer for 1D-profile
0077       static TProfile*       aida2root( AIDA::IProfile1D* aida );
0078       static const TProfile* aida2root( const AIDA::IProfile1D* aida );
0079       /// get the underlying pointer for 2D-profile
0080       static TProfile2D*       aida2root( AIDA::IProfile2D* aida );
0081       static const TProfile2D* aida2root( const AIDA::IProfile2D* aida );
0082       /// get root representation for other cases
0083       static TObject*       aida2root( AIDA::IHistogram* aida );
0084       static const TObject* aida2root( const AIDA::IHistogram* aida );
0085     };
0086     // ========================================================================
0087   } // namespace Utils
0088   // ==========================================================================
0089 } // end of namespace Gaudi