42 Long64_t summedSize=0;
46 for (
auto const&
fileName : iFileNames) {
47 TFile *tfilePtr = TFile::Open(
fileName.c_str());
48 file_ = std::shared_ptr<TFile>(tfilePtr);
49 gROOT->GetListOfFiles()->Remove(tfilePtr);
51 if (
nullptr == tree) {
52 throw cms::Exception(
"NotEdmFile")<<
"The file "<<
fileName<<
" has no 'Events' TTree and therefore is not an EDM ROOT file";
54 Long64_t
nEvents = tree->GetEntries();
156 if (
event_->to(run, lumi, event))
166 std::vector<std::string>::const_iterator filesBegin =
fileNames_.begin(),
171 if (
ifile - filesBegin != thisFile)
176 if (
event_->to(run, lumi, event))
192 return to(run, 0
U, event);
200 if (!
size())
return *
this;
213 TFile *tfilePtr = TFile::Open(
fileNames_[iIndex].c_str());
214 file_ = std::shared_ptr<TFile>(tfilePtr);
215 gROOT->GetListOfFiles()->Remove(tfilePtr);
225 char const* iInstance,
226 char const* iProcess)
const 228 return event_->getBranchNameFor(iType,iModule,iInstance,iProcess);
231 std::vector<edm::BranchDescription>
const&
234 return event_->getBranchDescriptions();
237 std::vector<std::string>
const&
240 return event_->getProcessHistory();
246 return event_->processHistory();
252 return event_->eventAuxiliary();
257 return event_->getLuminosityBlock();
268 char const* iInstance,
269 char const* iProcess,
272 return event_->getByLabel(iType, iModule, iInstance, iProcess, iValue);
277 return event_->getByProductID(iID);
281 return event_->getThinnedProduct(pid, key);
285 std::vector<edm::WrapperBase const*>& foundContainers,
286 std::vector<unsigned int>&
keys)
const {
287 event_->getThinnedProducts(pid, foundContainers, keys);
303 if (!
size())
return true;
319 return event_->triggerNames(triggerResults);
324 return event_->parameterSet(psID);
330 event_->fillParameterSetRegistry();
335 return event_->triggerResultsByName(triggerResults);
344 char const* iInstance,
345 char const* iProcess) {
ChainEvent const & toBegin() override
edm::WrapperBase const * getThinnedProduct(edm::ProductID const &pid, unsigned int &key) const
void getThinnedProducts(edm::ProductID const &pid, std::vector< edm::WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys) const
void switchToFile(Long64_t)
edm::propagate_const< std::shared_ptr< Event > > event_
unsigned long long EventNumber_t
edm::LuminosityBlockNumber_t luminosityBlock() const
unsigned int LuminosityBlockNumber_t
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
virtual edm::TriggerResultsByName triggerResultsByName(edm::TriggerResults const &triggerResults) const override
fwlite::LuminosityBlock const & getLuminosityBlock()
virtual edm::ParameterSet const * parameterSet(edm::ParameterSetID const &psID) const override
void fillParameterSetRegistry() const
virtual bool atEnd() const override
std::vector< std::string > const & getProcessHistory() const
virtual edm::ProcessHistory const & processHistory() const override
static std::string const triggerResults
fwlite::Run const & getRun()
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
bool to(Long64_t iIndex)
Go to the event at index iIndex.
element_type const * get() const
std::vector< Long64_t > accumulatedSize_
std::vector< edm::BranchDescription > const & getBranchDescriptions() const
ChainEvent const & operator++() override
edm::propagate_const< std::shared_ptr< TFile > > file_
virtual edm::EventAuxiliary const & eventAuxiliary() const override
virtual edm::WrapperBase const * getByProductID(edm::ProductID const &) const override
virtual bool getByLabel(std::type_info const &, char const *, char const *, char const *, void *) const override
static void throwProductNotFoundException(std::type_info const &, char const *, char const *, char const *)
std::string const & eventTreeName()
Event const * event() const
virtual std::string const getBranchNameFor(std::type_info const &, char const *, char const *, char const *) const override
std::vector< std::string > fileNames_
ChainEvent(std::vector< std::string > const &iFileNames)