Class managing the serialization of trigger gates in a simple ROOT tree. More...
Public Member Functions | |
TriggerGateTree (TTree &tree) | |
Constructor. More... | |
void | assignTriggerGatesInfo (TriggerGatesInfo const &info) |
Copies the information from the info record into the ROOT tree buffers. More... | |
Public Member Functions inherited from icarus::trigger::details::TreeHolder | |
TreeHolder ()=default | |
TreeHolder (TTree &tree) | |
TTree & | tree () |
TTree const & | tree () const |
Private Member Functions | |
void | checkSizes () const |
Internal check: all branch buffers have the same size. More... | |
Private Attributes | |
UInt_t | fNChannels |
Number of channels. More... | |
std::vector< geo::Point_t > | fOpDetPos |
Coordinates of the optical detector. More... | |
std::vector< UInt_t > | fNOpenings |
Number of openings (0 if never opens). More... | |
std::vector< Double_t > | fOpeningTime |
Time of first opening. More... | |
Class managing the serialization of trigger gates 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. Information may be loaded into the tree via assignTriggerGatesInfo()
method, which sets each branch according to a value of the data structure TriggerGatesInfo
, as described below.
The branch structure is: NChannels/i:OpDetPos_[]/D:NOpenings[]/i:OpeningTime[]/D
NChannels
(from the size of TriggerGatesInfo::info
): number of channels in this event;OpDetPos
(one 3D point per channel, from TriggerGateInfo::center
): the location of the centroid of the optical detectors contributing to the channel, in world coordinates [cm]; it's a vector of GenVector 3D points (can access coordinates as OpDetPos.X()
or OpDetPos.fCoordinates.fX
);NOpenings
(one count per channel, from TriggerGateInfo::nOpenings
): the number of times the gate opened;
OpeningTime
(one time per channel, based on TriggerGateInfo::firstOpenTime
): first time that channel opened, or very large number (std::numeric_limits<double>::max()
) if no opening happened at all (note that in this case the value in TriggerGateInfo::firstOpenTime
is ignored).All branches come from a variable size vector with size the number of available trigger gates.
Definition at line 132 of file MakeTriggerSimulationTree_module.cc.
TriggerGateTree::TriggerGateTree | ( | TTree & | tree | ) |
Constructor.
Definition at line 495 of file MakeTriggerSimulationTree_module.cc.
void TriggerGateTree::assignTriggerGatesInfo | ( | TriggerGatesInfo const & | info | ) |
Copies the information from the info
record into the ROOT tree buffers.
Definition at line 532 of file MakeTriggerSimulationTree_module.cc.
|
private |
Internal check: all branch buffers have the same size.
Definition at line 508 of file MakeTriggerSimulationTree_module.cc.
|
private |
Number of channels.
Definition at line 142 of file MakeTriggerSimulationTree_module.cc.
|
private |
Number of openings (0
if never opens).
Definition at line 145 of file MakeTriggerSimulationTree_module.cc.
|
private |
Coordinates of the optical detector.
Definition at line 144 of file MakeTriggerSimulationTree_module.cc.
|
private |
Time of first opening.
Definition at line 146 of file MakeTriggerSimulationTree_module.cc.