Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:56:21

0001 #include "Alignment/Geners/interface/IOException.hh"
0002 
0003 #include "Alignment/Geners/interface/ItemDescriptor.hh"
0004 
0005 namespace gs {
0006   ItemDescriptor::ItemDescriptor() : classId_(ClassId::invalidId()) {}
0007 
0008   ItemDescriptor::ItemDescriptor(const ClassId &classId, const char *ioPrototype, const char *name, const char *categ)
0009       : classId_(classId),
0010         ioProto_(ioPrototype ? ioPrototype : ""),
0011         nameCat_(name ? std::string(name) : std::string(""), categ ? std::string(categ) : std::string("")) {
0012     if (classId_.name().empty())
0013       throw gs::IOInvalidArgument("In ItemDescriptor constructor: invalid class id");
0014   }
0015 
0016   bool ItemDescriptor::isSameClassIdandIO(const ItemDescriptor &r) const {
0017     return !classId_.name().empty() && classId_.name() == r.classId_.name() && ioProto_ == r.ioProto_;
0018   }
0019 
0020   bool ItemDescriptor::isEqual(const ItemDescriptor &r) const {
0021     return !classId_.name().empty() && classId_ == r.classId_ && ioProto_ == r.ioProto_ && nameCat_ == r.nameCat_;
0022   }
0023 }  // namespace gs