00001 #ifndef FWCore_Sources_ProducerSourceFromFiles_h 00002 #define FWCore_Sources_ProducerSourceFromFiles_h 00003 00004 /*---------------------------------------------------------------------- 00005 ----------------------------------------------------------------------*/ 00006 00007 #include <memory> 00008 #include <vector> 00009 #include <string> 00010 00011 #include "FWCore/Sources/interface/ProducerSourceBase.h" 00012 #include "FWCore/Catalog/interface/InputFileCatalog.h" 00013 00014 namespace edm { 00015 class ParameterSet; 00016 class ParameterSetDescription; 00017 00018 class ProducerSourceFromFiles : public ProducerSourceBase { 00019 public: 00020 ProducerSourceFromFiles(ParameterSet const& pset, InputSourceDescription const& desc, bool realData); 00021 virtual ~ProducerSourceFromFiles(); 00022 00023 std::vector<std::string> const& logicalFileNames() const {return catalog_.logicalFileNames();} 00024 std::vector<std::string> const& fileNames() const {return catalog_.fileNames();} 00025 InputFileCatalog& catalog() {return catalog_;} 00026 00027 static void fillDescription(ParameterSetDescription& desc); 00028 00029 protected: 00030 void incrementFileIndex() {++fileIndex_;} 00031 00032 private: 00033 virtual bool noFiles() const; 00034 virtual size_t fileIndex() const; 00035 00036 size_t fileIndex_; 00037 InputFileCatalog catalog_; 00038 }; 00039 } 00040 #endif