rarToyList.hh

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Project: BaBar detector at the SLAC PEP-II B-factory
00003 * Package: RooRarFit
00004  *    File: $Id: rarToyList.rdl,v 1.2 2011/08/26 17:54:18 fwilson Exp $
00005  * Authors: Fergus Wilson
00006  * History:
00007  *
00008  * Copyright (C) 2005-2012, RAL
00009  *****************************************************************************/
00010 //
00011 //
00012 // A helper class to keep track of events used in Toys
00013 //
00014 //
00015 #ifndef RARTOYLIST_HH
00016 #define RARTOYLIST_HH
00017 
00018 #include "Riostream.h"
00019 #include "TString.h"
00020 
00021 #include <map>
00022 
00023 using namespace std;
00024 
00025 class rarToyList {
00026 
00027 public:
00028 
00029   rarToyList() {datasetName= "unknown"; datasetEvts = -1;}
00030 
00031   virtual ~rarToyList() {}
00032 
00033   inline void setDataset(TString name, Double_t value) {
00034     datasetName = name;
00035     datasetEvts = value;
00036   }
00037 
00038   inline void setInitial(TString parameter, Double_t value) {
00039     mapInitial[parameter] = value;
00040   }
00041 
00042   inline void setRequested(TString parameter, Double_t value) {
00043     mapRequested[parameter] = value;
00044   }
00045 
00046   inline void setFound(TString parameter, Double_t value) {
00047     mapFound[parameter] = value;
00048   }
00049 
00050   inline void setUsed(TString parameter, Double_t value) {
00051     mapUsed[parameter] = value;
00052   }
00053 
00054   inline void setMethod(TString parameter, TString value) {
00055     mapMethod[parameter] = value;
00056   }
00057 
00058   void print() const;
00059 
00060   inline void reset() {
00061     mapInitial.clear(); 
00062     mapRequested.clear();
00063     mapFound.clear(); 
00064     mapUsed.clear(); 
00065     mapMethod.clear();
00066   }
00067 
00068 private:
00069 
00070   // " Ind     Observable  Initial Request   Found      Used Adj  Method"
00071   // mapping with observable as key
00072   map<TString, Double_t> mapInitial;   // #events in PdfAct constructor
00073   map<TString, Double_t> mapRequested; // #events requested from ToyAct
00074   map<TString, Double_t> mapFound;     // #events available from pdf/data
00075   map<TString, Double_t> mapUsed;      // #events finally used in Toy
00076   map<TString, TString>  mapMethod;    // method type pdf/data ...
00077 
00078   TString  datasetName; // events in the protodataset
00079   Double_t datasetEvts; // events in the protodataset
00080 
00081   ClassDef(rarToyList,0);
00082 
00083 };
00084 
00085 #endif

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7