Public Member Functions | Private Attributes | Friends | List of all members
sn::MichelBackgroundManager Class Reference

Public Member Functions

 MichelBackgroundManager (unsigned int size)
 
 ~MichelBackgroundManager ()
 
void AddEntry (std::vector< std::pair< int, std::pair< double, TVector3 >>> entry)
 
void SetSize (unsigned int size)
 
std::vector< std::pair< int, std::pair< double, TVector3 > > > GetLastEntry ()
 
unsigned int Size ()
 
size_t NEntries ()
 
bool IsReady ()
 
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > GetEntries () const
 

Private Attributes

unsigned int fSize
 
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
 

Friends

std::ostream & operator<< (std::ostream &os, const sn::MichelBackgroundManager &m)
 

Detailed Description

Definition at line 56 of file SNMichelAnalyzer_module.cc.

Constructor & Destructor Documentation

sn::MichelBackgroundManager::MichelBackgroundManager ( unsigned int  size)
inline
sn::MichelBackgroundManager::~MichelBackgroundManager ( )

Referenced by MichelBackgroundManager().

Member Function Documentation

void sn::MichelBackgroundManager::AddEntry ( std::vector< std::pair< int, std::pair< double, TVector3 >>>  entry)

Definition at line 90 of file SNMichelAnalyzer_module.cc.

References ana::assert(), HTMLTools::entry(), fEntries, and fSize.

Referenced by sn::SNMichelAnalyzer::analyze(), and MichelBackgroundManager().

91 {
92  if (this->fEntries.size() == fSize) this->fEntries.pop_back();
93  fEntries.push_front(entry);
94 
95  assert(fEntries.size() <= fSize);
96 
97  return;
98 }
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
assert(nhit_max >=nhit_nbins)
def entry(str)
Definition: HTMLTools.py:26
std::deque<std::vector<std::pair<int, std::pair<double, TVector3> > > > sn::MichelBackgroundManager::GetEntries ( ) const
inline

Definition at line 68 of file SNMichelAnalyzer_module.cc.

References fEntries, m, and operator<<.

Referenced by sn::operator<<().

68 {return fEntries;};
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
std::vector< std::pair< int, std::pair< double, TVector3 > > > sn::MichelBackgroundManager::GetLastEntry ( )

Definition at line 102 of file SNMichelAnalyzer_module.cc.

References fEntries.

Referenced by sn::SNMichelAnalyzer::analyze(), and SetSize().

103 {
104  return this->fEntries.back();
105 }
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
bool sn::MichelBackgroundManager::IsReady ( )
inline

Definition at line 67 of file SNMichelAnalyzer_module.cc.

References fEntries, and fSize.

Referenced by sn::SNMichelAnalyzer::analyze().

67 {return fEntries.size() == fSize;};
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
size_t sn::MichelBackgroundManager::NEntries ( )
inline

Definition at line 66 of file SNMichelAnalyzer_module.cc.

References fEntries.

66 {return fEntries.size();};
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > fEntries
void sn::MichelBackgroundManager::SetSize ( unsigned int  size)
inline
unsigned int sn::MichelBackgroundManager::Size ( )
inline

Definition at line 65 of file SNMichelAnalyzer_module.cc.

References fSize.

65 {return fSize;};

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const sn::MichelBackgroundManager m 
)
friend

Definition at line 78 of file SNMichelAnalyzer_module.cc.

Referenced by GetEntries().

79  {
80  os << "[ ";
81  for (std::vector<std::pair<int, std::pair<double, TVector3>>> entry : m.GetEntries()) {
82  os << entry.size() << " ";
83  }
84  os << "]";
85  return os;
86  }
std::deque< std::vector< std::pair< int, std::pair< double, TVector3 > > > > GetEntries() const
def entry(str)
Definition: HTMLTools.py:26

Member Data Documentation

std::deque<std::vector<std::pair<int, std::pair<double, TVector3> > > > sn::MichelBackgroundManager::fEntries
private

Definition at line 74 of file SNMichelAnalyzer_module.cc.

Referenced by AddEntry(), GetEntries(), GetLastEntry(), IsReady(), and NEntries().

unsigned int sn::MichelBackgroundManager::fSize
private

Definition at line 73 of file SNMichelAnalyzer_module.cc.

Referenced by AddEntry(), IsReady(), MichelBackgroundManager(), SetSize(), and Size().


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