1 #ifndef MULTIHEAD_HH_INCLUDED
2 #define MULTIHEAD_HH_INCLUDED
47 const_iterator
find(
const uuid_t& uuid,
48 const bool useCache =
false)
const
54 Cache() { uuid_clear(this->uuid); }
62 for (cache.it = this->cbegin(); cache.it != this->cend(); ++cache.it) {
64 const Head& head = *cache.it;
67 uuid_str.erase(remove_if(uuid_str.begin(), uuid_str.end(), ::isspace), uuid_str.end());
69 uuid_parse(uuid_str.c_str(), cache.uuid);
71 if (uuid_compare(uuid, cache.uuid) == 0) {
80 if (uuid_compare(uuid, cache.uuid) == 0) {
83 return find(uuid,
false);
99 const bool useCache =
false)
const
116 uuid_str.erase(remove_if(uuid_str.begin(), uuid_str.end(), ::isspace), uuid_str.end());
119 uuid_parse(uuid_str.c_str(), uuid);
121 if (uuid_is_null(uuid) == 0 &&
find(uuid) == this->cend()) {
123 this->push_back(header);
144 for (const_iterator i = multiHead.cbegin(); i != multiHead.cend(); ++i) {
145 n += (size_t) this->
insert(*i);
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
uuid_t header_uuid
UUID of header containing the event-weight information.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
virtual ~MultiHead()
Virtual destructor.
const_iterator find(const Evt &event, const bool useCache=false) const
Find the header corresponding to the given event.
static int ROOT_IO_VERSION
Streamer version as obtained from ROOT file.
bool insert(const Head &header)
Insert the given header.
const_iterator find(const uuid_t &uuid, const bool useCache=false) const
Find header with given UUID.
static void actionAtFileOpen(int version)
Action method at file open.
MultiHead()
Default constructor.
size_t join(const MultiHead &multiHead)
Join given MultiHead object with this MultiHead object.