ComparisonResultList Class Reference

#include <ComparisonResultList.h>

List of all members.

Public Member Functions

 ComparisonResultList ()
 ~ComparisonResultList ()
void Erase ()
int Size ()
float LastDeltalnL ()
void PopBack ()
void PushBack (ComparisonResult *cr_in)
void Sort ()
void InsertSorted (ComparisonResult *cr_in)
void PrintFirstLast ()

Public Attributes

list< ComparisonResultcompResultList
list< ComparisonResult >::iterator iter
list< ComparisonResult >::iterator iter_end

Private Member Functions

 ClassDef (ComparisonResultList, 2)

Detailed Description

Definition at line 10 of file ComparisonResultList.h.


Constructor & Destructor Documentation

ComparisonResultList::ComparisonResultList (  ) 

Definition at line 11 of file ComparisonResultList.cxx.

00012 {
00013 
00014   //ComparisonResult *compres = new ComparisonResult();
00015   //compResultList.push_back(*compres);
00016 
00017 }

ComparisonResultList::~ComparisonResultList (  ) 

Definition at line 19 of file ComparisonResultList.cxx.

00020 {
00021 
00022   //compResultList.erase(compResultList.begin(),compResultList.end());
00023 
00024 }


Member Function Documentation

ComparisonResultList::ClassDef ( ComparisonResultList  ,
 
) [private]
void ComparisonResultList::Erase (  ) 

Definition at line 29 of file ComparisonResultList.cxx.

References compResultList.

00029                                 {
00030 
00031   compResultList.erase(compResultList.begin(),compResultList.end());
00032   
00033 }

void ComparisonResultList::InsertSorted ( ComparisonResult cr_in  ) 

Definition at line 78 of file ComparisonResultList.cxx.

References compResultList, ComparisonResult::dLnL, and it.

00078                                                               {
00079   list<ComparisonResult>::iterator it_beg = compResultList.begin();
00080   list<ComparisonResult>::iterator it_end = compResultList.end();
00081   list<ComparisonResult>::iterator it;
00082   for (it=it_beg;it!=it_end;++it) {
00083     if (cr_in->dLnL<(*it).dLnL) {
00084       // got the spot
00085       break;
00086     }
00087   }
00088   compResultList.insert(it,cr_in); // insert at spot (or end)
00089 }

float ComparisonResultList::LastDeltalnL (  ) 

Definition at line 43 of file ComparisonResultList.cxx.

References compResultList, and iter.

Referenced by MCNNRunner::CompactInput().

00043                                         {
00044 
00045   if(compResultList.size()>0){
00046     iter=compResultList.end();
00047     iter--;
00048     
00049     return (*iter).dLnL;
00050   } else {
00051     return 999999;
00052   }
00053 
00054 }

void ComparisonResultList::PopBack (  ) 

Definition at line 57 of file ComparisonResultList.cxx.

References compResultList.

00057                                   {
00058 
00059   compResultList.pop_back();
00060 
00061 }

void ComparisonResultList::PrintFirstLast (  ) 

Definition at line 93 of file ComparisonResultList.cxx.

References compResultList, and iter.

00093                                          {
00094 
00095   if(compResultList.size()>0){
00096     iter=compResultList.begin();
00097     cout << "*********** First out of " << compResultList.size() << endl;
00098     cout << "Neutrino type: " << (*iter).idnu << "," << (*iter).idact <<endl;
00099     cout << "Energy: " << (*iter).eNu << endl;
00100     cout << "Delta lnL: " << (*iter).dLnL << endl;
00101     iter=compResultList.end();
00102     iter--;
00103     cout << "*********** Last out of " << compResultList.size() << endl;
00104     cout << "Neutrino type: " << (*iter).idnu << "," << (*iter).idact <<endl;
00105     cout << "Energy: " << (*iter).eNu << endl;
00106     cout << "Delta lnL: " << (*iter).dLnL << endl;
00107   } else {
00108     cout << "--> ComparisonResultList is emtpy" << endl;
00109   }
00110 
00111 }

void ComparisonResultList::PushBack ( ComparisonResult cr_in  ) 

Definition at line 64 of file ComparisonResultList.cxx.

References compResultList.

00064                                                           {
00065 
00066   compResultList.push_back(*cr_in);
00067   
00068 }

int ComparisonResultList::Size ( void   ) 

Definition at line 36 of file ComparisonResultList.cxx.

References compResultList.

Referenced by MCNNRunner::CompactInput().

00036                               {
00037 
00038   return compResultList.size();
00039 
00040 }

void ComparisonResultList::Sort ( void   ) 

Definition at line 71 of file ComparisonResultList.cxx.

References compResultList.

00071                                {
00072 
00073   compResultList.sort();
00074 
00075 }


Member Data Documentation

Definition at line 24 of file ComparisonResultList.h.

Referenced by LastDeltalnL(), and PrintFirstLast().

Definition at line 25 of file ComparisonResultList.h.


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1