CMS 3D CMS Logo

EDInputSource.h

Go to the documentation of this file.
00001 #ifndef FWCore_Sources_EDInputSource_h
00002 #define FWCore_Sources_EDInputSource_h
00003 
00004 /*----------------------------------------------------------------------
00005 $Id: EDInputSource.h,v 1.5 2008/03/14 03:46:24 wmtan Exp $
00006 ----------------------------------------------------------------------*/
00007 
00008 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00009 #include "DataFormats/Provenance/interface/RunID.h"
00010 #include "FWCore/Framework/interface/InputSource.h"
00011 #include "FWCore/Catalog/interface/FileCatalog.h"
00012 #include "FWCore/Catalog/interface/InputFileCatalog.h"
00013 #include <vector>
00014 #include <string>
00015 
00016 namespace edm {
00017   class InputSourceDescription;
00018   class ParameterSet;
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   private:
00036     virtual void setRun(RunNumber_t);
00037     virtual void setLumi(LuminosityBlockNumber_t lb);
00038     
00039     PoolCatalog poolCatalog_;
00040     InputFileCatalog catalog_;
00041     InputFileCatalog secondaryCatalog_;
00042   };
00043 }
00044 #endif

Generated on Tue Jun 9 17:36:40 2009 for CMSSW by  doxygen 1.5.4