CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
fwlite::InputSource Class Reference

#include <InputSource.h>

Public Member Functions

const std::vector< std::string > & files () const
 return vector of files_ More...
 
 InputSource ()
 empty constructor More...
 
 InputSource (const edm::ParameterSet &cfg)
 default constructor from parameter set More...
 
int maxEvents () const
 return maxEvetns_ More...
 
unsigned int reportAfter () const
 return reportAfter_ More...
 

Protected Attributes

std::vector< std::string > files_
 vector of input files More...
 
int maxEvents_
 maximal number of events to loop More...
 
unsigned int reportAfter_
 report after N events More...
 

Detailed Description

Definition at line 19 of file InputSource.h.

Constructor & Destructor Documentation

◆ InputSource() [1/2]

fwlite::InputSource::InputSource ( )
inline

empty constructor

Definition at line 22 of file InputSource.h.

22 { throw cms::Exception("InvalidInput") << "Must specify a vstring fileNames" << std::endl; }

References Exception.

◆ InputSource() [2/2]

fwlite::InputSource::InputSource ( const edm::ParameterSet cfg)
inline

default constructor from parameter set

Definition at line 24 of file InputSource.h.

25  : maxEvents_(-1),
26  reportAfter_(10),
27  files_(cfg.getParameterSet("fwliteInput").getParameter<std::vector<std::string> >("fileNames")) {
28  // optional parameter
29  if (cfg.getParameterSet("fwliteInput").existsAs<int>("maxEvents")) {
30  maxEvents_ = cfg.getParameterSet("fwliteInput").getParameter<int>("maxEvents");
31  }
32  // optional parameter
33  if (cfg.getParameterSet("fwliteInput").existsAs<unsigned int>("outputEvery")) {
34  reportAfter_ = cfg.getParameterSet("fwliteInput").getParameter<unsigned int>("outputEvery");
35  }
36  }

References looper::cfg, maxEvents_, and reportAfter_.

Member Function Documentation

◆ files()

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

return vector of files_

Definition at line 38 of file InputSource.h.

38 { return files_; }

References files_.

◆ maxEvents()

int fwlite::InputSource::maxEvents ( ) const
inline

return maxEvetns_

Definition at line 40 of file InputSource.h.

40 { return maxEvents_; }

References maxEvents_.

◆ reportAfter()

unsigned int fwlite::InputSource::reportAfter ( ) const
inline

return reportAfter_

Definition at line 42 of file InputSource.h.

42 { return reportAfter_; }

References reportAfter_.

Member Data Documentation

◆ files_

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

vector of input files

Definition at line 50 of file InputSource.h.

Referenced by files().

◆ maxEvents_

int fwlite::InputSource::maxEvents_
protected

maximal number of events to loop

Definition at line 46 of file InputSource.h.

Referenced by InputSource(), and maxEvents().

◆ reportAfter_

unsigned int fwlite::InputSource::reportAfter_
protected

report after N events

Definition at line 48 of file InputSource.h.

Referenced by InputSource(), and reportAfter().

fwlite::InputSource::files_
std::vector< std::string > files_
vector of input files
Definition: InputSource.h:50
fwlite::InputSource::reportAfter_
unsigned int reportAfter_
report after N events
Definition: InputSource.h:48
looper.cfg
cfg
Definition: looper.py:296
Exception
Definition: hltDiff.cc:245
fwlite::InputSource::maxEvents_
int maxEvents_
maximal number of events to loop
Definition: InputSource.h:46