--- PamCut/CollectionActions/Histo2DActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp 2009/09/25 15:36:35 1.1 +++ PamCut/CollectionActions/Histo2DActions/TofDedxVsBetaHistoAction/TofDedxVsBetaHistoAction.cpp 2011/12/21 18:24:26 1.1.2.1 @@ -11,49 +11,63 @@ TofDedxVsBetaHistoAction::TofDedxVsBetaHistoAction(const char *actionName, unsigned int layers, bool standAlone, TString outFileBase, TString mode, bool outRoot, bool outText, TString title) : - Histo2DAction (actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0), - _badEvents(0), _standAlone(standAlone) { + Histo2DAction(actionName, title, outFileBase, mode, outRoot, outText), _layers(layers), _nLayers(0), _badEvents( + 0), _standAlone(standAlone) { + bool buildTitle = false; if (title == "") { + buildTitle = true; title = "TOF dE/dx ("; - if ((_layers & S11) == S11) { + } + if ((_layers & S11) == S11) { + if (buildTitle) title += "S11"; - _nLayers++; - } - if ((_layers & S12) == S12) { + _nLayers++; + } + if ((_layers & S12) == S12) { + if (buildTitle) { if (_nLayers > 0) title += ","; title += "S12"; - _nLayers++; } - if ((_layers & S21) == S21) { + _nLayers++; + } + if ((_layers & S21) == S21) { + if (buildTitle) { if (_nLayers > 0) title += ","; title += "S21"; - _nLayers++; } - if ((_layers & S22) == S22) { + _nLayers++; + } + if ((_layers & S22) == S22) { + if (buildTitle) { if (_nLayers > 0) title += ","; title += "S22"; - _nLayers++; } - if ((_layers & S31) == S31) { + _nLayers++; + } + if ((_layers & S31) == S31) { + if (buildTitle) { if (_nLayers > 0) title += ","; title += "S31"; - _nLayers++; } - if ((_layers & S32) == S32) { + _nLayers++; + } + if ((_layers & S32) == S32) { + if (buildTitle) { if (_nLayers > 0) title += ","; title += "S32"; - _nLayers++; } + _nLayers++; + } + if (buildTitle) title += ") Vs Beta"; - SetTitle(title); - } + SetTitle(title); }