CMS 3D CMS Logo

Public Member Functions | Private Attributes

CastorElectronicsMapHandler Class Reference

#include <CastorElectronicsMapHandler.h>

Inheritance diagram for CastorElectronicsMapHandler:
popcon::PopConSourceHandler< CastorElectronicsMap >

List of all members.

Public Member Functions

 CastorElectronicsMapHandler (edm::ParameterSet const &)
void getNewObjects ()
std::string id () const
void initObject (CastorElectronicsMap *)
 ~CastorElectronicsMapHandler ()

Private Attributes

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

Detailed Description

Definition at line 26 of file CastorElectronicsMapHandler.h.


Constructor & Destructor Documentation

CastorElectronicsMapHandler::~CastorElectronicsMapHandler ( )

Definition at line 12 of file CastorElectronicsMapHandler.cc.

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

Definition at line 6 of file CastorElectronicsMapHandler.cc.

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

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

Member Function Documentation

void CastorElectronicsMapHandler::getNewObjects ( ) [virtual]

Implements popcon::PopConSourceHandler< CastorElectronicsMap >.

Definition at line 16 of file CastorElectronicsMapHandler.cc.

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

{
  //  edm::LogInfo   ("CastorElectronicsMapHandler") 
  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("CastorElectronicsMapHandler") << "------- " << m_name << " - > getNewObjects" << std::endl;

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

Implements popcon::PopConSourceHandler< CastorElectronicsMap >.

Definition at line 30 of file CastorElectronicsMapHandler.h.

References m_name.

{ return m_name;}
void CastorElectronicsMapHandler::initObject ( CastorElectronicsMap fObject)

Definition at line 45 of file CastorElectronicsMapHandler.cc.

References myDBObject.

Referenced by CastorElectronicsMapPopConAnalyzer::endJob().

{
  myDBObject = fObject;
}

Member Data Documentation

Definition at line 38 of file CastorElectronicsMapHandler.h.

std::string CastorElectronicsMapHandler::m_name [private]

Definition at line 40 of file CastorElectronicsMapHandler.h.

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

Definition at line 39 of file CastorElectronicsMapHandler.h.

Referenced by getNewObjects(), and initObject().

Definition at line 37 of file CastorElectronicsMapHandler.h.

Referenced by CastorElectronicsMapHandler(), and getNewObjects().