Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
//

//TO DO: add the comparison between stored object and input object - bool cond::serialization::equal( obj,read_back_copy )
#define IMPORT_PAYLOAD_CASE(TYPENAME)                                                               \
  if (inputTypeName == #TYPENAME) {                                                                 \
    match = true;                                                                                   \
    const TYPENAME& obj = *static_cast<const TYPENAME*>(inputPtr);                                  \
    payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time()); \
  }

#include "CondCore/CondDB/interface/Serialization.h"

#include "CondCore/Utilities/interface/CondDBImport.h"
#include "CondCore/CondDB/interface/Exception.h"
#include "CondFormats.h"

//
#include <memory>
#include <sstream>

namespace cond {

  namespace persistency {

    std::pair<std::string, std::shared_ptr<void> > fetchIfExists(const cond::Hash& payloadId,
                                                                 Session& session,
                                                                 bool& exists) {
      std::shared_ptr<void> payloadPtr;
      cond::Binary data;
      cond::Binary streamerInfo;
      std::string payloadTypeName;
      exists = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo);
      if (exists) {
        return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr);
      } else
        return std::make_pair(std::string(""), std::shared_ptr<void>());
    }

    cond::Hash import(Session& source,
                      const cond::Hash& sourcePayloadId,
                      const std::string& inputTypeName,
                      const void* inputPtr,
                      Session& destination) {
      cond::Hash payloadId("");
      bool newInsert = false;
      bool match = false;
      if (inputPtr) {
        IMPORT_PAYLOAD_CASE(std::string)
        IMPORT_PAYLOAD_CASE(std::vector<unsigned long long>)
        IMPORT_PAYLOAD_CASE(AlCaRecoTriggerBits)
        IMPORT_PAYLOAD_CASE(AlignmentErrors)
        IMPORT_PAYLOAD_CASE(AlignmentErrorsExtended)
        IMPORT_PAYLOAD_CASE(AlignmentSurfaceDeformations)
        IMPORT_PAYLOAD_CASE(Alignments)
        IMPORT_PAYLOAD_CASE(AlignPCLThresholds)
        IMPORT_PAYLOAD_CASE(AlignPCLThresholdsHG)
        IMPORT_PAYLOAD_CASE(BeamSpotObjects)
        IMPORT_PAYLOAD_CASE(BeamSpotOnlineObjects)
        IMPORT_PAYLOAD_CASE(CSCBadChambers)
        IMPORT_PAYLOAD_CASE(CSCBadStrips)
        IMPORT_PAYLOAD_CASE(CSCBadWires)
        IMPORT_PAYLOAD_CASE(CSCChamberIndex)
        IMPORT_PAYLOAD_CASE(CSCChamberMap)
        IMPORT_PAYLOAD_CASE(CSCChamberTimeCorrections)
        IMPORT_PAYLOAD_CASE(CSCCrateMap)
        IMPORT_PAYLOAD_CASE(CSCDBChipSpeedCorrection)
        IMPORT_PAYLOAD_CASE(CSCDBCrosstalk)
        IMPORT_PAYLOAD_CASE(CSCDBGains)
        IMPORT_PAYLOAD_CASE(CSCDBGasGainCorrection)
        IMPORT_PAYLOAD_CASE(CSCDBL1TPParameters)
        IMPORT_PAYLOAD_CASE(CSCDBNoiseMatrix)
        IMPORT_PAYLOAD_CASE(CSCDBPedestals)
        IMPORT_PAYLOAD_CASE(CSCDDUMap)
        IMPORT_PAYLOAD_CASE(CSCL1TPParameters)
        IMPORT_PAYLOAD_CASE(CSCRecoDigiParameters)
        IMPORT_PAYLOAD_CASE(CTPPSPixelDAQMapping)
        IMPORT_PAYLOAD_CASE(CTPPSPixelAnalysisMask)
        IMPORT_PAYLOAD_CASE(CTPPSPixelGainCalibrations)
        IMPORT_PAYLOAD_CASE(CTPPSRPAlignmentCorrectionsData)
        IMPORT_PAYLOAD_CASE(PPSAlignmentConfiguration)
        IMPORT_PAYLOAD_CASE(PPSAssociationCuts)
        IMPORT_PAYLOAD_CASE(LHCOpticalFunctionsSetCollection)
        IMPORT_PAYLOAD_CASE(CastorChannelQuality)
        IMPORT_PAYLOAD_CASE(CastorElectronicsMap)
        IMPORT_PAYLOAD_CASE(CastorGainWidths)
        IMPORT_PAYLOAD_CASE(CastorGains)
        IMPORT_PAYLOAD_CASE(CastorPedestalWidths)
        IMPORT_PAYLOAD_CASE(CastorPedestals)
        IMPORT_PAYLOAD_CASE(CastorQIEData)
        IMPORT_PAYLOAD_CASE(CastorRecoParams)
        IMPORT_PAYLOAD_CASE(CastorSaturationCorrs)
        IMPORT_PAYLOAD_CASE(CentralityTable)
        IMPORT_PAYLOAD_CASE(DeDxCalibration)
        IMPORT_PAYLOAD_CASE(DTCCBConfig)
        IMPORT_PAYLOAD_CASE(DTDeadFlag)
        IMPORT_PAYLOAD_CASE(DTHVStatus)
        IMPORT_PAYLOAD_CASE(DTKeyedConfig)
        IMPORT_PAYLOAD_CASE(DTLVStatus)
        IMPORT_PAYLOAD_CASE(DTMtime)
        IMPORT_PAYLOAD_CASE(DTReadOutMapping)
        IMPORT_PAYLOAD_CASE(DTRecoConditions)
        IMPORT_PAYLOAD_CASE(DTRecoUncertainties)
        IMPORT_PAYLOAD_CASE(DTStatusFlag)
        IMPORT_PAYLOAD_CASE(DTT0)
        IMPORT_PAYLOAD_CASE(DTTPGParameters)
        IMPORT_PAYLOAD_CASE(DTTtrig)
        IMPORT_PAYLOAD_CASE(DropBoxMetadata)
        IMPORT_PAYLOAD_CASE(ESChannelStatus)
        IMPORT_PAYLOAD_CASE(ESEEIntercalibConstants)
        IMPORT_PAYLOAD_CASE(ESFloatCondObjectContainer)
        IMPORT_PAYLOAD_CASE(ESGain)
        IMPORT_PAYLOAD_CASE(ESMIPToGeVConstant)
        IMPORT_PAYLOAD_CASE(ESMissingEnergyCalibration)
        IMPORT_PAYLOAD_CASE(ESPedestals)
        IMPORT_PAYLOAD_CASE(ESRecHitRatioCuts)
        IMPORT_PAYLOAD_CASE(ESThresholds)
        IMPORT_PAYLOAD_CASE(ESTimeSampleWeights)
        IMPORT_PAYLOAD_CASE(EcalADCToGeVConstant)
        IMPORT_PAYLOAD_CASE(EcalChannelStatus)
        IMPORT_PAYLOAD_CASE(EcalClusterEnergyCorrectionObjectSpecificParameters)
        IMPORT_PAYLOAD_CASE(EcalDAQTowerStatus)
        IMPORT_PAYLOAD_CASE(EcalDCSTowerStatus)
        IMPORT_PAYLOAD_CASE(EcalDQMChannelStatus)
        IMPORT_PAYLOAD_CASE(EcalDQMTowerStatus)
        IMPORT_PAYLOAD_CASE(EcalFloatCondObjectContainer)
        IMPORT_PAYLOAD_CASE(EcalFunParams)
        IMPORT_PAYLOAD_CASE(EcalGainRatios)
        IMPORT_PAYLOAD_CASE(EcalLaserAPDPNRatios)
        IMPORT_PAYLOAD_CASE(EcalMappingElectronics)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalMappingElement>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalPedestal>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalTPGLinearizationConstant>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalDQMStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalTPGCrystalStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalCondTowerObjectContainer<EcalDAQStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalCondTowerObjectContainer<EcalChannelStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalCondTowerObjectContainer<EcalDQMStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalPedestals)
        IMPORT_PAYLOAD_CASE(EcalSRSettings)
        IMPORT_PAYLOAD_CASE(EcalSampleMask)
        IMPORT_PAYLOAD_CASE(EcalTBWeights)
        IMPORT_PAYLOAD_CASE(EcalTPGCrystalStatus)
        IMPORT_PAYLOAD_CASE(EcalTPGFineGrainEBGroup)
        IMPORT_PAYLOAD_CASE(EcalTPGFineGrainEBIdMap)
        IMPORT_PAYLOAD_CASE(EcalTPGFineGrainStripEE)
        IMPORT_PAYLOAD_CASE(EcalTPGFineGrainTowerEE)
        IMPORT_PAYLOAD_CASE(EcalTPGLinearizationConst)
        IMPORT_PAYLOAD_CASE(EcalTPGLutGroup)
        IMPORT_PAYLOAD_CASE(EcalTPGLutIdMap)
        IMPORT_PAYLOAD_CASE(EcalTPGPedestals)
        IMPORT_PAYLOAD_CASE(EcalTPGPhysicsConst)
        IMPORT_PAYLOAD_CASE(EcalTPGSlidingWindow)
        IMPORT_PAYLOAD_CASE(EcalTPGSpike)
        IMPORT_PAYLOAD_CASE(EcalTPGStripStatus)
        IMPORT_PAYLOAD_CASE(EcalTPGTowerStatus)
        IMPORT_PAYLOAD_CASE(EcalTPGWeightGroup)
        IMPORT_PAYLOAD_CASE(EcalTPGWeightIdMap)
        IMPORT_PAYLOAD_CASE(EcalTimeBiasCorrections)
        IMPORT_PAYLOAD_CASE(EcalTimeOffsetConstant)
        IMPORT_PAYLOAD_CASE(EcalTimeDependentCorrections)
        IMPORT_PAYLOAD_CASE(EcalWeightXtalGroups)
        IMPORT_PAYLOAD_CASE(EcalSamplesCorrelation)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalPulseShape>)
        IMPORT_PAYLOAD_CASE(EcalPulseShape)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalPulseCovariance>)
        IMPORT_PAYLOAD_CASE(EcalPulseCovariance)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalPulseSymmCovariance>)
        IMPORT_PAYLOAD_CASE(EcalPulseSymmCovariance)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGAmplWeightIdMap)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGAmplWeights)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGTimeWeightIdMap)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGTimeWeights)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGPedestal)
        IMPORT_PAYLOAD_CASE(EcalEBPhase2TPGLinearizationConstant)
        IMPORT_PAYLOAD_CASE(FileBlob)
        IMPORT_PAYLOAD_CASE(GBRForest)
        IMPORT_PAYLOAD_CASE(GBRForestD)
        IMPORT_PAYLOAD_CASE(GEMChMap)
        IMPORT_PAYLOAD_CASE(GEMMaskedStrips)
        IMPORT_PAYLOAD_CASE(GEMDeadStrips)
        IMPORT_PAYLOAD_CASE(HBHENegativeEFilter)
        IMPORT_PAYLOAD_CASE(HFPhase1PMTParams)
        IMPORT_PAYLOAD_CASE(HcalChannelQuality)
        IMPORT_PAYLOAD_CASE(HcalDcsValues)
        IMPORT_PAYLOAD_CASE(HcalElectronicsMap)
        IMPORT_PAYLOAD_CASE(HcalFlagHFDigiTimeParams)
        IMPORT_PAYLOAD_CASE(HcalFrontEndMap)
        IMPORT_PAYLOAD_CASE(HcalGains)
        IMPORT_PAYLOAD_CASE(HcalGainWidths)
        IMPORT_PAYLOAD_CASE(HcalL1TriggerObjects)
        IMPORT_PAYLOAD_CASE(HcalLUTCorrs)
        IMPORT_PAYLOAD_CASE(HcalLongRecoParams)
        IMPORT_PAYLOAD_CASE(HcalZDCLowGainFractions)
        IMPORT_PAYLOAD_CASE(HcalLutMetadata)
        IMPORT_PAYLOAD_CASE(HcalMCParams)
        IMPORT_PAYLOAD_CASE(HcalPFCorrs)
        IMPORT_PAYLOAD_CASE(HcalPFCuts)
        IMPORT_PAYLOAD_CASE(HcalPedestalWidths)
        IMPORT_PAYLOAD_CASE(HcalPedestals)
        IMPORT_PAYLOAD_CASE(HcalQIEData)
        IMPORT_PAYLOAD_CASE(HcalRecoParams)
        IMPORT_PAYLOAD_CASE(HcalRespCorrs)
        IMPORT_PAYLOAD_CASE(HcalSiPMCharacteristics)
        IMPORT_PAYLOAD_CASE(HcalSiPMParameters)
        IMPORT_PAYLOAD_CASE(HcalTimeCorrs)
        IMPORT_PAYLOAD_CASE(HcalTPChannelParameters)
        IMPORT_PAYLOAD_CASE(HcalTPParameters)
        IMPORT_PAYLOAD_CASE(HcalZSThresholds)
        IMPORT_PAYLOAD_CASE(HcalInterpolatedPulseColl)
        IMPORT_PAYLOAD_CASE(JetCorrectorParametersCollection)
        IMPORT_PAYLOAD_CASE(JME::JetResolutionObject)
        IMPORT_PAYLOAD_CASE(METCorrectorParametersCollection)
        IMPORT_PAYLOAD_CASE(MEtXYcorrectParametersCollection)
        IMPORT_PAYLOAD_CASE(L1CaloEcalScale)
        IMPORT_PAYLOAD_CASE(L1CaloEtScale)
        IMPORT_PAYLOAD_CASE(L1CaloGeometry)
        IMPORT_PAYLOAD_CASE(L1CaloHcalScale)
        IMPORT_PAYLOAD_CASE(L1GctChannelMask)
        IMPORT_PAYLOAD_CASE(L1GctJetFinderParams)
        IMPORT_PAYLOAD_CASE(L1GtBoardMaps)
        IMPORT_PAYLOAD_CASE(L1GtParameters)
        IMPORT_PAYLOAD_CASE(L1GtPrescaleFactors)
        IMPORT_PAYLOAD_CASE(L1GtPsbSetup)
        IMPORT_PAYLOAD_CASE(L1GtStableParameters)
        IMPORT_PAYLOAD_CASE(L1GtTriggerMask)
        IMPORT_PAYLOAD_CASE(L1GtTriggerMenu)
        IMPORT_PAYLOAD_CASE(L1MuCSCPtLut)
        IMPORT_PAYLOAD_CASE(L1MuCSCTFAlignment)
        IMPORT_PAYLOAD_CASE(L1MuCSCTFConfiguration)
        IMPORT_PAYLOAD_CASE(L1MuDTEtaPatternLut)
        IMPORT_PAYLOAD_CASE(L1MuDTExtLut)
        IMPORT_PAYLOAD_CASE(L1MuDTPhiLut)
        IMPORT_PAYLOAD_CASE(L1MuDTPtaLut)
        IMPORT_PAYLOAD_CASE(L1MuDTQualPatternLut)
        IMPORT_PAYLOAD_CASE(L1MuDTTFMasks)
        IMPORT_PAYLOAD_CASE(L1MuDTTFParameters)
        IMPORT_PAYLOAD_CASE(L1MuGMTChannelMask)
        IMPORT_PAYLOAD_CASE(L1MuGMTParameters)
        IMPORT_PAYLOAD_CASE(L1MuGMTScales)
        IMPORT_PAYLOAD_CASE(L1MuTriggerPtScale)
        IMPORT_PAYLOAD_CASE(L1MuTriggerScales)
        IMPORT_PAYLOAD_CASE(L1RCTChannelMask)
        IMPORT_PAYLOAD_CASE(L1RCTNoisyChannelMask)
        IMPORT_PAYLOAD_CASE(L1RCTParameters)
        IMPORT_PAYLOAD_CASE(L1RPCBxOrConfig)
        IMPORT_PAYLOAD_CASE(L1RPCConeDefinition)
        IMPORT_PAYLOAD_CASE(L1RPCConfig)
        IMPORT_PAYLOAD_CASE(L1RPCHsbConfig)
        IMPORT_PAYLOAD_CASE(L1RPCHwConfig)
        IMPORT_PAYLOAD_CASE(l1t::CaloParams)
        IMPORT_PAYLOAD_CASE(l1t::CaloConfig)
        IMPORT_PAYLOAD_CASE(L1TMuonBarrelParams)
        IMPORT_PAYLOAD_CASE(L1TMuonGlobalParams)
        IMPORT_PAYLOAD_CASE(L1TMuonOverlapParams)
        IMPORT_PAYLOAD_CASE(L1TUtmAlgorithm)
        IMPORT_PAYLOAD_CASE(L1TUtmBin)
        IMPORT_PAYLOAD_CASE(L1TUtmCondition)
        IMPORT_PAYLOAD_CASE(L1TUtmCut)
        IMPORT_PAYLOAD_CASE(L1TUtmCutValue)
        IMPORT_PAYLOAD_CASE(L1TUtmObject)
        IMPORT_PAYLOAD_CASE(L1TUtmScale)
        IMPORT_PAYLOAD_CASE(L1TUtmTriggerMenu)
        IMPORT_PAYLOAD_CASE(L1TGlobalParameters)
        IMPORT_PAYLOAD_CASE(L1TriggerKey)
        IMPORT_PAYLOAD_CASE(MagFieldConfig)
        if (inputTypeName == "L1TriggerKeyList") {
          throwException("Import of \"L1TriggerKeyList\" type payloads is not supported.", "import");
        }
        //IMPORT_PAYLOAD_CASE( L1TriggerKeyList )
        IMPORT_PAYLOAD_CASE(lumi::LumiSectionData)
        IMPORT_PAYLOAD_CASE(MixingModuleConfig)
        IMPORT_PAYLOAD_CASE(MuScleFitDBobject)
        IMPORT_PAYLOAD_CASE(DYTThrObject)
        IMPORT_PAYLOAD_CASE(DYTParamObject)
        IMPORT_PAYLOAD_CASE(OOTPileupCorrectionBuffer)
        IMPORT_PAYLOAD_CASE(StorableDoubleMap<AbsOOTPileupCorrection>)
        IMPORT_PAYLOAD_CASE(PhysicsTools::Calibration::MVAComputerContainer)
        IMPORT_PAYLOAD_CASE(PCaloGeometry)
        IMPORT_PAYLOAD_CASE(HcalParameters)
        IMPORT_PAYLOAD_CASE(PGeometricDet)
        IMPORT_PAYLOAD_CASE(PTrackerParameters)
        IMPORT_PAYLOAD_CASE(PTrackerAdditionalParametersPerDet)
        IMPORT_PAYLOAD_CASE(PHGCalParameters)
        //IMPORT_PAYLOAD_CASE( PerformancePayload )
        IMPORT_PAYLOAD_CASE(PerformancePayloadFromTable)
        IMPORT_PAYLOAD_CASE(PerformancePayloadFromTFormula)
        IMPORT_PAYLOAD_CASE(PerformancePayloadFromBinnedTFormula)
        IMPORT_PAYLOAD_CASE(PerformanceWorkingPoint)
        IMPORT_PAYLOAD_CASE(PhysicsTGraphPayload)
        IMPORT_PAYLOAD_CASE(PhysicsTFormulaPayload)
        IMPORT_PAYLOAD_CASE(PhysicsTools::Calibration::HistogramD3D)
        IMPORT_PAYLOAD_CASE(PPSTimingCalibration)
        IMPORT_PAYLOAD_CASE(QGLikelihoodCategory)
        IMPORT_PAYLOAD_CASE(QGLikelihoodObject)
        IMPORT_PAYLOAD_CASE(QGLikelihoodSystematicsObject)
        IMPORT_PAYLOAD_CASE(RPCEMap)
        IMPORT_PAYLOAD_CASE(RPCClusterSize)
        IMPORT_PAYLOAD_CASE(RPCStripNoises)
        IMPORT_PAYLOAD_CASE(RPCObFebmap)
        IMPORT_PAYLOAD_CASE(RPCObGas)
        IMPORT_PAYLOAD_CASE(RPCObImon)
        IMPORT_PAYLOAD_CASE(RPCObGasMix)
        IMPORT_PAYLOAD_CASE(RPCObPVSSmap)
        IMPORT_PAYLOAD_CASE(RPCObStatus)
        IMPORT_PAYLOAD_CASE(RPCObTemp)
        IMPORT_PAYLOAD_CASE(RPCObUXC)
        IMPORT_PAYLOAD_CASE(RPCObVmon)
        IMPORT_PAYLOAD_CASE(RPCLBLinkMap)
        IMPORT_PAYLOAD_CASE(RPCDCCLinkMap)
        IMPORT_PAYLOAD_CASE(RPCAMCLinkMap)
        IMPORT_PAYLOAD_CASE(RPFlatParams)
        IMPORT_PAYLOAD_CASE(RecoIdealGeometry)
        IMPORT_PAYLOAD_CASE(RunInfo)
        IMPORT_PAYLOAD_CASE(SimBeamSpotObjects)
        IMPORT_PAYLOAD_CASE(SimBeamSpotHLLHCObjects)
        IMPORT_PAYLOAD_CASE(SiPhase2OuterTrackerLorentzAngle)
        IMPORT_PAYLOAD_CASE(SiPixelCalibConfiguration)
        IMPORT_PAYLOAD_CASE(SiPixelCPEGenericErrorParm)
        IMPORT_PAYLOAD_CASE(SiPixelFedCablingMap)
        IMPORT_PAYLOAD_CASE(SiPixelGainCalibrationForHLT)
        IMPORT_PAYLOAD_CASE(SiPixelGainCalibrationOffline)
        IMPORT_PAYLOAD_CASE(SiPixelGenErrorDBObject)
        IMPORT_PAYLOAD_CASE(SiPixelLorentzAngle)
        IMPORT_PAYLOAD_CASE(SiPixelDynamicInefficiency)
        IMPORT_PAYLOAD_CASE(SiPixelQuality)
        IMPORT_PAYLOAD_CASE(SiPixelFEDChannelContainer)
        IMPORT_PAYLOAD_CASE(SiPixelQualityProbabilities)
        IMPORT_PAYLOAD_CASE(SiPixelTemplateDBObject)
        IMPORT_PAYLOAD_CASE(SiPixel2DTemplateDBObject)
        IMPORT_PAYLOAD_CASE(SiPixelVCal)
        IMPORT_PAYLOAD_CASE(SiStripApvGain)
        IMPORT_PAYLOAD_CASE(SiStripApvSimulationParameters)
        IMPORT_PAYLOAD_CASE(SiStripBadStrip)
        IMPORT_PAYLOAD_CASE(SiStripBackPlaneCorrection)
        IMPORT_PAYLOAD_CASE(SiStripConfObject)
        IMPORT_PAYLOAD_CASE(SiStripDetVOff)
        IMPORT_PAYLOAD_CASE(SiStripFedCabling)
        IMPORT_PAYLOAD_CASE(SiStripLatency)
        IMPORT_PAYLOAD_CASE(SiStripLorentzAngle)
        IMPORT_PAYLOAD_CASE(SiStripNoises)
        IMPORT_PAYLOAD_CASE(SiStripPedestals)
        IMPORT_PAYLOAD_CASE(SiStripThreshold)
        IMPORT_PAYLOAD_CASE(DTCELinkId)
        IMPORT_PAYLOAD_CASE(TotemAnalysisMask)
        IMPORT_PAYLOAD_CASE(TotemDAQMapping)
        IMPORT_PAYLOAD_CASE(TrackerDetToDTCELinkCablingMap)
        IMPORT_PAYLOAD_CASE(TrackProbabilityCalibration)
        IMPORT_PAYLOAD_CASE(cond::BaseKeyed)
        IMPORT_PAYLOAD_CASE(ESCondObjectContainer<ESChannelStatusCode>)
        IMPORT_PAYLOAD_CASE(ESCondObjectContainer<ESPedestal>)
        IMPORT_PAYLOAD_CASE(ESCondObjectContainer<float>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalChannelStatusCode>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalMGPAGainRatio>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalTPGPedestal>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<EcalXtalGroupId>)
        IMPORT_PAYLOAD_CASE(EcalCondObjectContainer<float>)
        IMPORT_PAYLOAD_CASE(L1TGlobalPrescalesVetos)
        IMPORT_PAYLOAD_CASE(L1TGlobalPrescalesVetosFract)
        if (inputTypeName == "PhysicsTools::Calibration::Histogram3D<double,double,double,double>") {
          match = true;
          const PhysicsTools::Calibration::Histogram3D<double, double, double, double>& obj =
              *static_cast<const PhysicsTools::Calibration::Histogram3D<double, double, double, double>*>(inputPtr);
          payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
        }
        if (inputTypeName == "PhysicsTools::Calibration::Histogram2D<double,double,double>") {
          match = true;
          const PhysicsTools::Calibration::Histogram2D<double, double, double>& obj =
              *static_cast<const PhysicsTools::Calibration::Histogram2D<double, double, double>*>(inputPtr);
          payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
        }
        if (inputTypeName == "std::vector<unsignedlonglong,std::allocator<unsignedlonglong>>") {
          match = true;
          const std::vector<unsigned long long>& obj = *static_cast<const std::vector<unsigned long long>*>(inputPtr);
          payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
        }

        if (!match)
          throwException("Payload type \"" + inputTypeName + "\" is unknown.", "import");
      }
      return payloadId;
    }

  }  // namespace persistency
}  // namespace cond