rarToyList Class Reference

#include <rarToyList.hh>

List of all members.

Public Member Functions

 rarToyList ()
virtual ~rarToyList ()
void setDataset (TString name, Double_t value)
void setInitial (TString parameter, Double_t value)
void setRequested (TString parameter, Double_t value)
void setFound (TString parameter, Double_t value)
void setUsed (TString parameter, Double_t value)
void setMethod (TString parameter, TString value)
void print () const
void reset ()

Private Member Functions

 ClassDef (rarToyList, 0)

Private Attributes

map< TString, Double_t > mapInitial
map< TString, Double_t > mapRequested
map< TString, Double_t > mapFound
map< TString, Double_t > mapUsed
map< TString, TString > mapMethod
TString datasetName
Double_t datasetEvts


Detailed Description

Definition at line 25 of file rarToyList.hh.


Constructor & Destructor Documentation

rarToyList::rarToyList (  )  [inline]

Definition at line 29 of file rarToyList.hh.

References datasetEvts, and datasetName.

00029 {datasetName= "unknown"; datasetEvts = -1;}

virtual rarToyList::~rarToyList (  )  [inline, virtual]

Definition at line 31 of file rarToyList.hh.

00031 {}


Member Function Documentation

rarToyList::ClassDef ( rarToyList  ,
 
) [private]

void rarToyList::print (  )  const

Definition at line 26 of file rarToyList.cc.

References datasetEvts, datasetName, mapFound, mapInitial, mapMethod, mapRequested, and mapUsed.

Referenced by rarMLFitter::doToyStudy().

00026                              {
00027   
00028   if (mapInitial.empty()) {
00029     cout << "No observables defined in Toy so nothing to print" <<endl;
00030     return;
00031   }
00032 
00033   typedef map<TString, Double_t> MapType;
00034   typedef map<TString, TString>  MapType2;
00035   
00036   Double_t nInit_tot(0), nReq_tot(0), nFound_tot(0), nUsed_tot(0);
00037   Int_t index(0);
00038 
00039   cout << endl;
00040   cout << "Summary of Toy. Dataset : " << datasetName << " with " << datasetEvts << " events " << endl;
00041   cout << " Ind     Observable  Initial  Request      Used Adj      Method" << endl;
00042   cout << " ---     ----------  -------  -------      ---- ---      ------" << endl;
00043 
00044   MapType::const_iterator it;
00045   for (it = mapInitial.begin(); it != mapInitial.end(); ++it) {
00046     TString obs = it->first;
00047     Double_t nInit = it->second;
00048     nInit_tot += nInit;
00049 
00050     // now look for other entries
00051     MapType::const_iterator iter1 = mapRequested.find(obs);
00052     Double_t nReq(0);
00053     if (iter1 != mapRequested.end()) {nReq = iter1->second;}
00054     nReq_tot += nReq;
00055 
00056     //
00057     MapType::const_iterator iter2 = mapFound.find(obs);
00058     Double_t nFound(0);
00059     if (iter2 != mapFound.end()) {nFound = iter2->second;}
00060     nFound_tot += nFound;
00061 
00062     //
00063     MapType::const_iterator iter3 = mapUsed.find(obs);
00064     Double_t nUsed(0);
00065     if (iter3 != mapUsed.end()) {nUsed = iter3->second;}
00066     nUsed_tot += nUsed;
00067 
00068     //
00069     MapType2::const_iterator iter4 = mapMethod.find(obs);
00070     TString method("unk");
00071     if (iter4 != mapMethod.end()) {method = iter4->second;}
00072 
00073     //
00074     TString adj("");
00075     if (nUsed != nReq) {adj = "*";}
00076 
00077     index++;
00078     TString line(Form("%4d %14s %8d %8d  %8d   %1s %11s", 
00079                       index, obs.Data(), 
00080                       (Int_t) nInit, (Int_t) nReq, (Int_t) nUsed, 
00081                       adj.Data(), method.Data()));
00082 
00083     cout << line << endl;
00084   }
00085 
00086   TString totals(Form("Totals: %20d %8d  %8d", (Int_t) nInit_tot, (Int_t) nReq_tot, (Int_t) nUsed_tot));
00087   cout << " ---     ----------  -------  -------      ---- ---      ------" << endl;
00088   cout << totals << endl;
00089   cout << endl;
00090   return;
00091 }

void rarToyList::reset (  )  [inline]

Definition at line 60 of file rarToyList.hh.

References mapFound, mapInitial, mapMethod, mapRequested, and mapUsed.

00060                       {
00061     mapInitial.clear(); 
00062     mapRequested.clear();
00063     mapFound.clear(); 
00064     mapUsed.clear(); 
00065     mapMethod.clear();
00066   }

void rarToyList::setDataset ( TString  name,
Double_t  value 
) [inline]

Definition at line 33 of file rarToyList.hh.

References datasetEvts, and datasetName.

Referenced by rarMLFitter::doToyStudy().

00033                                                        {
00034     datasetName = name;
00035     datasetEvts = value;
00036   }

void rarToyList::setFound ( TString  parameter,
Double_t  value 
) [inline]

Definition at line 46 of file rarToyList.hh.

References mapFound.

00046                                                           {
00047     mapFound[parameter] = value;
00048   }

void rarToyList::setInitial ( TString  parameter,
Double_t  value 
) [inline]

Definition at line 38 of file rarToyList.hh.

References mapInitial.

Referenced by rarMLFitter::doToyStudy().

00038                                                             {
00039     mapInitial[parameter] = value;
00040   }

void rarToyList::setMethod ( TString  parameter,
TString  value 
) [inline]

Definition at line 54 of file rarToyList.hh.

References mapMethod.

Referenced by rarMLFitter::doToyStudy().

00054                                                           {
00055     mapMethod[parameter] = value;
00056   }

void rarToyList::setRequested ( TString  parameter,
Double_t  value 
) [inline]

Definition at line 42 of file rarToyList.hh.

References mapRequested.

Referenced by rarMLFitter::doToyStudy().

00042                                                               {
00043     mapRequested[parameter] = value;
00044   }

void rarToyList::setUsed ( TString  parameter,
Double_t  value 
) [inline]

Definition at line 50 of file rarToyList.hh.

References mapUsed.

Referenced by rarMLFitter::doToyStudy().

00050                                                          {
00051     mapUsed[parameter] = value;
00052   }


Member Data Documentation

Double_t rarToyList::datasetEvts [private]

Definition at line 79 of file rarToyList.hh.

Referenced by print(), rarToyList(), and setDataset().

TString rarToyList::datasetName [private]

Definition at line 78 of file rarToyList.hh.

Referenced by print(), rarToyList(), and setDataset().

map<TString, Double_t> rarToyList::mapFound [private]

Definition at line 74 of file rarToyList.hh.

Referenced by print(), reset(), and setFound().

map<TString, Double_t> rarToyList::mapInitial [private]

Definition at line 72 of file rarToyList.hh.

Referenced by print(), reset(), and setInitial().

map<TString, TString> rarToyList::mapMethod [private]

Definition at line 76 of file rarToyList.hh.

Referenced by print(), reset(), and setMethod().

map<TString, Double_t> rarToyList::mapRequested [private]

Definition at line 73 of file rarToyList.hh.

Referenced by print(), reset(), and setRequested().

map<TString, Double_t> rarToyList::mapUsed [private]

Definition at line 75 of file rarToyList.hh.

Referenced by print(), reset(), and setUsed().


The documentation for this class was generated from the following files:
Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7