Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:57:34

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 #ifndef GAUDIALG_ITUPLETOOL_H
0012 #define GAUDIALG_ITUPLETOOL_H 1
0013 // ============================================================================
0014 // Include files
0015 // ============================================================================
0016 // STD & STL
0017 // ============================================================================
0018 #include <string>
0019 // ============================================================================
0020 // Gaudi
0021 // ============================================================================
0022 #include "GaudiKernel/ClassID.h"
0023 #include "GaudiKernel/IAlgTool.h"
0024 // ============================================================================
0025 // GaudiAlg
0026 // ============================================================================
0027 #include "GaudiAlg/Tuple.h"
0028 #include "GaudiAlg/TupleID.h"
0029 // ============================================================================
0030 
0031 // ============================================================================
0032 /** @class ITupleTool ITupleTool.h GaudiTools/ITupleTool.h
0033  *
0034  *
0035  *  @author Vanya BELYAEV Ivan.Belyaev@itep.ru
0036  *  @date   2004-06-28
0037  */
0038 // ============================================================================
0039 
0040 class GAUDI_API ITupleTool : virtual public IAlgTool {
0041 public:
0042   /// InterfaceID
0043   DeclareInterfaceID( ITupleTool, 2, 0 );
0044 
0045   typedef Tuples::TupleID TupleID;
0046   typedef Tuples::Tuple   Tuple;
0047 
0048   /** get N-tuple object ( book on-demand ) with unique identifier
0049    *
0050    *  @code
0051    *
0052    *  ITupleTool* tool = .. ;
0053    *  Tuple tuple = tool->nTuple( 'My tuple' ) ;
0054    *  tuple->column( "A" , sin(0.1) );
0055    *  tuple->column( "B" , cos(0.1) );
0056    *  tuple->column( "C" , tan(0.1) );
0057    *  tuple->write()
0058    *
0059    *  @endcode
0060    *
0061    *  NTuple will be booked with automatically assigned numerical ID
0062    *
0063    *  @param title unique title for ntuple
0064    *  @param clid  class identifier
0065    *  @return ntuple object
0066    */
0067   virtual Tuple nTuple( const std::string& title, const CLID& clid = CLID_ColumnWiseTuple ) const = 0;
0068 
0069   virtual Tuple nTuple( const TupleID& ID, const std::string& title = "",
0070                         const CLID& clid = CLID_ColumnWiseTuple ) const = 0;
0071 
0072   virtual Tuple evtCol( const std::string& title, const CLID& clid = CLID_RowWiseTuple ) const = 0;
0073 
0074   virtual Tuple evtCol( const TupleID& ID, const std::string& title = "",
0075                         const CLID& clid = CLID_RowWiseTuple ) const = 0;
0076 };
0077 
0078 // ============================================================================
0079 #endif // GAUDIALG_ITUPLETOOL_H