Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:37

0001 // -*- C++ -*-
0002 //
0003 // Package:     Core
0004 // Class  :     FWEDProductRepresentationChecker
0005 //
0006 // Implementation:
0007 //     <Notes on implementation>
0008 //
0009 // Original Author:  Chris Jones
0010 //         Created:  Tue Nov 11 15:20:10 EST 2008
0011 //
0012 
0013 // system include files
0014 #include "TClass.h"
0015 
0016 // user include files
0017 #include "Fireworks/Core/interface/FWEDProductRepresentationChecker.h"
0018 
0019 #include "Fireworks/Core/interface/FWRepresentationInfo.h"
0020 //
0021 // constants, enums and typedefs
0022 //
0023 
0024 //
0025 // static data member definitions
0026 //
0027 
0028 //
0029 // constructors and destructor
0030 //
0031 FWEDProductRepresentationChecker::FWEDProductRepresentationChecker(const std::string& iTypeidName,
0032                                                                    const std::string& iPurpose,
0033                                                                    unsigned int iBitPackedViews,
0034                                                                    bool iRepresentsSubPart,
0035                                                                    bool iRequiresFF)
0036     : FWRepresentationCheckerBase(iPurpose, iBitPackedViews, iRepresentsSubPart, iRequiresFF),
0037       m_typeidName(iTypeidName) {}
0038 
0039 // FWEDProductRepresentationChecker::FWEDProductRepresentationChecker(const FWEDProductRepresentationChecker& rhs)
0040 // {
0041 //    // do actual copying here;
0042 // }
0043 
0044 //FWEDProductRepresentationChecker::~FWEDProductRepresentationChecker()
0045 //{
0046 //}
0047 
0048 //
0049 // assignment operators
0050 //
0051 // const FWEDProductRepresentationChecker& FWEDProductRepresentationChecker::operator=(const FWEDProductRepresentationChecker& rhs)
0052 // {
0053 //   //An exception safe implementation is
0054 //   FWEDProductRepresentationChecker temp(rhs);
0055 //   swap(rhs);
0056 //
0057 //   return *this;
0058 // }
0059 
0060 //
0061 // member functions
0062 //
0063 
0064 //
0065 // const member functions
0066 //
0067 FWRepresentationInfo FWEDProductRepresentationChecker::infoFor(const std::string& iTypeName) const {
0068   TClass* clss = TClass::GetClass(iTypeName.c_str());
0069   if (nullptr == clss || clss->GetTypeInfo() == nullptr) {
0070     return FWRepresentationInfo();
0071   }
0072   if (clss->GetTypeInfo()->name() == m_typeidName) {
0073     return FWRepresentationInfo(purpose(), 0, bitPackedViews(), representsSubPart(), requiresFF());
0074   }
0075   return FWRepresentationInfo();
0076 }
0077 
0078 //
0079 // static member functions
0080 //