CMS 3D CMS Logo

Public Member Functions | Protected Attributes

fwlite::InputSource Class Reference

Helper class to handle FWLite file input sources. More...

#include <InputSource.h>

List of all members.

Public Member Functions

std::vector< std::string > const & files () const
 InputSource (edm::ParameterSet const &pset)
 InputSource ()
int maxEvents () const
unsigned int reportAfter () const

Protected Attributes

std::vector< std::string > files_
int maxEvents_
unsigned int reportAfter_

Detailed Description

Helper class to handle FWLite file input sources.

This is a very simple class to handle the appropriate python configuration of input files in FWLite.

Author:
Salvatore Rappoccio

Definition at line 20 of file InputSource.h.


Constructor & Destructor Documentation

fwlite::InputSource::InputSource ( ) [inline]

Definition at line 22 of file InputSource.h.

References Exception.

                  {
      throw cms::Exception("InvalidInput") << "Must specify a vstring fileNames" << std::endl;
    }
fwlite::InputSource::InputSource ( edm::ParameterSet const &  pset) [inline]

Definition at line 25 of file InputSource.h.

References edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), maxEvents_, and reportAfter_.

                                                :
      files_( pset.getParameter<edm::ParameterSet>("fwliteInput").getParameter<std::vector<std::string> >("fileNames") )
        {
          if(pset.getParameter<edm::ParameterSet>("fwliteInput").exists("maxEvents")){ 
            maxEvents_=pset.getParameter<edm::ParameterSet>("fwliteInput").getParameter<int>("maxEvents"); 
          }
          if(pset.getParameter<edm::ParameterSet>("fwliteInput").exists("outputEvery")){ 
            reportAfter_=pset.getParameter<edm::ParameterSet>("fwliteInput").getParameter<unsigned int>("outputEvery"); 
          }
        }

Member Function Documentation

std::vector<std::string> const& fwlite::InputSource::files ( ) const [inline]

Definition at line 36 of file InputSource.h.

References files_.

{ return files_; }
int fwlite::InputSource::maxEvents ( ) const [inline]

Definition at line 38 of file InputSource.h.

References maxEvents_.

{ return maxEvents_; }
unsigned int fwlite::InputSource::reportAfter ( ) const [inline]

Definition at line 39 of file InputSource.h.

References reportAfter_.

{ return reportAfter_;}

Member Data Documentation

std::vector<std::string> fwlite::InputSource::files_ [protected]

Definition at line 42 of file InputSource.h.

Referenced by files().

Definition at line 43 of file InputSource.h.

Referenced by InputSource(), and maxEvents().

unsigned int fwlite::InputSource::reportAfter_ [protected]

Definition at line 44 of file InputSource.h.

Referenced by InputSource(), and reportAfter().