CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_6/src/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc

Go to the documentation of this file.
00001 
00010 static const char CVSId[] = "$Id: EcalFloatCondObjectContainerHandler.cc,v 1.2 2009/11/06 11:32:53 fra Exp $";
00011 
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include "CondCore/DBCommon/interface/Time.h"
00014 #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerHandler.h"
00015 #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h"
00016 #include "CondTools/Ecal/interface/DOMHelperFunctions.h"
00017 #include <utility>
00018 
00019 EcalFloatCondObjectContainerHandler::
00020 ~EcalFloatCondObjectContainerHandler(){}
00021 
00022 EcalFloatCondObjectContainerHandler::
00023 EcalFloatCondObjectContainerHandler(const edm::ParameterSet & ps):
00024   xmlFileSource_(ps.getUntrackedParameter<std::string>("xmlFile")),
00025   since_(ps.getUntrackedParameter<long long>("since"))
00026 {
00027 }
00028 
00029 void EcalFloatCondObjectContainerHandler::getNewObjects(){
00030   
00031   EcalCondHeader          header;
00032 
00033   // we allocate on the heap here, knowing that popcon will
00034   // take care of deleting the payload
00035   EcalFloatCondObjectContainer *payload = new EcalFloatCondObjectContainer ;
00036 
00037   EcalFloatCondObjectContainerXMLTranslator::readXML(xmlFileSource_,header,*payload);
00038   
00039   
00040   //cond::Time_t snc = header.since_;
00041   //for now we don't make use of the xml header to read the since
00042   //but rely on the one passed from parameter set
00043   
00044   m_to_transfer.push_back(std::make_pair(payload,since_));
00045 
00046 }
00047 
00048 std::string EcalFloatCondObjectContainerHandler::id() const{
00049   
00050   // We have to think if this is the right thing to do ...
00051   
00052   EcalCondHeader          header;
00053   xuti::readHeader(xmlFileSource_, header);
00054   return header.tag_;
00055 }
00056 
00057 
00058 // Configure (x)emacs for this file ...
00059 // Local Variables:
00060 // mode:c++
00061 // compile-command: "scram b"
00062 // End: