Back to home page

EIC code displayed by LXR

 
 

    


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

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 GAUDIKERNEL_THREADLOCALCONTEXT_H
0012 #define GAUDIKERNEL_THREADLOCALCONTEXT_H 1
0013 
0014 #include <cstddef>
0015 
0016 #include "GaudiKernel/Kernel.h"
0017 
0018 class EventContext;
0019 
0020 namespace Gaudi {
0021   namespace Hive {
0022     /// Internal type used for the ContextId.
0023     typedef std::size_t ContextIdType;
0024 
0025     /// Return the current context id.
0026     /// The returned id is valid only within the (sys)Execute method of
0027     /// algorithms.
0028     GAUDI_API ContextIdType       currentContextId();
0029     GAUDI_API ContextIdType       currentContextEvt();
0030     GAUDI_API const EventContext& currentContext();
0031 
0032     /// Used by the framework to change the value of the current context id.
0033     GAUDI_API void setCurrentContextId( ContextIdType newId );
0034     GAUDI_API void setCurrentContextEvt( long int evtN );
0035     GAUDI_API void setCurrentContextId( ContextIdType newId, long int evtN );
0036     GAUDI_API void setCurrentContextId( const EventContext* ctx );
0037     GAUDI_API void setCurrentContext( const EventContext* ctx );
0038     GAUDI_API void setCurrentContext( const EventContext& ctx );
0039   } // namespace Hive
0040 } // namespace Gaudi
0041 
0042 #endif