File indexing completed on 2024-04-06 12:13:07
0001 #ifndef FWCore_Services_SiteLocalConfigService_H
0002 #define FWCore_Services_SiteLocalConfigService_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include <string>
0013 #include <list>
0014 #include <vector>
0015 #include "FWCore/Catalog/interface/SiteLocalConfig.h"
0016 #include "FWCore/Utilities/interface/propagate_const.h"
0017 #include "tinyxml2.h"
0018
0019
0020
0021
0022 namespace edm {
0023 class ParameterSet;
0024 }
0025
0026
0027
0028
0029
0030 namespace edm {
0031 class ConfigurationDescriptions;
0032 namespace service {
0033
0034 class SiteLocalConfigService : public SiteLocalConfig {
0035 public:
0036 explicit SiteLocalConfigService(ParameterSet const& pset);
0037
0038 std::vector<std::string> const& trivialDataCatalogs() const override;
0039 std::vector<edm::CatalogAttributes> const& dataCatalogs() const override;
0040 std::filesystem::path const storageDescriptionPath(edm::CatalogAttributes const& aDataCatalog) const override;
0041 std::string const lookupCalibConnect(std::string const& input) const override;
0042 std::string const rfioType(void) const override;
0043
0044 std::string const* sourceCacheTempDir() const override;
0045 double const* sourceCacheMinFree() const override;
0046 std::string const* sourceCacheHint() const override;
0047 std::string const* sourceCloneCacheHint() const override;
0048 std::string const* sourceReadHint() const override;
0049 unsigned int const* sourceTTreeCacheSize() const override;
0050 unsigned int const* sourceTimeout() const override;
0051 bool enablePrefetching() const override;
0052 unsigned int debugLevel() const override;
0053 std::vector<std::string> const* sourceNativeProtocols() const override;
0054 struct addrinfo const* statisticsDestination() const override;
0055 std::set<std::string> const* statisticsInfo() const override;
0056 std::string const& siteName() const override;
0057 std::string const& subSiteName() const override;
0058 bool useLocalConnectString() const override;
0059 std::string const& localConnectPrefix() const override;
0060 std::string const& localConnectSuffix() const override;
0061
0062
0063
0064 ~SiteLocalConfigService() override;
0065
0066 static void fillDescriptions(ConfigurationDescriptions& descriptions);
0067
0068 private:
0069 void getCatalog(tinyxml2::XMLElement const& cat, std::string site, std::string subSite);
0070 void parse(std::string const& url);
0071 void computeStatisticsDestination();
0072 std::string const frontierConnect(std::string const& servlet) const;
0073 std::string m_url;
0074 std::vector<std::string> m_trivialDataCatalogs;
0075 std::vector<edm::CatalogAttributes> m_dataCatalogs;
0076 std::string m_frontierConnect;
0077 std::string m_rfioType;
0078 bool m_connected;
0079 std::string m_cacheTempDir;
0080 std::string const* m_cacheTempDirPtr;
0081 double m_cacheMinFree;
0082 double const* m_cacheMinFreePtr;
0083 std::string m_cacheHint;
0084 std::string const* m_cacheHintPtr;
0085 std::string m_cloneCacheHint;
0086 std::string const* m_cloneCacheHintPtr;
0087 std::string m_readHint;
0088 std::string const* m_readHintPtr;
0089 unsigned int m_ttreeCacheSize;
0090 unsigned int const* m_ttreeCacheSizePtr;
0091 unsigned int m_timeout;
0092 unsigned int const* m_timeoutPtr;
0093 unsigned int m_debugLevel;
0094 bool m_enablePrefetching;
0095 bool const* m_enablePrefetchingPtr;
0096 std::vector<std::string> m_nativeProtocols;
0097 std::vector<std::string> const* m_nativeProtocolsPtr;
0098 std::string m_statisticsDestination;
0099 edm::propagate_const<struct addrinfo*> m_statisticsAddrInfo;
0100 static const std::string m_statisticsDefaultPort;
0101 std::set<std::string> m_statisticsInfo;
0102 bool m_statisticsInfoAvail;
0103 std::string m_siteName;
0104 std::string m_subSiteName;
0105 bool m_useLocalConnectString = false;
0106 std::string m_localConnectPrefix;
0107 std::string m_localConnectSuffix;
0108 };
0109
0110 inline bool isProcessWideService(SiteLocalConfigService const*) { return true; }
0111 }
0112 }
0113
0114
0115
0116
0117 #endif