CMS 3D CMS Logo

RootPrimaryFileSequence.h
Go to the documentation of this file.
1 #ifndef IOPool_Input_RootPrimaryFileSequence_h
2 #define IOPool_Input_RootPrimaryFileSequence_h
3 
4 /*----------------------------------------------------------------------
5 
6 RootPrimaryFileSequence: This is an InputSource
7 
8 ----------------------------------------------------------------------*/
9 
10 #include "RootInputFileSequence.h"
19 
20 #include <memory>
21 #include <string>
22 #include <vector>
23 
24 namespace edm {
25 
26  class BranchID;
27  class DuplicateChecker;
28  class FileCatalogItem;
29  class InputFileCatalog;
31  class PoolSource;
32  class RootFile;
33 
35  public:
37  ~RootPrimaryFileSequence() override;
38 
39  RootPrimaryFileSequence(RootPrimaryFileSequence const&) = delete; // Disallow copying and moving
40  RootPrimaryFileSequence& operator=(RootPrimaryFileSequence const&) = delete; // Disallow copying and moving
41 
42  std::unique_ptr<FileBlock> readFile_();
43  void closeFile_() override;
44  void endJob();
46  bool skipEvents(int offset);
47  bool goToEvent(EventID const& eventID);
48  void rewind_();
52 
53  private:
54  void initFile_(bool skipBadFiles) override;
55  RootFileSharedPtr makeRootFile(std::shared_ptr<InputFile> filePtr) override;
56  bool nextFile();
57  bool previousFile();
58  void rewindFile();
59 
60  int remainingEvents() const;
61  int remainingLuminosityBlocks() const;
62 
64  bool firstFile_;
66  std::vector<ProcessHistoryID> orderedProcessHistoryIDs_;
67 
68  std::shared_ptr<EventSkipperByID const> eventSkipperByID() const { return get_underlying_safe(eventSkipperByID_); }
69  std::shared_ptr<EventSkipperByID>& eventSkipperByID() { return get_underlying_safe(eventSkipperByID_); }
70  std::shared_ptr<DuplicateChecker const> duplicateChecker() const { return get_underlying_safe(duplicateChecker_); }
71  std::shared_ptr<DuplicateChecker>& duplicateChecker() { return get_underlying_safe(duplicateChecker_); }
72 
76  unsigned int treeCacheSize_;
81  }; // class RootPrimaryFileSequence
82 } // namespace edm
83 #endif
edm::RootPrimaryFileSequence::initFile_
void initFile_(bool skipBadFiles) override
Definition: RootPrimaryFileSequence.cc:103
edm::RootPrimaryFileSequence::firstFile_
bool firstFile_
Definition: RootPrimaryFileSequence.h:64
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
ProcessHistoryID.h
RootInputFileSequence.h
edm::RootPrimaryFileSequence::previousFile
bool previousFile()
Definition: RootPrimaryFileSequence.cc:168
edm::PoolSource
Definition: PoolSource.h:32
input
static const std::string input
Definition: EdmProvDump.cc:48
edm::RootPrimaryFileSequence::nextFile
bool nextFile()
Definition: RootPrimaryFileSequence.cc:146
getEcalConditions_orcoffint2r_cff.catalog
catalog
Definition: getEcalConditions_orcoffint2r_cff.py:40
edm::RootPrimaryFileSequence::input_
PoolSource & input_
Definition: RootPrimaryFileSequence.h:63
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::RootPrimaryFileSequence::duplicateChecker
std::shared_ptr< DuplicateChecker const > duplicateChecker() const
Definition: RootPrimaryFileSequence.h:70
edm::InputFileCatalog
Definition: InputFileCatalog.h:32
edm::get_underlying_safe
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:41
remoteMonitoring_LED_IterMethod_cfg.skipBadFiles
skipBadFiles
Definition: remoteMonitoring_LED_IterMethod_cfg.py:24
edm::RootPrimaryFileSequence::usingGoToEvent_
bool usingGoToEvent_
Definition: RootPrimaryFileSequence.h:78
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
edm::RootPrimaryFileSequence::operator=
RootPrimaryFileSequence & operator=(RootPrimaryFileSequence const &)=delete
edm::RootPrimaryFileSequence::endJob
void endJob()
Definition: RootPrimaryFileSequence.cc:72
edm::RootPrimaryFileSequence::eventSkipperByID_
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
Definition: RootPrimaryFileSequence.h:73
EventSkipperByID.h
edm::RootPrimaryFileSequence::remainingEvents
int remainingEvents() const
Definition: RootPrimaryFileSequence.cc:308
edm::RootPrimaryFileSequence::remainingLuminosityBlocks
int remainingLuminosityBlocks() const
Definition: RootPrimaryFileSequence.cc:310
edm::RootPrimaryFileSequence::skipEvents
bool skipEvents(int offset)
Definition: RootPrimaryFileSequence.cc:240
edm::RootPrimaryFileSequence::duplicateChecker_
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootPrimaryFileSequence.h:77
edm::RootInputFileSequence::RootFileSharedPtr
std::shared_ptr< RootFile > RootFileSharedPtr
Definition: RootInputFileSequence.h:52
edm::propagate_const
Definition: propagate_const.h:32
edm::ProcessingController::ForwardState
ForwardState
Definition: ProcessingController.h:31
edm::RootPrimaryFileSequence::rewindFile
void rewindFile()
Definition: RootPrimaryFileSequence.cc:234
edm::RootPrimaryFileSequence::readFile_
std::unique_ptr< FileBlock > readFile_()
Definition: RootPrimaryFileSequence.cc:74
edm::RootPrimaryFileSequence::eventSkipperByID
std::shared_ptr< EventSkipperByID const > eventSkipperByID() const
Definition: RootPrimaryFileSequence.h:68
edm::BranchDescription::MatchMode
MatchMode
Definition: BranchDescription.h:36
edm::RootPrimaryFileSequence::~RootPrimaryFileSequence
~RootPrimaryFileSequence() override
Definition: RootPrimaryFileSequence.cc:70
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
edm::RootPrimaryFileSequence::noEventSort_
bool noEventSort_
Definition: RootPrimaryFileSequence.h:75
edm::RootInputFileSequence
Definition: RootInputFileSequence.h:29
ProcessingController.h
edm::RootPrimaryFileSequence::enablePrefetching_
bool enablePrefetching_
Definition: RootPrimaryFileSequence.h:79
edm::RootPrimaryFileSequence::duplicateChecker
std::shared_ptr< DuplicateChecker > & duplicateChecker()
Definition: RootPrimaryFileSequence.h:71
BranchDescription.h
edm::ParameterSet
Definition: ParameterSet.h:47
edm::RootPrimaryFileSequence::treeCacheSize_
unsigned int treeCacheSize_
Definition: RootPrimaryFileSequence.h:76
edm::RootPrimaryFileSequence::forwardState
ProcessingController::ForwardState forwardState() const
Definition: RootPrimaryFileSequence.cc:339
edm::RootPrimaryFileSequence::RootPrimaryFileSequence
RootPrimaryFileSequence(ParameterSet const &pset, PoolSource &input, InputFileCatalog const &catalog)
Definition: RootPrimaryFileSequence.cc:22
edm::RootPrimaryFileSequence::getNextItemType
InputSource::ItemType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
Definition: RootPrimaryFileSequence.cc:189
edm::RootPrimaryFileSequence::closeFile_
void closeFile_() override
Definition: RootPrimaryFileSequence.cc:92
edm::RootPrimaryFileSequence::rewind_
void rewind_()
Definition: RootPrimaryFileSequence.cc:216
edm::InputSource::ItemType
ItemType
Definition: InputSource.h:78
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
writedatasetfile.run
run
Definition: writedatasetfile.py:27
Frameworkfwd.h
InputSource.h
edm::RootPrimaryFileSequence::initialNumberOfEventsToSkip_
int initialNumberOfEventsToSkip_
Definition: RootPrimaryFileSequence.h:74
ParameterSetDescription
edm::RootPrimaryFileSequence::branchesMustMatch_
BranchDescription::MatchMode branchesMustMatch_
Definition: RootPrimaryFileSequence.h:65
edm::RootPrimaryFileSequence::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition: RootPrimaryFileSequence.cc:312
edm::RootPrimaryFileSequence::enforceGUIDInFileName_
bool enforceGUIDInFileName_
Definition: RootPrimaryFileSequence.h:80
edm::RootPrimaryFileSequence::eventSkipperByID
std::shared_ptr< EventSkipperByID > & eventSkipperByID()
Definition: RootPrimaryFileSequence.h:69
event
Definition: event.py:1
edm::EventID
Definition: EventID.h:31
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::ProcessingController::ReverseState
ReverseState
Definition: ProcessingController.h:38
get_underlying_safe.h
lumi
Definition: LumiSectionData.h:20
edm::RootPrimaryFileSequence::orderedProcessHistoryIDs_
std::vector< ProcessHistoryID > orderedProcessHistoryIDs_
Definition: RootPrimaryFileSequence.h:66
edm::RootPrimaryFileSequence::goToEvent
bool goToEvent(EventID const &eventID)
Definition: RootPrimaryFileSequence.cc:255
edm::RootPrimaryFileSequence
Definition: RootPrimaryFileSequence.h:34
edm::RootPrimaryFileSequence::makeRootFile
RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
Definition: RootPrimaryFileSequence.cc:112
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
ProductSelectorRules.h
edm::RootPrimaryFileSequence::reverseState
ProcessingController::ReverseState reverseState() const
Definition: RootPrimaryFileSequence.cc:353