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

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

Inheritance diagram for EventIDTree:
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...
 
void assignEvent (art::Event const &event)
 
- Public Member Functions inherited from 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 439 of file TriggerEfficiencyPlots_module.cc.

Constructor & Destructor Documentation

EventIDTree::EventIDTree ( TTree &  tree)

Creates the required branches and assigns addresses to them.

Definition at line 2470 of file TriggerEfficiencyPlots_module.cc.

2470  : TreeHolder(tree) {
2471 
2472  this->tree().Branch("RunNo", &fRunNo);
2473  this->tree().Branch("SubRunNo", &fSubRunNo);
2474  this->tree().Branch("EventNo", &fEventNo);
2475 
2476 } // EventIDTree::EventIDTree()
TreeHolder()=default

Member Function Documentation

void EventIDTree::assignEvent ( art::Event const &  event)
inline

Definition at line 446 of file TriggerEfficiencyPlots_module.cc.

446 { assignID(event.id()); }
void assignID(art::EventID const &id)
Fills the information of the specified event.
void EventIDTree::assignID ( art::EventID const &  id)

Fills the information of the specified event.

Definition at line 2480 of file TriggerEfficiencyPlots_module.cc.

2480  {
2481 
2482  fRunNo = id.run();
2483  fSubRunNo = id.subRun();
2484  fEventNo = id.event();
2485 
2486 } // EventIDTree::assignID()

Member Data Documentation

UInt_t EventIDTree::fEventNo

Definition at line 450 of file TriggerEfficiencyPlots_module.cc.

UInt_t EventIDTree::fRunNo

Definition at line 448 of file TriggerEfficiencyPlots_module.cc.

UInt_t EventIDTree::fSubRunNo

Definition at line 449 of file TriggerEfficiencyPlots_module.cc.


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