CMS 3D CMS Logo

Public Member Functions | Private Attributes

HcalLutMetadataHandler Class Reference

#include <HcalLutMetadataHandler.h>

Inheritance diagram for HcalLutMetadataHandler:
popcon::PopConSourceHandler< HcalLutMetadata >

List of all members.

Public Member Functions

void getNewObjects ()
 HcalLutMetadataHandler (edm::ParameterSet const &)
std::string id () const
void initObject (HcalLutMetadata *)
 ~HcalLutMetadataHandler ()

Private Attributes

edm::FileInPath fFile
std::string m_name
HcalLutMetadatamyDBObject
unsigned int sinceTime

Detailed Description

Definition at line 29 of file HcalLutMetadataHandler.h.


Constructor & Destructor Documentation

HcalLutMetadataHandler::~HcalLutMetadataHandler ( )

Definition at line 12 of file HcalLutMetadataHandler.cc.

{
}
HcalLutMetadataHandler::HcalLutMetadataHandler ( edm::ParameterSet const &  ps)

Definition at line 6 of file HcalLutMetadataHandler.cc.

References edm::ParameterSet::getUntrackedParameter(), m_name, and sinceTime.

{
  m_name = ps.getUntrackedParameter<std::string>("name","HcalLutMetadataHandler");
  sinceTime = ps.getUntrackedParameter<unsigned>("IOVRun",0);
}

Member Function Documentation

void HcalLutMetadataHandler::getNewObjects ( ) [virtual]

Implements popcon::PopConSourceHandler< HcalLutMetadata >.

Definition at line 16 of file HcalLutMetadataHandler.cc.

References gather_cfg::cout, Exception, cond::TagInfo::lastInterval, m_name, popcon::PopConSourceHandler< HcalLutMetadata >::m_to_transfer, myDBObject, cond::TagInfo::name, sinceTime, cond::TagInfo::size, and popcon::PopConSourceHandler< HcalLutMetadata >::tagInfo().

{
  //  edm::LogInfo   ("HcalLutMetadataHandler") 
  std::cout
    << "------- " << m_name 
    << " - > getNewObjects\n" << 
    //check whats already inside of database
    "got offlineInfo"<<
    tagInfo().name << ", size " << tagInfo().size 
                                          << ", last object valid since " 
                                          << tagInfo().lastInterval.first << std::endl;  

  if (!myDBObject) 
    throw cms::Exception("Empty DB object") << m_name 
                                            << " has received empty object - nothing to write to DB" 
                                            << std::endl;

  //  IOV information
  cond::Time_t myTime = sinceTime;

  std::cout << "Using IOV run " << sinceTime << std::endl;

  // prepare for transfer:
  m_to_transfer.push_back(std::make_pair(myDBObject,myTime));

  edm::LogInfo("HcalLutMetadataHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;

}
std::string HcalLutMetadataHandler::id ( void  ) const [inline, virtual]

Implements popcon::PopConSourceHandler< HcalLutMetadata >.

Definition at line 33 of file HcalLutMetadataHandler.h.

References m_name.

{ return m_name;}
void HcalLutMetadataHandler::initObject ( HcalLutMetadata fObject)

Definition at line 45 of file HcalLutMetadataHandler.cc.

References myDBObject.

Referenced by HcalLutMetadataPopConAnalyzer::endJob().

{
  myDBObject = fObject;
}

Member Data Documentation

Definition at line 41 of file HcalLutMetadataHandler.h.

std::string HcalLutMetadataHandler::m_name [private]

Definition at line 43 of file HcalLutMetadataHandler.h.

Referenced by getNewObjects(), HcalLutMetadataHandler(), and id().

Definition at line 42 of file HcalLutMetadataHandler.h.

Referenced by getNewObjects(), and initObject().

unsigned int HcalLutMetadataHandler::sinceTime [private]

Definition at line 40 of file HcalLutMetadataHandler.h.

Referenced by getNewObjects(), and HcalLutMetadataHandler().