CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
VectorInputSource.h
Go to the documentation of this file.
1 #ifndef FWCore_Sources_VectorInputSource_h
2 #define FWCore_Sources_VectorInputSource_h
3 
4 /*----------------------------------------------------------------------
5 VectorInputSource: Abstract interface for vector input sources.
6 ----------------------------------------------------------------------*/
7 
9 
10 #include "boost/shared_ptr.hpp"
11 
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 namespace edm {
17  class EventPrincipal;
18  struct InputSourceDescription;
19  class ParameterSet;
21  public:
22  typedef boost::shared_ptr<EventPrincipal> EventPrincipalVectorElement;
23  typedef std::vector<EventPrincipalVectorElement> EventPrincipalVector;
24  explicit VectorInputSource(ParameterSet const& pset, InputSourceDescription const& desc);
25  virtual ~VectorInputSource();
26 
27  void readMany(int number, EventPrincipalVector& result);
28  void readManyRandom(int number, EventPrincipalVector& result, unsigned int& fileSeqNumber);
29  void readManySequential(int number, EventPrincipalVector& result, unsigned int& fileSeqNumber);
30  void readManySpecified(std::vector<EventID> const& events, EventPrincipalVector& result);
31  void dropUnwantedBranches(std::vector<std::string> const& wantedBranches);
32 
33  private:
34  virtual void readMany_(int number, EventPrincipalVector& result) = 0;
35  virtual void readManyRandom_(int number, EventPrincipalVector& result, unsigned int& fileSeqNumber) = 0;
36  virtual void readManySequential_(int number, EventPrincipalVector& result, unsigned int& fileSeqNumber) = 0;
37  virtual void readManySpecified_(std::vector<EventID> const& events, EventPrincipalVector& result) = 0;
38  virtual void dropUnwantedBranches_(std::vector<std::string> const& wantedBranches) = 0;
39  };
40 }
41 #endif
virtual void readManySpecified_(std::vector< EventID > const &events, EventPrincipalVector &result)=0
void dropUnwantedBranches(std::vector< std::string > const &wantedBranches)
virtual void readManySequential_(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)=0
void readMany(int number, EventPrincipalVector &result)
void readManyRandom(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)
tuple result
Definition: query.py:137
virtual void readManyRandom_(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)=0
std::vector< EventPrincipalVectorElement > EventPrincipalVector
void readManySequential(int number, EventPrincipalVector &result, unsigned int &fileSeqNumber)
VectorInputSource(ParameterSet const &pset, InputSourceDescription const &desc)
boost::shared_ptr< EventPrincipal > EventPrincipalVectorElement
tuple events
Definition: patZpeak.py:19
virtual void readMany_(int number, EventPrincipalVector &result)=0
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)=0
void readManySpecified(std::vector< EventID > const &events, EventPrincipalVector &result)