Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:06

0001 #ifndef FWCore_Framework_SignallingProductRegistry_h
0002 #define FWCore_Framework_SignallingProductRegistry_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     Framework
0006 // Class  :     SignallingProductRegistry
0007 //
0008 /**\class SignallingProductRegistry SignallingProductRegistry.h FWCore/Framework/interface/SignallingProductRegistry.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Chris Jones
0018 //         Created:  Fri Sep 23 16:47:10 CEST 2005
0019 //
0020 
0021 // system include files
0022 #include <map>
0023 #include <string>
0024 
0025 #include "FWCore/Utilities/interface/Signal.h"
0026 
0027 // user include files
0028 #include "DataFormats/Provenance/interface/ProductRegistry.h"
0029 
0030 // forward declarations
0031 namespace edm {
0032   class SignallingProductRegistry : public ProductRegistry {
0033   public:
0034     SignallingProductRegistry() : ProductRegistry(), productAddedSignal_(), typeAddedStack_() {}
0035     explicit SignallingProductRegistry(ProductRegistry const& preg)
0036         : ProductRegistry(preg.productList(), false), productAddedSignal_(), typeAddedStack_() {}
0037     signalslot::Signal<void(BranchDescription const&)> productAddedSignal_;
0038 
0039     SignallingProductRegistry(SignallingProductRegistry const&) = delete;             // Disallow copying and moving
0040     SignallingProductRegistry& operator=(SignallingProductRegistry const&) = delete;  // Disallow copying and moving
0041 
0042   private:
0043     void addCalled(BranchDescription const&, bool) override;
0044     // ---------- member data --------------------------------
0045     std::map<std::string, unsigned int> typeAddedStack_;
0046   };
0047 }  // namespace edm
0048 
0049 #endif