CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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"
15 
16 #include <memory>
17 #include <string>
18 #include <vector>
19 
20 namespace CLHEP {
21  class HepRandomEngine;
22 }
23 
24 namespace edm {
25 
26  class BranchID;
27  class FileCatalogItem;
28  class InputFileCatalog;
30  class EmbeddedRootSource;
31  class RootFile;
32 
34  public:
35  explicit RootEmbeddedFileSequence(ParameterSet const& pset,
38  unsigned int nStreams);
39  virtual ~RootEmbeddedFileSequence();
40 
41  RootEmbeddedFileSequence(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
42  RootEmbeddedFileSequence& operator=(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
43 
44  typedef std::shared_ptr<RootFile> RootFileSharedPtr;
45  virtual void closeFile_() override;
46  void endJob();
47  void skipEntries(unsigned int offset);
48  bool readOneEvent(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
49  bool readOneRandom(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*);
50  bool readOneRandomWithID(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
51  bool readOneSequential(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*);
52  bool readOneSequentialWithID(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
53  void readOneSpecified(EventPrincipal& cache, size_t& fileNameHash, SecondaryEventIDAndFileInfo const& id);
54 
55  void dropUnwantedBranches_(std::vector<std::string> const& wantedBranches);
56  static void fillDescription(ParameterSetDescription & desc);
57  private:
58  virtual void initFile_(bool skipBadFiles) override;
59  virtual RootFileSharedPtr makeRootFile(std::shared_ptr<InputFile> filePtr) override;
60 
62 
63  std::vector<ProcessHistoryID> orderedProcessHistoryIDs_;
64 
65  unsigned int nStreams_;
68  bool (RootEmbeddedFileSequence::* fptr_)(EventPrincipal&, size_t&, CLHEP::HepRandomEngine*, EventID const*);
76  }; // class RootEmbeddedFileSequence
77 }
78 #endif
bool(RootEmbeddedFileSequence::* fptr_)(EventPrincipal &, size_t &, CLHEP::HepRandomEngine *, EventID const *)
virtual RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
void readOneSpecified(EventPrincipal &cache, size_t &fileNameHash, SecondaryEventIDAndFileInfo const &id)
virtual void initFile_(bool skipBadFiles) override
static std::string const input
Definition: EdmProvDump.cc:43
bool readOneRandomWithID(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)
bool readOneSequential(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *)
bool readOneRandom(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *)
RootEmbeddedFileSequence(ParameterSet const &pset, EmbeddedRootSource &input, InputFileCatalog const &catalog, unsigned int nStreams)
bool readOneEvent(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)
ProductSelectorRules productSelectorRules_
bool readOneSequentialWithID(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)
static void fillDescription(ParameterSetDescription &desc)
tuple skipBadFiles
Definition: example_cfg.py:64
RootEmbeddedFileSequence & operator=(RootEmbeddedFileSequence const &)=delete
void dropUnwantedBranches_(std::vector< std::string > const &wantedBranches)
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
void skipEntries(unsigned int offset)
std::shared_ptr< RootFile > RootFileSharedPtr