CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PoolSource.h
Go to the documentation of this file.
1 #ifndef IOPool_Input_PoolSource_h
2 #define IOPool_Input_PoolSource_h
3 
4 /*----------------------------------------------------------------------
5 
6 PoolSource: This is an InputSource
7 
8 ----------------------------------------------------------------------*/
9 
15 
16 #include "boost/shared_ptr.hpp"
17 
18 #include <array>
19 #include <memory>
20 #include <string>
21 #include <vector>
22 
23 namespace edm {
24 
26  class FileCatalogItem;
27  class RootInputFileSequence;
28 
29  class PoolSource : public VectorInputSource {
30  public:
31  explicit PoolSource(ParameterSet const& pset, InputSourceDescription const& desc);
32  virtual ~PoolSource();
34 
35  static void fillDescriptions(ConfigurationDescriptions & descriptions);
36 
37  private:
38  virtual EventPrincipal* readEvent_(EventPrincipal& eventPrincipal);
39  virtual boost::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
40  virtual boost::shared_ptr<LuminosityBlockPrincipal> readLuminosityBlock_(boost::shared_ptr<LuminosityBlockPrincipal> lumiPrincipal);
41  virtual boost::shared_ptr<RunAuxiliary> readRunAuxiliary_();
42  virtual boost::shared_ptr<RunPrincipal> readRun_(boost::shared_ptr<RunPrincipal> runPrincipal);
43  virtual std::unique_ptr<FileBlock> readFile_();
44  virtual void closeFile_();
45  virtual void endJob();
46  virtual ItemType getNextItemType();
47  virtual EventPrincipal* readIt(EventID const& id, EventPrincipal& eventPrincipal);
48  virtual void skip(int offset);
49  virtual bool goToEvent_(EventID const& eventID);
50  virtual void rewind_();
55  virtual EventPrincipal* readOneSpecified(EventPrincipal& cache, EventID const& id);
56  virtual void dropUnwantedBranches_(std::vector<std::string> const& wantedBranches);
57  virtual void preForkReleaseResources();
58  virtual bool randomAccess_() const;
61 
63  std::unique_ptr<RootInputFileSequence> primaryFileSequence_;
64  std::unique_ptr<RootInputFileSequence> secondaryFileSequence_;
65  boost::shared_ptr<RunPrincipal> secondaryRunPrincipal_;
66  boost::shared_ptr<LuminosityBlockPrincipal> secondaryLumiPrincipal_;
67  std::unique_ptr<EventPrincipal> secondaryEventPrincipal_;
68  std::array<std::vector<BranchID>, NumBranchTypes> branchIDsToReplace_;
69  }; // class PoolSource
71 }
72 #endif
virtual boost::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: PoolSource.cc:124
PoolSource(ParameterSet const &pset, InputSourceDescription const &desc)
Definition: PoolSource.cc:54
PoolSource PoolRASource
Definition: PoolSource.h:70
virtual std::unique_ptr< FileBlock > readFile_()
Definition: PoolSource.cc:111
virtual ProcessingController::ForwardState forwardState_() const
Definition: PoolSource.cc:289
virtual EventPrincipal * readIt(EventID const &id, EventPrincipal &eventPrincipal)
Definition: PoolSource.cc:202
virtual boost::shared_ptr< LuminosityBlockPrincipal > readLuminosityBlock_(boost::shared_ptr< LuminosityBlockPrincipal > lumiPrincipal)
Definition: PoolSource.cc:156
virtual bool goToEvent_(EventID const &eventID)
Definition: PoolSource.cc:231
std::unique_ptr< RootInputFileSequence > secondaryFileSequence_
Definition: PoolSource.h:64
virtual EventPrincipal * readOneSequential(EventPrincipal &cache)
Definition: PoolSource.cc:248
virtual EventPrincipal * readOneRandomWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
Definition: PoolSource.cc:242
virtual EventPrincipal * readOneSpecified(EventPrincipal &cache, EventID const &id)
Definition: PoolSource.cc:260
virtual void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)
Definition: PoolSource.cc:266
virtual bool randomAccess_() const
Definition: PoolSource.cc:284
virtual ProcessingController::ReverseState reverseState_() const
Definition: PoolSource.cc:294
boost::shared_ptr< RunPrincipal > secondaryRunPrincipal_
Definition: PoolSource.h:65
virtual ~PoolSource()
Definition: PoolSource.cc:101
std::unique_ptr< EventPrincipal > secondaryEventPrincipal_
Definition: PoolSource.h:67
unsigned int offset(bool)
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: PoolSource.cc:272
virtual EventPrincipal * readOneRandom(EventPrincipal &cache)
Definition: PoolSource.cc:236
virtual void rewind_()
Definition: PoolSource.cc:220
ProductRegistry & productRegistryUpdate() const
Definition: InputSource.h:316
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:68
virtual void endJob()
Definition: PoolSource.cc:104
std::unique_ptr< RootInputFileSequence > primaryFileSequence_
Definition: PoolSource.h:63
virtual void closeFile_()
Definition: PoolSource.cc:119
boost::shared_ptr< RunPrincipal > const runPrincipal() const
RootServiceChecker rootServiceChecker_
Definition: PoolSource.h:62
virtual EventPrincipal * readOneSequentialWithID(EventPrincipal &cache, LuminosityBlockID const &lumiID)
Definition: PoolSource.cc:254
virtual ItemType getNextItemType()
Definition: PoolSource.cc:209
virtual void skip(int offset)
Definition: PoolSource.cc:226
boost::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
Definition: PoolSource.h:66
virtual void preForkReleaseResources()
Definition: PoolSource.cc:214
virtual boost::shared_ptr< RunPrincipal > readRun_(boost::shared_ptr< RunPrincipal > runPrincipal)
Definition: PoolSource.cc:134
virtual boost::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: PoolSource.cc:129
virtual EventPrincipal * readEvent_(EventPrincipal &eventPrincipal)
Definition: PoolSource.cc:179