Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:07:13

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_ICOUNTERSUMMARYSVC_H
0012 #define GAUDIKERNEL_ICOUNTERSUMMARYSVC_H
0013 
0014 // Include files
0015 #include "GaudiKernel/IService.h"
0016 #include <string>
0017 
0018 // forward declarations
0019 class StatEntity;
0020 class Stat;
0021 
0022 namespace Gaudi {
0023   namespace CounterSummary {
0024     /// How is the counter to be saved?
0025     enum SaveType {
0026       SaveSimpleCounter = 0,   /// store only the flag()
0027       SaveStatEntity,          /// store all information
0028       SaveAlwaysSimpleCounter, /// store always, store only the flag()
0029       SaveAlwaysStatEntity     /// store always, store all information
0030     };
0031   } // namespace CounterSummary
0032 } // namespace Gaudi
0033 
0034 /** @class ICounterSummarySvc ICounterSummarySvc.h
0035  *
0036  *  Simple service interface to collect counters to persist in a summary file.
0037  *  In LHCb this is used to write an XML summary of the job.
0038  *
0039  *  @see XMLSummarySvc
0040  *
0041  *  @author Rob Lambert
0042  *  @date   2009-07-29
0043  */
0044 class GAUDI_API ICounterSummarySvc : virtual public IService {
0045 
0046 public:
0047   /// InterfaceID
0048   DeclareInterfaceID( ICounterSummarySvc, 1, 0 );
0049 
0050   /** declare a counter, StatEntity, to be filled in the Counter summary
0051    *  @param  std::string  [IN]:  Name of the tool/alg/mother filling this counter
0052    *  @param  std::string name  [IN]:  Name of the counter
0053    *  @param  StatEntity   [IN]: The counter to store/save
0054    *  @param  saveType   [IN]: How to save it, from an enum
0055    *
0056    *  @see Gaudi::CounterSummary::SaveType
0057    */
0058   virtual void
0059   addCounter( const std::string, const std::string name, const StatEntity&,
0060               const Gaudi::CounterSummary::SaveType saveType = Gaudi::CounterSummary::SaveSimpleCounter ) = 0;
0061 
0062   /** declare a counter, Stat, to be filled in the Counter summary
0063    *  @param  std::string  [IN]:  Name of the tool/alg/mother filling this counter
0064    *  @param  std::string name  [IN]:  Name of the counter
0065    *  @param  Stat   [IN]: The counter to store/save
0066    *  @param  saveType   [IN]: How to save it, from an enum
0067    *
0068    *  @see Gaudi::CounterSummary::SaveType
0069    */
0070   virtual void
0071   addCounter( const std::string, const std::string name, const Stat&,
0072               const Gaudi::CounterSummary::SaveType saveType = Gaudi::CounterSummary::SaveSimpleCounter ) = 0;
0073 };
0074 
0075 #endif