00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "RooFit.h"
00030
00031 #include "Riostream.h"
00032
00033 #include "RooArgSet.h"
00034 #include "RooArgSet.h"
00035 #include "RooAbsHiddenReal.h"
00036 #include "RooCategory.h"
00037 #include "RooMsgService.h"
00038
00039 ClassImp(RooAbsHiddenReal)
00040 ;
00041
00042 RooCategory* RooAbsHiddenReal::_dummyBlindState = 0;
00043
00044
00045
00046 RooAbsHiddenReal::RooAbsHiddenReal(const char *name, const char *title, const char* unit)
00047 : RooAbsReal(name,title,unit),
00048 _state("state","Blinding state",this,dummyBlindState())
00049 {
00050
00051 }
00052
00053
00054
00055
00056 RooAbsHiddenReal::RooAbsHiddenReal(const char *name, const char *title, RooAbsCategory& blindState, const char* unit)
00057 : RooAbsReal(name,title,unit),
00058 _state("state","Blinding state",this,blindState)
00059 {
00060
00061 }
00062
00063
00064
00065
00066 RooAbsHiddenReal::RooAbsHiddenReal(const RooAbsHiddenReal& other, const char* name) :
00067 RooAbsReal(other, name),
00068 _state("state",this,other._state)
00069 {
00070
00071 }
00072
00073
00074
00075
00076 RooAbsHiddenReal::~RooAbsHiddenReal()
00077 {
00078
00079 }
00080
00081
00082
00083
00084 void RooAbsHiddenReal::printValue(ostream& os) const
00085 {
00086
00087
00088 os << "(hidden)" ;
00089 }
00090
00091
00092
00093
00094 Bool_t RooAbsHiddenReal::readFromStream(istream& is, Bool_t compact, Bool_t verbose)
00095 {
00096
00097
00098 if (isHidden()) {
00099
00100 coutE(InputArguments) << "RooAbsHiddenReal::readFromStream(" << GetName() << "): not allowed" << endl ;
00101 return kTRUE ;
00102 } else {
00103 return readFromStream(is,compact,verbose) ;
00104 }
00105 }
00106
00107
00108
00109
00110 void RooAbsHiddenReal::writeToStream(ostream& os, Bool_t compact) const
00111 {
00112
00113
00114 if (isHidden()) {
00115
00116 coutE(InputArguments) << "RooAbsHiddenReal::writeToStream(" << GetName() << "): not allowed" << endl ;
00117 } else {
00118 RooAbsReal::writeToStream(os,compact) ;
00119 }
00120 }
00121
00122
00123
00124
00125 RooAbsCategory& RooAbsHiddenReal::dummyBlindState() const
00126 {
00127
00128
00129
00130 if (!_dummyBlindState) {
00131 _dummyBlindState = new RooCategory("dummyBlindState","dummy blinding state") ;
00132 _dummyBlindState->defineType("Normal",0) ;
00133 _dummyBlindState->defineType("Blind",1) ;
00134 _dummyBlindState->setIndex(1) ;
00135 }
00136 return *_dummyBlindState ;
00137 }
00138
00139