00001 #ifndef FWCore_Sources_EDInputSource_h 00002 #define FWCore_Sources_EDInputSource_h 00003 00004 /*---------------------------------------------------------------------- 00005 ----------------------------------------------------------------------*/ 00006 00007 #include "DataFormats/Provenance/interface/LuminosityBlockID.h" 00008 #include "DataFormats/Provenance/interface/RunID.h" 00009 #include "FWCore/Catalog/interface/InputFileCatalog.h" 00010 #include "FWCore/Framework/interface/InputSource.h" 00011 #include <vector> 00012 #include <string> 00013 00014 namespace edm { 00015 struct InputSourceDescription; 00016 class ParameterSet; 00017 class ParameterSetDescription; 00018 00019 class EDInputSource : public InputSource { 00020 public: 00021 explicit EDInputSource(ParameterSet const& pset, InputSourceDescription const& desc); 00022 virtual ~EDInputSource(); 00023 00024 std::vector<std::string> const& logicalFileNames(int n = 0) const { 00025 return n ? secondaryCatalog_.logicalFileNames() : catalog_.logicalFileNames(); 00026 } 00027 std::vector<std::string> const& fileNames(int n = 0) const { 00028 return n ? secondaryCatalog_.fileNames() : catalog_.fileNames(); 00029 } 00030 std::vector<FileCatalogItem> const& fileCatalogItems(int n = 0) const { 00031 return n ? secondaryCatalog_.fileCatalogItems() : catalog_.fileCatalogItems(); 00032 } 00033 InputFileCatalog& catalog(int n = 0) {return n ? secondaryCatalog_ : catalog_;} 00034 00035 static void fillDescription(ParameterSetDescription& desc); 00036 00037 private: 00038 virtual void setRun(RunNumber_t); 00039 virtual void setLumi(LuminosityBlockNumber_t lb); 00040 00041 InputFileCatalog catalog_; 00042 InputFileCatalog secondaryCatalog_; 00043 }; 00044 } 00045 #endif