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 
16 
17 #include <array>
18 #include <memory>
19 #include <string>
20 #include <vector>
21 
22 namespace edm {
23 
25  class FileCatalogItem;
26  class RootPrimaryFileSequence;
27  class RootSecondaryFileSequence;
28 
29  class PoolSource : public InputSource {
30  public:
31  explicit PoolSource(ParameterSet const& pset, InputSourceDescription const& desc);
32  virtual ~PoolSource();
35 
36  static void fillDescriptions(ConfigurationDescriptions& descriptions);
37 
38  private:
39  virtual void readEvent_(EventPrincipal& eventPrincipal);
40  virtual std::shared_ptr<LuminosityBlockAuxiliary> readLuminosityBlockAuxiliary_();
41  virtual void readLuminosityBlock_(LuminosityBlockPrincipal& lumiPrincipal);
42  virtual std::shared_ptr<RunAuxiliary> readRunAuxiliary_();
43  virtual void readRun_(RunPrincipal& runPrincipal);
44  virtual std::unique_ptr<FileBlock> readFile_();
45  virtual void closeFile_();
46  virtual void endJob();
47  virtual ItemType getNextItemType();
48  virtual bool readIt(EventID const& id, EventPrincipal& eventPrincipal, StreamContext& streamContext) override;
49  virtual void skip(int offset);
50  virtual bool goToEvent_(EventID const& eventID);
51  virtual void rewind_();
52  virtual void preForkReleaseResources();
53  virtual bool randomAccess_() const;
56 
58 
62  std::unique_ptr<RootPrimaryFileSequence> primaryFileSequence_;
63  std::unique_ptr<RootSecondaryFileSequence> secondaryFileSequence_;
64  std::shared_ptr<RunPrincipal> secondaryRunPrincipal_;
65  std::shared_ptr<LuminosityBlockPrincipal> secondaryLumiPrincipal_;
66  std::vector<std::unique_ptr<EventPrincipal>> secondaryEventPrincipals_;
67  std::array<std::vector<BranchID>, NumBranchTypes> branchIDsToReplace_;
68 
69  std::unique_ptr<SharedResourcesAcquirer> resourceSharedWithDelayedReaderPtr_;
70  }; // class PoolSource
71 }
72 #endif
PoolSource(ParameterSet const &pset, InputSourceDescription const &desc)
Definition: PoolSource.cc:64
InputFileCatalog catalog_
Definition: PoolSource.h:60
std::unique_ptr< SharedResourcesAcquirer > resourceSharedWithDelayedReaderPtr_
Definition: PoolSource.h:69
virtual std::unique_ptr< FileBlock > readFile_()
Definition: PoolSource.cc:147
virtual ProcessingController::ForwardState forwardState_() const
Definition: PoolSource.cc:318
virtual bool goToEvent_(EventID const &eventID)
Definition: PoolSource.cc:288
std::shared_ptr< RunPrincipal > secondaryRunPrincipal_
Definition: PoolSource.h:64
std::unique_ptr< RootPrimaryFileSequence > primaryFileSequence_
Definition: PoolSource.h:62
std::shared_ptr< LuminosityBlockPrincipal > secondaryLumiPrincipal_
Definition: PoolSource.h:65
virtual bool randomAccess_() const
Definition: PoolSource.cc:313
virtual ProcessingController::ReverseState reverseState_() const
Definition: PoolSource.cc:323
std::shared_ptr< RunPrincipal > const runPrincipal() const
virtual ~PoolSource()
Definition: PoolSource.cc:137
SharedResourcesAcquirer * resourceSharedWithDelayedReader_() const override
Definition: PoolSource.cc:271
virtual void readRun_(RunPrincipal &runPrincipal)
Definition: PoolSource.cc:170
virtual std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: PoolSource.cc:165
InputFileCatalog secondaryCatalog_
Definition: PoolSource.h:61
static void fillDescriptions(ConfigurationDescriptions &descriptions)
Definition: PoolSource.cc:293
virtual void rewind_()
Definition: PoolSource.cc:277
ProductRegistry & productRegistryUpdate() const
Definition: InputSource.h:345
virtual bool readIt(EventID const &id, EventPrincipal &eventPrincipal, StreamContext &streamContext) override
Definition: PoolSource.cc:241
virtual void readEvent_(EventPrincipal &eventPrincipal)
Definition: PoolSource.cc:219
std::array< std::vector< BranchID >, NumBranchTypes > branchIDsToReplace_
Definition: PoolSource.h:67
virtual void endJob()
Definition: PoolSource.cc:140
virtual void closeFile_()
Definition: PoolSource.cc:155
RootServiceChecker rootServiceChecker_
Definition: PoolSource.h:59
virtual ItemType getNextItemType()
Definition: PoolSource.cc:250
virtual void skip(int offset)
Definition: PoolSource.cc:283
ProcessHistoryRegistry & processHistoryRegistryForUpdate() const
Definition: InputSource.h:346
virtual void preForkReleaseResources()
Definition: PoolSource.cc:266
std::unique_ptr< RootSecondaryFileSequence > secondaryFileSequence_
Definition: PoolSource.h:63
std::vector< std::unique_ptr< EventPrincipal > > secondaryEventPrincipals_
Definition: PoolSource.h:66
virtual std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: PoolSource.cc:160
virtual void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: PoolSource.cc:194