Go to the documentation of this file.00001 #include "FWCore/Sources/interface/ProducerSourceFromFiles.h"
00002 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00003 #include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
00004
00005 namespace edm {
00006 ProducerSourceFromFiles::ProducerSourceFromFiles(ParameterSet const& pset, InputSourceDescription const& desc, bool realData) :
00007 ProducerSourceBase(pset, desc, realData), fileIndex_(0),
00008 catalog_(pset.getUntrackedParameter<std::vector<std::string> >("fileNames"),
00009 pset.getUntrackedParameter<std::string>("overrideCatalog", std::string())) {
00010 }
00011
00012 ProducerSourceFromFiles::~ProducerSourceFromFiles() {}
00013
00014 void
00015 ProducerSourceFromFiles::fillDescription(ParameterSetDescription & desc) {
00016 std::vector<std::string> defaultStrings;
00017 desc.addUntracked<std::vector<std::string> >("fileNames", defaultStrings)
00018 ->setComment("Names of files to be processed.");
00019 desc.addUntracked<std::string>("overrideCatalog", std::string());
00020 ProducerSourceBase::fillDescription(desc);
00021 }
00022
00023 bool
00024 ProducerSourceFromFiles::noFiles() const {
00025 return catalog_.fileCatalogItems().empty();
00026 }
00027
00028 size_t
00029 ProducerSourceFromFiles::fileIndex() const {
00030 return fileIndex_;
00031 }
00032 }
00033
00034