Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef FWCore_Concurrency_SharedResourceNames_h
0002 #define FWCore_Concurrency_SharedResourceNames_h
0003 //
0004 // Package: Concurrency
0005 // Class : ShareResourceNames
0006 //
0007 /**\class edm::SharedResourceNames
0008 
0009 Description: Contains the names of external shared resources.
0010 
0011 */
0012 //
0013 // Original Author: W. David Dagenhart
0014 // Created: 19 November 2013
0015 //
0016 
0017 #include <string>
0018 
0019 namespace edm {
0020   class SharedResourceNames {
0021   public:
0022     // GEANT 4.9.X needs to be declared a shared resource
0023     // In the future, 4.10.X and later might not need to be
0024     static const std::string kGEANT;
0025     static const std::string kCLHEPRandomEngine;
0026     static const std::string kPythia6;
0027     static const std::string kPythia8;
0028     static const std::string kPhotos;
0029     static const std::string kTauola;
0030     static const std::string kEvtGen;
0031   };
0032 
0033   //ES modules can not share resources with ED modules
0034   class ESSharedResourceNames {
0035   public:
0036     static const std::string kDDGeometry;
0037     static const std::string kDD4hep;
0038   };
0039 
0040   // Each time the following function is called, it returns a different
0041   // name.  The purpose is to address the following problem.
0042   // A few classes that are modules sometimes use shared resources
0043   // and sometimes do not use shared resources. It depends on their
0044   // configuration and also on their template parameters. These classes
0045   // have to always inherit from the SharedResources base class. If
0046   // they do not declare any share resources the Framework assumes
0047   // they depend on all possible shared resources. This causes performance
0048   // problems. In the cases where they really do not use any shared
0049   // resources, one has to declare something to avoid the default
0050   // assumption that they depend on everything. If a nonexistent
0051   // shared resource is declared and as long as nothing else declares
0052   // the same shared resource name, there will be no performance effects.
0053   // This function provides a unique name to be used for that purpose.
0054   std::string uniqueSharedResourceName();
0055 }  // namespace edm
0056 #endif