// ----------------------------------------------------------------------
//
// HistoNameTag -- implementation of the histo name tag parsing.
//
// This simple structure is used to parse a column name for a ntuple
// that can be of the form "[block_name::]column_name"
// The block name is an alpha numerical string whithout any white space.
// The column name is as defined by Histo.
// isValid is set to false the name tag parsed was not correctly formed.
//
// The following method are defined in this file:
//	HistoNameTag()
//      HistoNameTag(const string& tag)
//      init(string tag)
// bool isValidBlockName(const string name)
// bool isValidColumnName(const string name)

#include "HepTuple/HistoNameTag.h"

#include <string>
USING( std::string )


ZM_BEGIN_NAMESPACE( zmht )	/*  namespace zmht  {  */


// empty constructor to be called by sub-class
HistoNameTag::HistoNameTag() : TupleNameTag() {}

// Public constructor.  Run init to actually set _block and _column
// to their proper value.
// Using an init function allow for sub-class to use the same
// initialization sequence with virtual functions!!!
/*
HistoNameTag::HistoNameTag(const string& tag,bool withIndices ) : TupleNameTag() {
  init(tag,withIndices);
}
*/

// Check that the name contains any forbidden characters
bool HistoNameTag::isValidBlockName( const string& name) const {
  return (    TupleNameTag::isValidBlockName(name) );
}

// Check that the name contains any forbidden characters
bool HistoNameTag::isValidColumnName( const string& name) const {
  return (    TupleNameTag::isValidColumnName(name) );
}


ZM_END_NAMESPACE( zmht )	/*  }  // namespace zmht  */
