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";
146 std::vector<std::string>::const_iterator filesBegin =
fileNames_.begin(), filesEnd =
fileNames_.end(),
150 if (
ifile - filesBegin != thisFile) {
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_->getByTokenImp(iToken, iValue);
225 return event_->getByProductID(iID);
230 return event_->getThinnedProduct(pid,
key);
234 std::vector<edm::WrapperBase const*>& foundContainers,
235 std::vector<unsigned int>&
keys)
const {
236 event_->getThinnedProducts(pid, foundContainers,
keys);
264 return event_->parameterSet(psID);
278 char const* iInstance,
279 char const* iProcess) {
std::variant< unsigned int, detail::GetThinnedKeyFromExceptionFactory, std::monostate > OptionalThinnedKey
fwlite::LuminosityBlock const & getLuminosityBlock()
void switchToFile(Long64_t)
fwlite::Run const & getRun()
edm::propagate_const< std::shared_ptr< Event > > event_
unsigned long long EventNumber_t
edm::WrapperBase const * getByProductID(edm::ProductID const &) const override
std::string const getBranchNameFor(std::type_info const &, char const *, char const *, char const *) const override
std::optional< std::tuple< edm::WrapperBase const *, unsigned int > > getThinnedProduct(edm::ProductID const &pid, unsigned int key) const
void fillParameterSetRegistry() const
unsigned int LuminosityBlockNumber_t
ChainEvent const & toBegin() override
edm::LuminosityBlockNumber_t luminosityBlock() const
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
constexpr element_type const * get() const
edm::TriggerResultsByName triggerResultsByName(edm::TriggerResults const &triggerResults) const override
edm::ProcessHistory const & processHistory() const override
std::vector< edm::BranchDescription > const & getBranchDescriptions() const
std::vector< std::string > const & getProcessHistory() const
bool atEnd() const override
key
prepare the HTCondor submission files and eventually submit them
static std::string const triggerResults
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
ChainEvent const & operator++() override
std::vector< Long64_t > accumulatedSize_
edm::EventAuxiliary const & eventAuxiliary() const override
bool getByTokenImp(edm::EDGetToken, edm::WrapperBase const *&) const override
void getThinnedProducts(edm::ProductID const &pid, std::vector< edm::WrapperBase const *> &foundContainers, std::vector< unsigned int > &keys) const
edm::propagate_const< std::shared_ptr< TFile > > file_
edm::ParameterSet const * parameterSet(edm::ParameterSetID const &psID) const override
edm::OptionalThinnedKey getThinnedKeyFrom(edm::ProductID const &parent, unsigned int key, edm::ProductID const &thinned) const
std::string const & eventTreeName()
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
Event const * event() const
std::vector< std::string > fileNames_
ChainEvent(std::vector< std::string > const &iFileNames)