Public Member Functions | Private Attributes | List of all members
fnex::EventList Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/FNEX/core/Event.h"

Public Member Functions

 EventList (const MetaData &md)
 
 EventList (MetaData const &md, SpillSummary const &ss)
 
 EventList (MetaData const &md, SpillSummary const &ss, size_t const &numEvents)
 
 EventList (const EventList &)=default
 
EventContainer::iterator begin ()
 
EventContainer::const_iterator begin () const
 
EventContainer::iterator end ()
 
EventContainer::const_iterator end () const
 
std::size_t size () const
 
void resize (size_t i)
 
EventPtr EventNum (std::size_t idx)
 
EventPtr const EventNum (std::size_t idx) const
 
void AddEvent (EventPtr ev)
 
void AddEventAt (EventPtr ev, size_t const &pos)
 
void RemoveEvent (std::size_t idx)
 
void RemoveEvent (EventContainer::iterator it)
 
void RemoveEvent (EventPtr ev)
 
fnex::SpillSummary const & ListSpillSummary () const
 
void AddSpillSummary (fnex::SpillSummary const &ss)
 
void AddGoodPOT (double pot)
 
void AddBadPOT (double pot)
 
void AddGoodSpills (unsigned int nSpills)
 
void AddBadSpills (unsigned int nSpills)
 
fnex::MetaData const & ListMetaData () const
 
void operator+ (const EventList &otherList)
 operator+() is the means for concatenating EventLists More...
 
EventPtr EventAlias (std::size_t idx)
 Get a (shared_ptr) copy of the pointer to a particular event. More...
 
EventContainer Slice (const std::vector< std::size_t > &indices)
 Gives back a new EventContainer containing aliases to the events with the given indices in my EventContainer. More...
 

Private Attributes

fnex::EventContainer fEvents
 
fnex::MetaData fMetaData
 what kind of files was this EventList constructed from? More...
 
fnex::SpillSummary fSpillSummary
 aggregate information about the spills that went into this EventList (POT, # good spills, etc.) More...
 

Detailed Description

Definition at line 75 of file Event.h.

Constructor & Destructor Documentation

fnex::EventList::EventList ( const MetaData md)
inline

Definition at line 80 of file Event.h.

81  : fMetaData(md)
82  , fSpillSummary()
83  {};
fnex::MetaData fMetaData
what kind of files was this EventList constructed from?
Definition: Event.h:144
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
fnex::EventList::EventList ( MetaData const &  md,
SpillSummary const &  ss 
)
inline

Definition at line 86 of file Event.h.

88  : fMetaData(md)
89  , fSpillSummary(ss)
90  {
91  };
fnex::MetaData fMetaData
what kind of files was this EventList constructed from?
Definition: Event.h:144
Float_t ss
Definition: plot.C:24
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
fnex::EventList::EventList ( MetaData const &  md,
SpillSummary const &  ss,
size_t const &  numEvents 
)
inline

Definition at line 94 of file Event.h.

97  : fMetaData(md)
98  , fSpillSummary(ss)
99  {
100  fEvents.resize(numEvents);
101  };
fnex::MetaData fMetaData
what kind of files was this EventList constructed from?
Definition: Event.h:144
Float_t ss
Definition: plot.C:24
fnex::EventContainer fEvents
Definition: Event.h:143
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
fnex::EventList::EventList ( const EventList )
default

Member Function Documentation

void fnex::EventList::AddBadPOT ( double  pot)
inline

Definition at line 127 of file Event.h.

References pot.

127 { this->fSpillSummary.totalPOT += pot; }
#define pot
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
void fnex::EventList::AddBadSpills ( unsigned int  nSpills)
inline

Definition at line 129 of file Event.h.

129 { this->fSpillSummary.totalNumSpills += nSpills; };
unsigned long int totalNumSpills
Definition: Structs.h:107
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
void fnex::EventList::AddEvent ( EventPtr  ev)
inline
void fnex::EventList::AddEventAt ( fnex::EventPtr  ev,
size_t const &  pos 
)

Definition at line 69 of file Event.cxx.

References fEvents, and elec2geo::pos.

71  {
72  if(pos < fEvents.size() ) fEvents[pos] = ev;
73  else
74  throw cet::exception("EventList")
75  << "attempting to add EventPtr to unavailable postion: "
76  << pos;
77 
78  return;
79  }
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
fnex::EventContainer fEvents
Definition: Event.h:143
void fnex::EventList::AddGoodPOT ( double  pot)
inline

Definition at line 126 of file Event.h.

References pot.

Referenced by fnex::EventListManipulator::FillFakeDataListsForDetector().

126 { this->fSpillSummary.totalPOT += pot; this->fSpillSummary.goodPOT += pot; };
#define pot
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
void fnex::EventList::AddGoodSpills ( unsigned int  nSpills)
inline

Definition at line 128 of file Event.h.

Referenced by fnex::EventListManipulator::FillFakeDataListsForDetector().

128 { this->fSpillSummary.totalNumSpills += nSpills; this->fSpillSummary.numGoodSpills += nSpills; };
unsigned long int numGoodSpills
Definition: Structs.h:108
unsigned long int totalNumSpills
Definition: Structs.h:107
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
void fnex::EventList::AddSpillSummary ( fnex::SpillSummary const &  ss)
inline

Definition at line 148 of file Event.h.

References ss.

149  {
150  this->fSpillSummary += ss;
151  }
Float_t ss
Definition: plot.C:24
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
EventContainer::iterator fnex::EventList::begin ( )
inline

Definition at line 106 of file Event.h.

106 { return fEvents.begin(); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventContainer::const_iterator fnex::EventList::begin ( ) const
inline

Definition at line 107 of file Event.h.

107 { return fEvents.begin(); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventContainer::iterator fnex::EventList::end ( )
inline

Definition at line 108 of file Event.h.

108 { return fEvents.end(); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventContainer::const_iterator fnex::EventList::end ( ) const
inline

Definition at line 109 of file Event.h.

109 { return fEvents.end(); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventPtr fnex::EventList::EventAlias ( std::size_t  idx)
inline

Get a (shared_ptr) copy of the pointer to a particular event.

Definition at line 137 of file Event.h.

References ana::Slice().

Referenced by Slice().

137 { return this->fEvents.at(idx); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventPtr fnex::EventList::EventNum ( std::size_t  idx)
inline

Definition at line 113 of file Event.h.

Referenced by fnex::SpectrumTest::InspectEventLists().

113 { return fEvents.at(idx); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventPtr const fnex::EventList::EventNum ( std::size_t  idx) const
inline

Definition at line 114 of file Event.h.

114 { return fEvents.at(idx); };
fnex::EventContainer fEvents
Definition: Event.h:143
fnex::MetaData const& fnex::EventList::ListMetaData ( ) const
inline
fnex::SpillSummary const& fnex::EventList::ListSpillSummary ( ) const
inline

Definition at line 123 of file Event.h.

References ss.

Referenced by fnex::EventListManipulator::AddFakeDataToEventList(), and fnex::EventListManipulator::FillEventList().

123 { return this->fSpillSummary; }
fnex::SpillSummary fSpillSummary
aggregate information about the spills that went into this EventList (POT, # good spills...
Definition: Event.h:145
void fnex::EventList::operator+ ( const EventList otherList)

operator+() is the means for concatenating EventLists

Definition at line 41 of file Event.cxx.

References fEvents, it, and RemoveEvent().

42  {
43  throw std::logic_error("Forgot to implement EventList::operator+");
44 
45  // first check that the metadata is consistent.
46  // then:
47  // * add events to the end of my list
48  // * add the POT counts together
49  }
void fnex::EventList::RemoveEvent ( std::size_t  idx)
inline

Definition at line 118 of file Event.h.

References compare_h5_caf::idx.

Referenced by operator+().

118 { this->fEvents.erase(this->fEvents.begin() + idx); };
fnex::EventContainer fEvents
Definition: Event.h:143
void fnex::EventList::RemoveEvent ( EventContainer::iterator  it)
inline

Definition at line 119 of file Event.h.

119 { this->fEvents.erase(it); };
set< int >::iterator it
fnex::EventContainer fEvents
Definition: Event.h:143
void fnex::EventList::RemoveEvent ( EventPtr  ev)
void fnex::EventList::resize ( size_t  i)
inline

Definition at line 111 of file Event.h.

111 { fEvents.resize(i); };
fnex::EventContainer fEvents
Definition: Event.h:143
std::size_t fnex::EventList::size ( ) const
inline

Definition at line 110 of file Event.h.

Referenced by fnex::EventListManipulator::AddFakeDataToEventList(), and fnex::EventListManipulator::CreatePoissonFakeData().

110 { return fEvents.size(); };
fnex::EventContainer fEvents
Definition: Event.h:143
EventContainer fnex::EventList::Slice ( const std::vector< std::size_t > &  indices)

Gives back a new EventContainer containing aliases to the events with the given indices in my EventContainer.

Definition at line 60 of file Event.cxx.

References EventAlias(), and MECModelEnuComparisons::i.

61  {
62  EventContainer ec;
63  for (const auto i : indices)
64  ec.push_back(this->EventAlias(i));
65  return ec;
66  }
EventPtr EventAlias(std::size_t idx)
Get a (shared_ptr) copy of the pointer to a particular event.
Definition: Event.h:137

Member Data Documentation

fnex::EventContainer fnex::EventList::fEvents
private

Definition at line 143 of file Event.h.

Referenced by AddEventAt(), and operator+().

fnex::MetaData fnex::EventList::fMetaData
private

what kind of files was this EventList constructed from?

Definition at line 144 of file Event.h.

fnex::SpillSummary fnex::EventList::fSpillSummary
private

aggregate information about the spills that went into this EventList (POT, # good spills, etc.)

Definition at line 145 of file Event.h.


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