1#ifndef __JGIZMO__JROOTOBJECTID__
2#define __JGIZMO__JROOTOBJECTID__
60 const std::string&
name) :
75 const std::string& dir,
76 const std::string&
name) :
90 std::istringstream(full_name) >> *
this;
123 return TString(
name.c_str());
207 for (
int bracket = 0; in.peek() != EOF; ) {
209 const char c = (char) in.get();
219 }
else if (isspace(c)) {
231 if (pos != string::npos) {
233 object.file_name = buffer.substr(0, pos);
234 object.name = buffer.substr(pos + 1);
238 if (pos != string::npos) {
240 object.directory =
object.name.substr(0, pos);
241 object.name =
object.name.substr(pos + 1);
244 }
else if (!buffer.empty()) {
246 throw JParseError(
"JRootObjectID error parsing " + buffer);
262 return out <<
object.getFilename() <<
FILENAME_SEPARATOR <<
object.getFullObjectName();
Auxiliary class to handle file name, ROOT directory and object name.
JRootObjectID(const std::string &file_name, const std::string &dir, const std::string &name)
Constructor.
TString getObjectName() const
Get object name.
friend std::istream & operator>>(std::istream &in, JRootObjectID &object)
Read object identifier from input.
JRootObjectID()
Default constructor.
static const char PATHNAME_SEPARATOR
path name separator
JRootObjectID(const std::string &full_name)
Constructor.
friend bool operator==(const JRootObjectID &first, const JRootObjectID &second)
Equal operator for object identifiers.
static const char LABEL_L_BRACKET
left bracket for label
TString getFullFilename() const
Get full file name, including path.
friend std::ostream & operator<<(std::ostream &out, const JRootObjectID &object)
Write object identifier to output.
static const char LABEL_R_BRACKET
right bracket for label
TString getDirectory() const
Get directory.
const std::string & getFilename() const
Get file name.
bool is_valid() const
Check validity.
static const char FILENAME_SEPARATOR
file name separator
JRootObjectID(const std::string &file_name, const std::string &name)
Constructor.
TString getFullObjectName() const
Get full object name, including path.
Exception for parsing value.
Auxiliary applications for use of ROOT and more.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).