CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

edm::EDInputSource Class Reference

#include <EDInputSource.h>

Inheritance diagram for edm::EDInputSource:
edm::InputSource edm::ProductRegistryHelper edm::VectorInputSource edm::PoolSource

List of all members.

Public Member Functions

InputFileCatalogcatalog (int n=0)
 EDInputSource (ParameterSet const &pset, InputSourceDescription const &desc)
std::vector< FileCatalogItem >
const & 
fileCatalogItems (int n=0) const
std::vector< std::string > const & fileNames (int n=0) const
std::vector< std::string > const & logicalFileNames (int n=0) const
virtual ~EDInputSource ()

Static Public Member Functions

static void fillDescription (ParameterSetDescription &desc)

Private Member Functions

virtual void setLumi (LuminosityBlockNumber_t lb)
virtual void setRun (RunNumber_t)

Private Attributes

InputFileCatalog catalog_
InputFileCatalog secondaryCatalog_

Detailed Description

Definition at line 19 of file EDInputSource.h.


Constructor & Destructor Documentation

edm::EDInputSource::EDInputSource ( ParameterSet const &  pset,
InputSourceDescription const &  desc 
) [explicit]

Definition at line 17 of file EDInputSource.cc.

References edm::errors::Configuration, edm::InputFileCatalog::empty(), Exception, edm::ParameterSet::getUntrackedParameter(), and secondaryCatalog_.

                                                                                           :
      InputSource(pset, desc),
      catalog_(pset.getUntrackedParameter<std::vector<std::string> >("fileNames"),
        pset.getUntrackedParameter<std::string>("overrideCatalog", std::string())),
      secondaryCatalog_(pset.getUntrackedParameter<std::vector<std::string> >("secondaryFileNames", std::vector<std::string>()),
        pset.getUntrackedParameter<std::string>("overrideCatalog", std::string())) {

     if (secondaryCatalog_.empty() && pset.getUntrackedParameter<bool>("needSecondaryFileNames", false)) {
        throw Exception(errors::Configuration, "EDInputSource") << "'secondaryFileNames' must be specified\n";
     }
  }
edm::EDInputSource::~EDInputSource ( ) [virtual]

Definition at line 29 of file EDInputSource.cc.

                                {
  }

Member Function Documentation

InputFileCatalog& edm::EDInputSource::catalog ( int  n = 0) [inline]

Definition at line 33 of file EDInputSource.h.

References catalog_, n, and secondaryCatalog_.

std::vector<FileCatalogItem> const& edm::EDInputSource::fileCatalogItems ( int  n = 0) const [inline]

Definition at line 30 of file EDInputSource.h.

References catalog_, edm::InputFileCatalog::fileCatalogItems(), n, and secondaryCatalog_.

                                                                        {
      return n ? secondaryCatalog_.fileCatalogItems() : catalog_.fileCatalogItems();
    }
std::vector<std::string> const& edm::EDInputSource::fileNames ( int  n = 0) const [inline]

Definition at line 27 of file EDInputSource.h.

References catalog_, edm::InputFileCatalog::fileNames(), n, and secondaryCatalog_.

                                                           {
      return n ? secondaryCatalog_.fileNames() : catalog_.fileNames();
    }
void edm::EDInputSource::fillDescription ( ParameterSetDescription desc) [static]

Reimplemented from edm::InputSource.

Definition at line 47 of file EDInputSource.cc.

References edm::ParameterSetDescription::addUntracked().

                                                               {
    std::vector<std::string> defaultStrings;
    desc.addUntracked<std::vector<std::string> >("fileNames")
        ->setComment("Names of files to be processed.");
    desc.addUntracked<std::vector<std::string> >("secondaryFileNames", defaultStrings)
        ->setComment("Names of secondary files to be processed.");
    desc.addUntracked<bool>("needSecondaryFileNames", false)
        ->setComment("If True, 'secondaryFileNames' must be specified and be non-empty.");
    desc.addUntracked<std::string>("overrideCatalog", std::string());
    InputSource::fillDescription(desc);
  }
std::vector<std::string> const& edm::EDInputSource::logicalFileNames ( int  n = 0) const [inline]

Definition at line 24 of file EDInputSource.h.

References catalog_, edm::InputFileCatalog::logicalFileNames(), n, and secondaryCatalog_.

                                                                  {
      return n ? secondaryCatalog_.logicalFileNames() : catalog_.logicalFileNames();
    }
void edm::EDInputSource::setLumi ( LuminosityBlockNumber_t  lb) [private, virtual]

Reimplemented from edm::InputSource.

Definition at line 40 of file EDInputSource.cc.

                                                {
      LogWarning("IllegalCall")
        << "EDInputSource::setLumi()\n"
        << "Luminosity Block ID cannot be modified for an EDInputSource\n";
  }
void edm::EDInputSource::setRun ( RunNumber_t  ) [private, virtual]

Reimplemented from edm::InputSource.

Definition at line 33 of file EDInputSource.cc.

                                   {
      LogWarning("IllegalCall")
        << "EDInputSource::setRun()\n"
        << "Run number cannot be modified for an EDInputSource\n";
  }

Member Data Documentation

Definition at line 41 of file EDInputSource.h.

Referenced by catalog(), fileCatalogItems(), fileNames(), and logicalFileNames().

Definition at line 42 of file EDInputSource.h.

Referenced by catalog(), EDInputSource(), fileCatalogItems(), fileNames(), and logicalFileNames().