13#include <EVENT/LCCollection.h>
26void Event::add(
const std::string name, TObject*
object) {
35 TObject* cp =
object->Clone();
51 branches_[name] =
tree_->Branch(name.c_str(), collection, 1000000, 3);
65 itb->second->GetEntry(
entry_);
67 return static_cast<TClonesArray*
>(itc->second);
69 throw std::runtime_error(
"Collection not found.");
78 if (it ==
objects_.end())
return false;
85 collection.second->Clear(
"C");
97 }
catch (EVENT::DataNotAvailableException e) {
Class defining methods used to access event information and data collections.
EventHeader * event_header_
TClonesArray * getCollection(const std::string name)
bool exists(const std::string name)
std::map< std::string, TBranch * > branches_
EVENT::LCCollection * getLCCollection(std::string name)
std::map< std::string, TObject * > objects_
virtual void add(const std::string name, TObject *object)
bool hasLCCollection(const std::string name)
void addCollection(const std::string name, TClonesArray *collection)