// ---------------------------------------------------------------------- // // RootNameTag -- implementation of the root 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 Root. // isValid is set to false the name tag parsed was not correctly formed. // // The following method are defined in this file: // RootNameTag() // RootNameTag(const string& tag) // init(string tag) // bool isValidBlockName(const string name) // bool isValidColumnName(const string name) #include "HepTuple/RootNameTag.h" #include USING( std::string ) ZM_BEGIN_NAMESPACE( zmht ) /* namespace zmht { */ // empty constructor to be called by sub-class RootNameTag::RootNameTag() : 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!!! /* RootNameTag::RootNameTag(const string& tag,bool withIndices ) : TupleNameTag() { init(tag,withIndices); } */ // Check that the name contains any forbidden characters // and that it is less than 8 characters. bool RootNameTag::isValidBlockName( const string& name) const { return ( TupleNameTag::isValidBlockName(name) && ( name.length() <= 256 ) ); } // Check that the name contains any forbidden characters // and that it is less than 8 characters. bool RootNameTag::isValidColumnName( const string& name) const { return ( TupleNameTag::isValidColumnName(name) && ( name.length() <= 256 ) ); } ZM_END_NAMESPACE( zmht ) /* } // namespace zmht */