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::shared_ptr<FileBlock> readFile_();
43  void closeFile_() override;
44  void endJob();
46  void skipEventsAtBeginning(int offset);
47  void skipEvents(int offset);
48  bool goToEvent(EventID const& eventID);
49  void rewind_();
53 
54  private:
55  void initFile_(bool skipBadFiles) override;
56  RootFileSharedPtr makeRootFile(std::shared_ptr<InputFile> filePtr) override;
57  bool nextFile();
58  bool previousFile();
59  void rewindFile();
60 
61  int remainingEvents() const;
62  int remainingLuminosityBlocks() const;
63 
65  bool firstFile_;
67  std::vector<ProcessHistoryID> orderedProcessHistoryIDs_;
68 
69  std::shared_ptr<EventSkipperByID const> eventSkipperByID() const { return get_underlying_safe(eventSkipperByID_); }
70  std::shared_ptr<EventSkipperByID>& eventSkipperByID() { return get_underlying_safe(eventSkipperByID_); }
71  std::shared_ptr<DuplicateChecker const> duplicateChecker() const { return get_underlying_safe(duplicateChecker_); }
72  std::shared_ptr<DuplicateChecker>& duplicateChecker() { return get_underlying_safe(duplicateChecker_); }
73 
78  unsigned int treeCacheSize_;
81  bool goToEventInNewFile_ = false;
84  bool skipToStop_ = false;
85  bool skipIntoNewFile_ = false;
90  }; // class RootPrimaryFileSequence
91 } // namespace edm
92 #endif
edm::RootPrimaryFileSequence::initFile_
void initFile_(bool skipBadFiles) override
Definition: RootPrimaryFileSequence.cc:128
edm::RootPrimaryFileSequence::firstFile_
bool firstFile_
Definition: RootPrimaryFileSequence.h:65
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
edm::RootPrimaryFileSequence::fb_
edm::propagate_const< std::shared_ptr< FileBlock > > fb_
Definition: RootPrimaryFileSequence.h:74
ProcessHistoryID.h
edm::RootPrimaryFileSequence::goToEventID_
EventID goToEventID_
Definition: RootPrimaryFileSequence.h:83
edm::RootPrimaryFileSequence::skipToStop_
bool skipToStop_
Definition: RootPrimaryFileSequence.h:84
RootInputFileSequence.h
edm::RootPrimaryFileSequence::previousFile
bool previousFile()
Definition: RootPrimaryFileSequence.cc:198
edm::PoolSource
Definition: PoolSource.h:32
input
static const std::string input
Definition: EdmProvDump.cc:48
edm::RootPrimaryFileSequence::nextFile
bool nextFile()
Definition: RootPrimaryFileSequence.cc:172
getEcalConditions_orcoffint2r_cff.catalog
catalog
Definition: getEcalConditions_orcoffint2r_cff.py:40
edm::RootPrimaryFileSequence::input_
PoolSource & input_
Definition: RootPrimaryFileSequence.h:64
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
edm::RootPrimaryFileSequence::goToFileSequenceOffset_
size_t goToFileSequenceOffset_
Definition: RootPrimaryFileSequence.h:82
edm::RootPrimaryFileSequence::duplicateChecker
std::shared_ptr< DuplicateChecker const > duplicateChecker() const
Definition: RootPrimaryFileSequence.h:71
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:80
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:75
EventSkipperByID.h
edm::RootPrimaryFileSequence::remainingEvents
int remainingEvents() const
Definition: RootPrimaryFileSequence.cc:399
edm::RootPrimaryFileSequence::remainingLuminosityBlocks
int remainingLuminosityBlocks() const
Definition: RootPrimaryFileSequence.cc:401
edm::RootPrimaryFileSequence::duplicateChecker_
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootPrimaryFileSequence.h:79
edm::RootInputFileSequence::RootFileSharedPtr
std::shared_ptr< RootFile > RootFileSharedPtr
Definition: RootInputFileSequence.h:58
edm::propagate_const
Definition: propagate_const.h:32
edm::ProcessingController::ForwardState
ForwardState
Definition: ProcessingController.h:31
edm::RootPrimaryFileSequence::rewindFile
void rewindFile()
Definition: RootPrimaryFileSequence.cc:268
edm::RootPrimaryFileSequence::eventSkipperByID
std::shared_ptr< EventSkipperByID const > eventSkipperByID() const
Definition: RootPrimaryFileSequence.h:69
edm::RootPrimaryFileSequence::skipEvents
void skipEvents(int offset)
Definition: RootPrimaryFileSequence.cc:286
edm::RootPrimaryFileSequence::skipEventsAtBeginning
void skipEventsAtBeginning(int offset)
Definition: RootPrimaryFileSequence.cc:274
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:77
edm::RootPrimaryFileSequence::skipToFileSequenceNumber_
size_t skipToFileSequenceNumber_
Definition: RootPrimaryFileSequence.h:86
edm::RootInputFileSequence
Definition: RootInputFileSequence.h:32
ProcessingController.h
edm::RootPrimaryFileSequence::enablePrefetching_
bool enablePrefetching_
Definition: RootPrimaryFileSequence.h:88
edm::RootPrimaryFileSequence::duplicateChecker
std::shared_ptr< DuplicateChecker > & duplicateChecker()
Definition: RootPrimaryFileSequence.h:72
BranchDescription.h
edm::ParameterSet
Definition: ParameterSet.h:47
edm::RootPrimaryFileSequence::treeCacheSize_
unsigned int treeCacheSize_
Definition: RootPrimaryFileSequence.h:78
edm::RootPrimaryFileSequence::forwardState
ProcessingController::ForwardState forwardState() const
Definition: RootPrimaryFileSequence.cc:430
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:219
edm::RootPrimaryFileSequence::closeFile_
void closeFile_() override
Definition: RootPrimaryFileSequence.cc:117
edm::RootPrimaryFileSequence::goToEventInNewFile_
bool goToEventInNewFile_
Definition: RootPrimaryFileSequence.h:81
edm::RootPrimaryFileSequence::rewind_
void rewind_()
Definition: RootPrimaryFileSequence.cc:247
edm::InputSource::ItemType
ItemType
Definition: InputSource.h:54
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:76
ParameterSetDescription
edm::RootPrimaryFileSequence::branchesMustMatch_
BranchDescription::MatchMode branchesMustMatch_
Definition: RootPrimaryFileSequence.h:66
edm::RootPrimaryFileSequence::fillDescription
static void fillDescription(ParameterSetDescription &desc)
Definition: RootPrimaryFileSequence.cc:403
edm::RootPrimaryFileSequence::enforceGUIDInFileName_
bool enforceGUIDInFileName_
Definition: RootPrimaryFileSequence.h:89
edm::RootPrimaryFileSequence::eventSkipperByID
std::shared_ptr< EventSkipperByID > & eventSkipperByID()
Definition: RootPrimaryFileSequence.h:70
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:67
edm::RootPrimaryFileSequence::skipToOffsetInFinalFile_
int skipToOffsetInFinalFile_
Definition: RootPrimaryFileSequence.h:87
edm::RootPrimaryFileSequence::goToEvent
bool goToEvent(EventID const &eventID)
Definition: RootPrimaryFileSequence.cc:346
edm::RootPrimaryFileSequence
Definition: RootPrimaryFileSequence.h:34
edm::RootPrimaryFileSequence::makeRootFile
RootFileSharedPtr makeRootFile(std::shared_ptr< InputFile > filePtr) override
Definition: RootPrimaryFileSequence.cc:137
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
ProductSelectorRules.h
edm::RootPrimaryFileSequence::readFile_
std::shared_ptr< FileBlock > readFile_()
Definition: RootPrimaryFileSequence.cc:74
edm::RootPrimaryFileSequence::reverseState
ProcessingController::ReverseState reverseState() const
Definition: RootPrimaryFileSequence.cc:444
edm::RootPrimaryFileSequence::skipIntoNewFile_
bool skipIntoNewFile_
Definition: RootPrimaryFileSequence.h:85