CMS 3D CMS Logo

ItemDescriptor.cc
Go to the documentation of this file.
1 #include "Alignment/Geners/interface/IOException.hh"
2 
3 #include "Alignment/Geners/interface/ItemDescriptor.hh"
4 
5 namespace gs {
6  ItemDescriptor::ItemDescriptor() : classId_(ClassId::invalidId()) {}
7 
8  ItemDescriptor::ItemDescriptor(const ClassId &classId, const char *ioPrototype, const char *name, const char *categ)
9  : classId_(classId),
10  ioProto_(ioPrototype ? ioPrototype : ""),
11  nameCat_(name ? std::string(name) : std::string(""), categ ? std::string(categ) : std::string("")) {
12  if (classId_.name().empty())
13  throw gs::IOInvalidArgument("In ItemDescriptor constructor: invalid class id");
14  }
15 
16  bool ItemDescriptor::isSameClassIdandIO(const ItemDescriptor &r) const {
17  return !classId_.name().empty() && classId_.name() == r.classId_.name() && ioProto_ == r.ioProto_;
18  }
19 
20  bool ItemDescriptor::isEqual(const ItemDescriptor &r) const {
21  return !classId_.name().empty() && classId_ == r.classId_ && ioProto_ == r.ioProto_ && nameCat_ == r.nameCat_;
22  }
23 } // namespace gs
gs
Definition: AbsArchive.cc:45
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
alignCSCRings.r
r
Definition: alignCSCRings.py:93
std
Definition: JetResolutionObject.h:76
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17