CMS 3D CMS Logo

popcon::PopConSourceHandler< T > Class Template Reference

Online DB source handler, aims at returning the vector of data to be transferred to the online database Subdetector developers inherit over this class with template parameter of payload class; need just to implement the getNewObjects method that loads the calibs, the sourceId methods that return a text identifier of the source, and provide a constructor that accept a ParameterSet. More...

#include <CondCore/PopCon/interface/PopConSourceHandler.h>

Inheritance diagram for popcon::PopConSourceHandler< T >:

HcalRespCorrsHandler HcalZSThresholdsHandler PixelPopConSourceHandler< T > popcon::EcalPedestalsHandler PixelPopConDCSCablingSourceHandler PixelPopConDCSInfoSourceHandler

List of all members.

Public Types

typedef std::vector< std::pair
< T *, cond::Time_t > > 
Container
typedef PopConSourceHandler< T > self
typedef cond::Time_t Time_t
typedef T value_type

Public Member Functions

virtual void getNewObjects ()=0
virtual std::string id () const =0
void initialize (cond::Connection *connection, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry)
Ref lastPayload () const
cond::LogDBEntry const & logDBEntry () const
std::pair< Container const *,
std::string const > 
operator() (cond::Connection *connection, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry) const
 PopConSourceHandler ()
Container const & returnData ()
void sort ()
cond::TagInfo const & tagInfo () const
std::string const & userTextLog () const
virtual ~PopConSourceHandler ()

Protected Attributes

Container m_to_transfer
std::string m_userTextLog

Private Attributes

cond::Connectionm_connection
cond::LogDBEntry const * m_logDBEntry
cond::TagInfo const * m_tagInfo

Classes

class  Ref


Detailed Description

template<class T>
class popcon::PopConSourceHandler< T >

Online DB source handler, aims at returning the vector of data to be transferred to the online database Subdetector developers inherit over this class with template parameter of payload class; need just to implement the getNewObjects method that loads the calibs, the sourceId methods that return a text identifier of the source, and provide a constructor that accept a ParameterSet.

Definition at line 27 of file PopConSourceHandler.h.


Member Typedef Documentation

template<class T>
typedef std::vector<std::pair<T*, cond::Time_t> > popcon::PopConSourceHandler< T >::Container

Definition at line 31 of file PopConSourceHandler.h.

template<class T>
typedef PopConSourceHandler<T> popcon::PopConSourceHandler< T >::self

Definition at line 30 of file PopConSourceHandler.h.

template<class T>
typedef cond::Time_t popcon::PopConSourceHandler< T >::Time_t

Definition at line 32 of file PopConSourceHandler.h.

template<class T>
typedef T popcon::PopConSourceHandler< T >::value_type

Definition at line 29 of file PopConSourceHandler.h.


Constructor & Destructor Documentation

template<class T>
popcon::PopConSourceHandler< T >::PopConSourceHandler (  )  [inline]

Definition at line 64 of file PopConSourceHandler.h.

00064 {}

template<class T>
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler (  )  [inline, virtual]

Definition at line 66 of file PopConSourceHandler.h.

00066                                   {
00067     }


Member Function Documentation

template<class T>
virtual void popcon::PopConSourceHandler< T >::getNewObjects (  )  [pure virtual]

Implemented in DTCCBConfigHandler, DTDeadFlagHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTtrigHandler, popcon::EcalLaserHandler, popcon::EcalPedestalsHandler, HcalChannelQualityHandler, HcalElectronicsMapHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalQIEDataHandler, HcalRespCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCConfigSourceHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RPCReadOutMappingSourceHandler, popcon::RpcData, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< int >, and PixelPopConSourceHandler< SiPixelDisabledModules >.

Referenced by popcon::PopConSourceHandler< DTT0 >::returnData().

template<class T>
virtual std::string popcon::PopConSourceHandler< T >::id (  )  const [pure virtual]

Implemented in DTCCBConfigHandler, DTDeadFlagHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTtrigHandler, popcon::EcalLaserHandler, popcon::EcalPedestalsHandler, HcalChannelQualityHandler, HcalElectronicsMapHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalQIEDataHandler, HcalRespCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCConfigSourceHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RPCReadOutMappingSourceHandler, popcon::RpcData, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConCalibSourceHandler, PixelPopConSourceHandler< T >, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< int >, and PixelPopConSourceHandler< SiPixelDisabledModules >.

template<class T>
void popcon::PopConSourceHandler< T >::initialize ( cond::Connection connection,
cond::TagInfo const &  tagInfo,
cond::LogDBEntry const &  logDBEntry 
) [inline]

Definition at line 81 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::operator()().

00082                                                                                      { 
00083       m_connection = connection;
00084       m_tagInfo = &tagInfo;
00085       m_logDBEntry = &logDBEntry;
00086     }

template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload (  )  const [inline]

Definition at line 73 of file PopConSourceHandler.h.

Referenced by popcon::EcalPedestalsHandler::getNewObjectsH2(), and popcon::EcalPedestalsHandler::getNewObjectsP5().

00073                             {
00074       return Ref(m_connection->poolTransaction(),tagInfo().lastPayloadToken);
00075     }

template<class T>
cond::LogDBEntry const& popcon::PopConSourceHandler< T >::logDBEntry (  )  const [inline]

Definition at line 78 of file PopConSourceHandler.h.

00078 { return *m_logDBEntry; }

template<class T>
std::pair<Container const *, std::string const> popcon::PopConSourceHandler< T >::operator() ( cond::Connection connection,
cond::TagInfo const &  tagInfo,
cond::LogDBEntry const &  logDBEntry 
) const [inline]

Definition at line 89 of file PopConSourceHandler.h.

00091                                                                           {
00092       const_cast<self*>(this)->initialize(connection, tagInfo, logDBEntry);
00093       return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
00094     }

template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData (  )  [inline]

Definition at line 96 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::operator()().

00096                                     {
00097       getNewObjects();
00098       sort();
00099       return m_to_transfer;
00100     }

template<class T>
void popcon::PopConSourceHandler< T >::sort (  )  [inline]

Definition at line 112 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::returnData().

00112                 {
00113       std::sort(m_to_transfer.begin(),m_to_transfer.end(),
00114                 boost::bind(std::less<cond::Time_t>(),
00115                             boost::bind(&Container::value_type::second,_1),
00116                             boost::bind(&Container::value_type::second,_2)
00117                             )
00118                 );
00119     }

template<class T>
cond::TagInfo const& popcon::PopConSourceHandler< T >::tagInfo (  )  const [inline]

Definition at line 70 of file PopConSourceHandler.h.

Referenced by HcalRespCorrsHandler::getNewObjects(), HcalZSThresholdsHandler::getNewObjects(), popcon::EcalPedestalsHandler::getNewObjectsH2(), popcon::EcalPedestalsHandler::getNewObjectsP5(), and popcon::PopConSourceHandler< DTT0 >::lastPayload().

00070 { return  *m_tagInfo; }

template<class T>
std::string const& popcon::PopConSourceHandler< T >::userTextLog (  )  const [inline]

Definition at line 102 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::operator()().

00102 { return m_userTextLog; }


Member Data Documentation

template<class T>
cond::Connection* popcon::PopConSourceHandler< T >::m_connection [private]

Definition at line 125 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::initialize(), and popcon::PopConSourceHandler< DTT0 >::lastPayload().

template<class T>
cond::LogDBEntry const* popcon::PopConSourceHandler< T >::m_logDBEntry [private]

Definition at line 129 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::initialize(), and popcon::PopConSourceHandler< DTT0 >::logDBEntry().

template<class T>
cond::TagInfo const* popcon::PopConSourceHandler< T >::m_tagInfo [private]

Definition at line 127 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< DTT0 >::initialize(), and popcon::PopConSourceHandler< DTT0 >::tagInfo().

template<class T>
Container popcon::PopConSourceHandler< T >::m_to_transfer [protected]

Definition at line 136 of file PopConSourceHandler.h.

Referenced by HcalRespCorrsHandler::getNewObjects(), HcalZSThresholdsHandler::getNewObjects(), popcon::EcalPedestalsHandler::getNewObjectsH2(), popcon::EcalPedestalsHandler::getNewObjectsP5(), popcon::PopConSourceHandler< DTT0 >::returnData(), and popcon::PopConSourceHandler< DTT0 >::sort().

template<class T>
std::string popcon::PopConSourceHandler< T >::m_userTextLog [protected]

Definition at line 138 of file PopConSourceHandler.h.

Referenced by popcon::EcalPedestalsHandler::getNewObjectsP5(), and popcon::PopConSourceHandler< DTT0 >::userTextLog().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:50:32 2009 for CMSSW by  doxygen 1.5.4