Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:52

0001 /**
0002    \file
0003    Implementation of class EcalFloatCondObjectContainerHandler
0004 
0005    \author Stefano ARGIRO
0006    \date 09 Sep 2008
0007 */
0008 
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "CondCore/CondDB/interface/Time.h"
0011 #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerHandler.h"
0012 #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h"
0013 #include "CondTools/Ecal/interface/DOMHelperFunctions.h"
0014 #include <utility>
0015 
0016 EcalFloatCondObjectContainerHandler::~EcalFloatCondObjectContainerHandler() {}
0017 
0018 EcalFloatCondObjectContainerHandler::EcalFloatCondObjectContainerHandler(const edm::ParameterSet &ps)
0019     : xmlFileSource_(ps.getUntrackedParameter<std::string>("xmlFile")),
0020       since_(ps.getUntrackedParameter<long long>("since")) {}
0021 
0022 void EcalFloatCondObjectContainerHandler::getNewObjects() {
0023   EcalCondHeader header;
0024 
0025   // we allocate on the heap here, knowing that popcon will
0026   // take care of deleting the payload
0027   EcalFloatCondObjectContainer *payload = new EcalFloatCondObjectContainer;
0028 
0029   EcalFloatCondObjectContainerXMLTranslator::readXML(xmlFileSource_, header, *payload);
0030 
0031   //cond::Time_t snc = header.since_;
0032   //for now we don't make use of the xml header to read the since
0033   //but rely on the one passed from parameter set
0034 
0035   m_to_transfer.push_back(std::make_pair(payload, since_));
0036 }
0037 
0038 std::string EcalFloatCondObjectContainerHandler::id() const {
0039   // We have to think if this is the right thing to do ...
0040 
0041   EcalCondHeader header;
0042   xuti::readHeader(xmlFileSource_, header);
0043   return header.tag_;
0044 }
0045 
0046 // Configure (x)emacs for this file ...
0047 // Local Variables:
0048 // mode:c++
0049 // compile-command: "scram b"
0050 // End: