CMS 3D CMS Logo

RootEmbeddedFileSequence.h
Go to the documentation of this file.
1 #ifndef IOPool_Input_RootEmbeddedFileSequence_h
2 #define IOPool_Input_RootEmbeddedFileSequence_h
3 
4 /*----------------------------------------------------------------------
5 
6 RootEmbeddedFileSequence: This is an InputSource
7 
8 ----------------------------------------------------------------------*/
9 
10 #include "RootInputFileSequence.h"
14 
15 #include <memory>
16 #include <string>
17 #include <vector>
18 
19 namespace CLHEP {
20  class HepRandomEngine;
21 }
22 
23 namespace edm {
24 
25  class BranchID;
26  class FileCatalogItem;
27  class InputFileCatalog;
29  class EmbeddedRootSource;
30  class RootFile;
31 
33  public:
36  InputFileCatalog const& catalog);
37  ~RootEmbeddedFileSequence() override;
38 
39  RootEmbeddedFileSequence(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
40  RootEmbeddedFileSequence& operator=(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
41 
42  void endJob();
43  void skipEntries(unsigned int offset);
44  bool readOneEvent(
45  EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id, bool recycleFiles);
46  bool readOneRandom(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*, bool);
48  EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id, bool);
49  bool readOneSequential(
50  EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*, bool recycleFiles);
52  EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id, bool);
53  void readOneSpecified(EventPrincipal& cache, size_t& fileNameHash, SecondaryEventIDAndFileInfo const& id);
54 
56 
57  private:
58  void closeFile_() override;
59  void initFile_(bool skipBadFiles) override;
60  RootFileSharedPtr makeRootFile(std::shared_ptr<InputFile> filePtr) override;
61 
63 
64  std::vector<ProcessHistoryID> orderedProcessHistoryIDs_;
65 
68  bool (RootEmbeddedFileSequence::*fptr_)(EventPrincipal&, size_t&, CLHEP::HepRandomEngine*, EventID const*, bool);
71  unsigned int treeCacheSize_;
74  unsigned int maxFileSkips_;
75  }; // class RootEmbeddedFileSequence
76 } // namespace edm
77 #endif
RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
bool(RootEmbeddedFileSequence::* fptr_)(EventPrincipal &, size_t &, CLHEP::HepRandomEngine *, EventID const *, bool)
bool readOneRandomWithID(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id, bool)
void readOneSpecified(EventPrincipal &cache, size_t &fileNameHash, SecondaryEventIDAndFileInfo const &id)
bool readOneSequentialWithID(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id, bool)
void initFile_(bool skipBadFiles) override
bool readOneRandom(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *, bool)
static std::string const input
Definition: EdmProvDump.cc:47
std::shared_ptr< RootFile > RootFileSharedPtr
bool readOneEvent(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id, bool recycleFiles)
bool readOneSequential(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *, bool recycleFiles)
static void fillDescription(ParameterSetDescription &desc)
HLT enums.
RootEmbeddedFileSequence & operator=(RootEmbeddedFileSequence const &)=delete
def cache(function)
Definition: utilities.py:3
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
void skipEntries(unsigned int offset)
RootEmbeddedFileSequence(ParameterSet const &pset, EmbeddedRootSource &input, InputFileCatalog const &catalog)