Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00: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 //====================================================================
0012 //  NTuple name space: Selector class definition
0013 //--------------------------------------------------------------------
0014 //
0015 //  Package    : Gaudi/NTupleSvc ( The LHCb Offline System)
0016 //  Author     : M.Frank
0017 //
0018 //  +---------+----------------------------------------------+--------+
0019 //  |    Date |                 Comment                      | Who    |
0020 //  +---------+----------------------------------------------+--------+
0021 //  | 10/10/00| Initial version.                             | MF     |
0022 //  +---------+----------------------------------------------+--------+
0023 //====================================================================
0024 #ifndef GAUDI_NTUPLESVC_SELECTOR_H
0025 #define GAUDI_NTUPLESVC_SELECTOR_H 1
0026 
0027 // Framework include files
0028 #include "GaudiKernel/SelectStatement.h"
0029 
0030 // Forward declarations
0031 namespace NTuple {
0032   class Tuple;
0033 }
0034 
0035 namespace NTuple {
0036 
0037   /** NTuple Selector class.
0038    */
0039   class GAUDI_API Selector : public SelectStatement {
0040   protected:
0041     /// reference to parent interface
0042     IInterface* m_parent;
0043     /// Boolean to indicate need for initialization
0044     bool m_firstCall;
0045     /// StatusCode indication initialization result
0046     StatusCode m_status;
0047 
0048   public:
0049     /// Standard constructor
0050     Selector( IInterface* svc ) : m_parent( svc ), m_firstCall( true ) {}
0051     /// Standard Destructor
0052     virtual ~Selector() = default;
0053     /// Check for first call
0054     bool firstCall() const { return m_firstCall; }
0055     /// Access initialization status
0056     StatusCode initResult() const { return m_status; }
0057     /// Default callback from interface
0058     bool operator()( void* nt ) override;
0059     /// Specialized callback for NTuples
0060     virtual bool operator()( NTuple::Tuple* nt );
0061     /// Selector Initialization
0062     virtual StatusCode initialize( NTuple::Tuple* nt );
0063   };
0064 } // namespace NTuple
0065 #endif // GAUDI_NTUPLESVC_SELECTOR_H