All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
icarus::trigger::details::EventIDTree Struct Reference

Class managing the serialization of event ID in a simple ROOT tree. More...

#include <EventIDTree.h>

Inheritance diagram for icarus::trigger::details::EventIDTree:
icarus::trigger::details::TreeHolder

Public Member Functions

 EventIDTree (TTree &tree)
 Creates the required branches and assigns addresses to them. More...
 
void assignID (art::EventID const &id)
 Fills the information of the specified event. More...
 
- Public Member Functions inherited from icarus::trigger::details::TreeHolder
 TreeHolder ()=default
 
 TreeHolder (TTree &tree)
 
TTree & tree ()
 
TTree const & tree () const
 

Public Attributes

UInt_t fRunNo
 
UInt_t fSubRunNo
 
UInt_t fEventNo
 

Detailed Description

Class managing the serialization of event ID in a simple ROOT tree.

The tree is supplied by the caller. This object will create the proper branches into the tree and assign addresses to them. Then it will assume they will stay assigned.

On assignEvent(), the branch addresses are assigned the values from the event ID. The tree is not Fill()-ed.

The tree structure is: Run/i:SubRun/i:Event/i, with a single branch per element.

Definition at line 37 of file EventIDTree.h.

Constructor & Destructor Documentation

EventIDTree::EventIDTree ( TTree &  tree)

Creates the required branches and assigns addresses to them.

Definition at line 17 of file EventIDTree.cxx.

18  : TreeHolder(tree)
19 {
20 
21  this->tree().Branch("RunNo", &fRunNo);
22  this->tree().Branch("SubRunNo", &fSubRunNo);
23  this->tree().Branch("EventNo", &fEventNo);
24 
25 } // icarus::trigger::details::EventIDTree::EventIDTree()

Member Function Documentation

void EventIDTree::assignID ( art::EventID const &  id)

Fills the information of the specified event.

Definition at line 29 of file EventIDTree.cxx.

29  {
30 
31  fRunNo = id.run();
32  fSubRunNo = id.subRun();
33  fEventNo = id.event();
34 
35 } // icarus::trigger::details::EventIDTree::assignID()

Member Data Documentation

UInt_t icarus::trigger::details::EventIDTree::fEventNo

Definition at line 47 of file EventIDTree.h.

UInt_t icarus::trigger::details::EventIDTree::fRunNo

Definition at line 45 of file EventIDTree.h.

UInt_t icarus::trigger::details::EventIDTree::fSubRunNo

Definition at line 46 of file EventIDTree.h.


The documentation for this struct was generated from the following files: