All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventIDTree.h
Go to the documentation of this file.
1 /**
2  * @file icaruscode/PMT/Trigger/Algorithms/details/EventIDTree.h
3  * @brief Class hosting selected information about the event.
4  * @author Gianluca Petrillo (petrillo@slac.stanford.edu)
5  * @date May 15, 2020
6  */
7 
8 #ifndef ICARUSCODE_PMT_TRIGGER_ALGORITHM_DETAILS_EVENTIDTREE_H
9 #define ICARUSCODE_PMT_TRIGGER_ALGORITHM_DETAILS_EVENTIDTREE_H
10 
11 
12 // ICARUS libraries
14 
15 // framework libraries
16 #include "canvas/Persistency/Provenance/EventID.h"
17 
18 // ROOT libraries
19 #include "Rtypes.h"
20 
21 
22 //------------------------------------------------------------------------------
23 namespace icarus::trigger::details { struct EventIDTree; }
24 /**
25  * @brief Class managing the serialization of event ID in a simple ROOT tree.
26  *
27  * The tree is supplied by the caller.
28  * This object will create the proper branches into the tree and assign
29  * addresses to them. Then it will assume they will stay assigned.
30  *
31  * On `assignEvent()`, the branch addresses are assigned the values from the
32  * event ID. The tree is not `Fill()`-ed.
33  *
34  * The tree structure is: `Run/i:SubRun/i:Event/i`, with a single branch per
35  * element.
36  */
38 
39  /// Creates the required branches and assigns addresses to them.
40  EventIDTree(TTree& tree);
41 
42  /// Fills the information of the specified event.
43  void assignID(art::EventID const& id);
44 
45  UInt_t fRunNo;
46  UInt_t fSubRunNo;
47  UInt_t fEventNo;
48 
49 }; // struct icarus::trigger::details::EventIDTree
50 
51 
52 //------------------------------------------------------------------------------
53 
54 
55 #endif // ICARUSCODE_PMT_TRIGGER_ALGORITHM_DETAILS_EVENTIDTREE_H
Class holding a ROOT tree, to be shared by other classes.
Class managing the serialization of event ID in a simple ROOT tree.
Definition: EventIDTree.h:37
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