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"
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  virtual ~RootEmbeddedFileSequence();
38 
39  RootEmbeddedFileSequence(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
40  RootEmbeddedFileSequence& operator=(RootEmbeddedFileSequence const&) = delete; // Disallow copying and moving
41 
42  virtual void closeFile_() override;
43  void endJob();
44  void skipEntries(unsigned int offset);
45  bool readOneEvent(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
46  bool readOneRandom(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*);
47  bool readOneRandomWithID(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
48  bool readOneSequential(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const*);
49  bool readOneSequentialWithID(EventPrincipal& cache, size_t& fileNameHash, CLHEP::HepRandomEngine*, EventID const* id);
50  void readOneSpecified(EventPrincipal& cache, size_t& fileNameHash, SecondaryEventIDAndFileInfo const& id);
51 
52  static void fillDescription(ParameterSetDescription & desc);
53  private:
54  virtual void initFile_(bool skipBadFiles) override;
55  virtual RootFileSharedPtr makeRootFile(std::shared_ptr<InputFile> filePtr) override;
56 
58 
59  std::vector<ProcessHistoryID> orderedProcessHistoryIDs_;
60 
63  bool (RootEmbeddedFileSequence::* fptr_)(EventPrincipal&, size_t&, CLHEP::HepRandomEngine*, EventID const*);
67  }; // class RootEmbeddedFileSequence
68 }
69 #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:44
bool readOneRandomWithID(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)
std::shared_ptr< RootFile > RootFileSharedPtr
bool readOneSequential(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *)
bool readOneRandom(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *)
bool readOneEvent(EventPrincipal &cache, size_t &fileNameHash, CLHEP::HepRandomEngine *, EventID const *id)
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
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
void skipEntries(unsigned int offset)
RootEmbeddedFileSequence(ParameterSet const &pset, EmbeddedRootSource &input, InputFileCatalog const &catalog)