All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventIDTree.cxx
Go to the documentation of this file.
1 /**
2  * @file icaruscode/PMT/Trigger/Algorithms/details/EventIDTree.cxx
3  * @brief Class storing event information in a ROOT tree (implementation).
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date May 15, 2020
6  * @see icaruscode/PMT/Trigger/Algorithms/details/EventIDTree.h
7  */
8 
9 // library header
11 
12 // ROOT libraries
13 #include "TTree.h"
14 
15 
16 //------------------------------------------------------------------------------
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()
26 
27 
28 //------------------------------------------------------------------------------
30 
31  fRunNo = id.run();
32  fSubRunNo = id.subRun();
33  fEventNo = id.event();
34 
35 } // icarus::trigger::details::EventIDTree::assignID()
36 
37 
38 //------------------------------------------------------------------------------
Simple class holding a tree.
Definition: TreeHolder.h:24
EventIDTree(TTree &tree)
Creates the required branches and assigns addresses to them.
Definition: EventIDTree.cxx:17
void assignID(art::EventID const &id)
Fills the information of the specified event.
Definition: EventIDTree.cxx:29
Class hosting selected information about the event.