Belle II Software development
ExporterEventInfo Class Reference

Bundles information for a single event to be stored by NonRootDataExportModule. More...

#include <ExporterEventInfo.h>

Public Member Functions

 ExporterEventInfo (int evtNum)
 Empty constructor.
 
 ~ExporterEventInfo ()
 Destructor.
 
void addHit (ExporterHitInfo aHit)
 adds Hit to internal storage.
 
void addTc (ExporterTcInfo aTc)
 adds Tc to internal storage.
 
std::vector< ExporterHitInfo > * getHits ()
 returns a pointer to internal vector of hits
 
int getEventNumber ()
 returns number of current event
 
std::vector< ExporterTcInfo > * getTcs ()
 returns a pointer to internal vector of tcs
 
int getNPXDTrueHits ()
 returns number of stored pxdTruehits
 
int getNSVDTrueHits ()
 returns number of stored svdTruehits
 
int getNMCHits ()
 returns total number of stored mcHits stored in all Tcs of this event
 

Protected Member Functions

int countHitsOfType (int type)
 used by getXXXHits to determine number of hits of certain type found in current event
 

Protected Attributes

int m_eventNumber
 knows number of current event
 
std::vector< ExporterHitInfom_hits
 stores all hits of event
 
std::vector< ExporterTcInfom_tcs
 stores all tcs of event
 

Detailed Description

Bundles information for a single event to be stored by NonRootDataExportModule.

Definition at line 26 of file ExporterEventInfo.h.

Constructor & Destructor Documentation

◆ ExporterEventInfo()

ExporterEventInfo ( int  evtNum)
inlineexplicit

Empty constructor.

Definition at line 29 of file ExporterEventInfo.h.

29 :
30 m_eventNumber(evtNum) {}
int m_eventNumber
knows number of current event

◆ ~ExporterEventInfo()

~ExporterEventInfo ( )
inline

Destructor.

Definition at line 34 of file ExporterEventInfo.h.

34{}

Member Function Documentation

◆ addHit()

void addHit ( ExporterHitInfo  aHit)

adds Hit to internal storage.


Definition at line 17 of file ExporterEventInfo.cc.

17{ m_hits.push_back(aHit); }
std::vector< ExporterHitInfo > m_hits
stores all hits of event

◆ addTc()

void addTc ( ExporterTcInfo  aTc)

adds Tc to internal storage.


Definition at line 21 of file ExporterEventInfo.cc.

21{ m_tcs.push_back(aTc); }
std::vector< ExporterTcInfo > m_tcs
stores all tcs of event

◆ countHitsOfType()

int countHitsOfType ( int  type)
protected

used by getXXXHits to determine number of hits of certain type found in current event

Definition at line 49 of file ExporterEventInfo.cc.

50{
51 int counter = 0;
52 for (ExporterHitInfo hit : m_hits) {
53 if (hit.getType() == type) { ++counter; }
54 }
55 return counter;
56}
Bundles information for a single hit to be stored by EventInfo (needed for HitExporter,...

◆ getEventNumber()

int getEventNumber ( )
inline

returns number of current event

Definition at line 50 of file ExporterEventInfo.h.

50{ return m_eventNumber; }

◆ getHits()

std::vector< ExporterHitInfo > * getHits ( )

returns a pointer to internal vector of hits

Definition at line 25 of file ExporterEventInfo.cc.

25{ return &m_hits; }

◆ getNMCHits()

int getNMCHits ( )

returns total number of stored mcHits stored in all Tcs of this event

Definition at line 40 of file ExporterEventInfo.cc.

41{
42 int nMCHits = 0;
43 for (ExporterTcInfo tc : m_tcs) {
44 nMCHits += tc.getNHits();
45 }
46 return nMCHits;
47}
Bundles information for a single track candidate to be stored by EventInfo (needed for HitExporter,...

◆ getNPXDTrueHits()

int getNPXDTrueHits ( )

returns number of stored pxdTruehits

Definition at line 33 of file ExporterEventInfo.cc.

33{ return countHitsOfType(0); }
int countHitsOfType(int type)
used by getXXXHits to determine number of hits of certain type found in current event

◆ getNSVDTrueHits()

int getNSVDTrueHits ( )

returns number of stored svdTruehits

Definition at line 37 of file ExporterEventInfo.cc.

37{ return countHitsOfType(1); }

◆ getTcs()

std::vector< ExporterTcInfo > * getTcs ( )

returns a pointer to internal vector of tcs

Definition at line 29 of file ExporterEventInfo.cc.

29{ return &m_tcs; }

Member Data Documentation

◆ m_eventNumber

int m_eventNumber
protected

knows number of current event

Definition at line 73 of file ExporterEventInfo.h.

◆ m_hits

std::vector<ExporterHitInfo> m_hits
protected

stores all hits of event

Definition at line 74 of file ExporterEventInfo.h.

◆ m_tcs

std::vector<ExporterTcInfo> m_tcs
protected

stores all tcs of event

Definition at line 75 of file ExporterEventInfo.h.


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