--- PamCut/CollectionActions/Histo1DActions/Histo1DAction/Histo1DAction.h 2009/10/27 10:17:46 1.2 +++ PamCut/CollectionActions/Histo1DActions/Histo1DAction/Histo1DAction.h 2009/12/08 17:37:25 1.4 @@ -154,11 +154,22 @@ // No ROOT histogram for generic type; see template specializations in .cpp file. _rootHisto = NULL; } +// Specializations for _CreateHistos(). See Histo1DAction.cpp +template<> +void Histo1DAction::_CreateHisto(); + +template<> +void Histo1DAction::_CreateHisto(); + +template<> +void Histo1DAction::_CreateHisto(); template void Histo1DAction::_InitHistos() { _CreateHisto(); + if (_bins.size() < 2) // SetXAxis not called by the main program, or wrongly filled (only 1 bin limit) + SetXAxis("Default X", 10, 0., 1.); if (_rootHisto) { Double_t *auxArray = new Double_t[_bins.size()]; @@ -183,6 +194,10 @@ template Histo1DAction::~Histo1DAction() { + + delete _rootHisto; + _rootHisto = NULL; + } template