36 : fileNames_(), file_(),
event_(), eventIndex_(0), accumulatedSize_() {
37 Long64_t summedSize = 0;
41 for (
auto const&
fileName : iFileNames) {
42 TFile* tfilePtr = TFile::Open(
fileName.c_str());
43 if (
nullptr == tfilePtr) {
46 file_ = std::shared_ptr<TFile>(tfilePtr);
47 gROOT->GetListOfFiles()->Remove(tfilePtr);
49 if (
nullptr == tree) {
51 <<
"The file " <<
fileName <<
" has no 'Events' TTree and therefore is not an EDM ROOT file";
53 Long64_t
nEvents = tree->GetEntries();
139 if (
event_->to(run, lumi, event)) {
146 std::vector<std::string>::const_iterator filesBegin =
fileNames_.begin(), filesEnd =
fileNames_.end(),
150 if (
ifile - filesBegin != thisFile) {
154 if (
event_->to(run, lumi, event)) {
182 TFile* tfilePtr = TFile::Open(
fileNames_[iIndex].c_str());
183 file_ = std::shared_ptr<TFile>(tfilePtr);
184 gROOT->GetListOfFiles()->Remove(tfilePtr);
193 char const* iInstance,
194 char const* iProcess)
const {
195 return event_->getBranchNameFor(iType, iModule, iInstance, iProcess);
199 return event_->getBranchDescriptions();
214 char const* iInstance,
215 char const* iProcess,
216 void* iValue)
const {
217 return event_->getByLabel(iType, iModule, iInstance, iProcess, iValue);
221 return event_->getByProductID(iID);
226 return event_->getThinnedProduct(pid, key);
230 std::vector<edm::WrapperBase const*>& foundContainers,
231 std::vector<unsigned int>&
keys)
const {
232 event_->getThinnedProducts(pid, foundContainers, keys);
238 return event_->getThinnedKeyFrom(parent, key, thinned);
256 return event_->triggerNames(triggerResults);
260 return event_->parameterSet(psID);
266 return event_->triggerResultsByName(triggerResults);
274 char const* iInstance,
275 char const* iProcess) {
ChainEvent const & toBegin() override
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
void getThinnedProducts(edm::ProductID const &pid, std::vector< edm::WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const
edm::EventAuxiliary const & eventAuxiliary() const override
void switchToFile(Long64_t)
edm::ParameterSet const * parameterSet(edm::ParameterSetID const &psID) const override
edm::propagate_const< std::shared_ptr< Event > > event_
unsigned long long EventNumber_t
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::ProcessHistory const & processHistory() const override
std::string const getBranchNameFor(std::type_info const &, char const *, char const *, char const *) const override
unsigned int LuminosityBlockNumber_t
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
edm::TriggerResultsByName triggerResultsByName(edm::TriggerResults const &triggerResults) const override
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
bool atEnd() const override
std::optional< std::tuple< edm::WrapperBase const *, unsigned int > > getThinnedProduct(edm::ProductID const &pid, unsigned int key) const
fwlite::LuminosityBlock const & getLuminosityBlock()
tuple key
prepare the HTCondor submission files and eventually submit them
void fillParameterSetRegistry() const
std::vector< std::string > const & getProcessHistory() const
static std::string const triggerResults
fwlite::Run const & getRun()
bool to(Long64_t iIndex)
Go to the event at index iIndex.
bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const override
std::vector< Long64_t > accumulatedSize_
std::vector< edm::BranchDescription > const & getBranchDescriptions() const
ChainEvent const & operator++() override
edm::propagate_const< std::shared_ptr< TFile > > file_
constexpr element_type const * get() const
edm::OptionalThinnedKey getThinnedKeyFrom(edm::ProductID const &parent, unsigned int key, edm::ProductID const &thinned) const
edm::WrapperBase const * getByProductID(edm::ProductID const &) const override
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
std::string const & eventTreeName()
Event const * event() const
std::vector< std::string > fileNames_
ChainEvent(std::vector< std::string > const &iFileNames)