4 #include "TPaletteAxis.h" 22 , _histograms(other._histograms)
23 , _h2ForPalette(other._h2ForPalette)
30 std::string thisName =
name() +
"_stack " + coord.
name();
37 if(0 == histo)
return;
38 if(0 == (*
this)[coord]){
42 ((*this)[coord])->Add(histo.
get());
48 for(map< DalitzCoordSet, DalitzHistogram>::const_iterator it = hL.
begin();
51 this->
add(it->second);
62 gStyle->SetNumberContours(
_ncol);
66 h2->Fill(0.5, 0.5, 0.5*
_min);
67 h2->Fill(1.5, 1.5,
_min);
68 h2->Fill(0.5, 1.5, 0.5*
_max);
69 h2->Fill(1.5, 0.5,
_max);
72 can.Print(
"colourScale.eps");
84 return (TPaletteAxis*)
getH2ForPalette()->GetListOfFunctions()->FindObject(
"palette");
88 ,
const std::string& drawOpt
89 ,
const std::string& format
95 cout <<
"Hello from DalitzHistoStackSet::draw" 96 <<
" with " << this->
size() <<
" histo stacks" << endl;
103 cout <<
"it->second is 0" << endl;
108 string fname = baseName + c.
nameFileSave() +
"." + format;
110 it->second->Draw(drawOpt.c_str());
111 cout <<
"drew histostack of size " << it->second->GetHists()->GetSize()
113 if(0 != pa) pa->Draw(
"SAME");
114 can.Print(fname.c_str());
115 cout <<
"printed histo to file " << fname << endl;
122 if(0 == nCol)
return;
std::string nameFileSave() const
virtual ~DalitzHistoStackSet()
TPaletteAxis * getPaletteAxis() const
MINT::const_counted_ptr< TH1 > histo() const
std::map< Key, Val >::iterator end()
virtual void add(const DalitzCoordSet &coord, const MINT::counted_ptr< TH1 > &histo)
MINT::counted_ptr< TH2F > getH2ForPalette() const
MINT::counted_ptr< THStack > makeHStack(const DalitzCoordSet &coord) const
bool draw(const std::string &baseName="", const std::string &drawOpt="HIST", const std::string &format="eps") const
MINT::counted_ptr< TH2F > _h2ForPalette
unsigned int size() const
const DalitzCoordSet & coord() const
std::vector< MINT::counted_ptr< TH1 * > > _histograms
std::map< Key, Val >::iterator begin()
const std::string & name() const
void setColourPalette(int nCol, int *pal, double max, double min=0.000001)
void makeH2ForPalette() const