CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

popcon::PopConSourceHandler< T > Class Template Reference

#include <PopConSourceHandler.h>

Inheritance diagram for popcon::PopConSourceHandler< T >:
PixelPopConSourceHandler< T > popcon::SiStripPopConConfigDbObjHandler< T > popcon::SiStripPopConDbObjHandler< T, U > popcon::SiStripPopConHandlerUnitTest< T > popcon::SiStripPopConHandlerUnitTestGain< T > popcon::SiStripPopConHandlerUnitTestNoise< T >

List of all members.

Classes

class  Ref
struct  Triplet

Public Types

typedef std::vector< TripletContainer
typedef std::vector< std::pair
< T *, cond::Time_t > > 
OldContainer
typedef PopConSourceHandler< T > self
typedef cond::Summary Summary
typedef cond::Time_t Time_t
typedef T value_type

Public Member Functions

void convertFromOld ()
SummarydummySummary (typename OldContainer::value_type const &) const
virtual void getNewObjects ()=0
virtual std::string id () const =0
void initialize (cond::DbSession dbSession, 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::DbSession session, 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 Member Functions

int add (value_type *payload, Summary *summary, Time_t time)

Protected Attributes

OldContainer m_to_transfer
std::string m_userTextLog

Private Attributes

cond::LogDBEntry const * m_logDBEntry
cond::DbSession m_session
cond::TagInfo const * m_tagInfo
Container m_triplets

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 35 of file PopConSourceHandler.h.


Member Typedef Documentation

template<class T>
typedef std::vector<Triplet> popcon::PopConSourceHandler< T >::Container

Definition at line 48 of file PopConSourceHandler.h.

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

Definition at line 50 of file PopConSourceHandler.h.

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

Definition at line 38 of file PopConSourceHandler.h.

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

Definition at line 40 of file PopConSourceHandler.h.

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

Definition at line 39 of file PopConSourceHandler.h.

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

Definition at line 37 of file PopConSourceHandler.h.


Constructor & Destructor Documentation

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

Definition at line 98 of file PopConSourceHandler.h.

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

Definition at line 100 of file PopConSourceHandler.h.

                                  {
    }

Member Function Documentation

template<class T>
int popcon::PopConSourceHandler< T >::add ( value_type payload,
Summary summary,
Time_t  time 
) [inline, protected]

Definition at line 173 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld().

                                                                  {
      Triplet t = {payload,summary,time};
      m_triplets.push_back(t);
      return m_triplets.size();
    }
template<class T>
void popcon::PopConSourceHandler< T >::convertFromOld ( ) [inline]

Definition at line 161 of file PopConSourceHandler.h.

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

                          {
      std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
                     boost::bind(&self::add, this,
                                 boost::bind(&OldContainer::value_type::first,_1),
                                 boost::bind(&self::dummySummary, this, _1),
                                 boost::bind(&OldContainer::value_type::second,_1)
                                 ));
    }
template<class T>
Summary* popcon::PopConSourceHandler< T >::dummySummary ( typename OldContainer::value_type const &  ) const [inline]

Definition at line 157 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::convertFromOld().

                                                                          {
      return new cond::GenericSummary("not supplied");
    }
template<class T>
virtual void popcon::PopConSourceHandler< T >::getNewObjects ( ) [pure virtual]

Implemented in popcon::SiStripDetVOffHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, DTDeadFlagHandler, DTHVStatusHandler, DTKeyedConfigHandler, DTLVStatusHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, DTTtrigHandler, DTUserKeyedConfigHandler, popcon::EcalChannelStatusHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::EcalDAQHandler, popcon::EcalDCSHandler, EcalFloatCondObjectContainerHandler, popcon::EcalIntercalibHandler, popcon::EcalLaserHandler, EcalMappingElectronicsHandler, popcon::EcalPedestalsHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGWeightIdMapHandler, CastorChannelQualityHandler, CastorElectronicsMapHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, HcalChannelQualityHandler, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLUTCorrsHandler, HcalLutMetadataHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConDCSSourceHandler< Type >, PixelPopConSourceHandler< T >, popcon::SiStripPopConDbObjHandler< T, U >, popcon::DQMHistoryPopConHandler< U >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::SiStripPopConHandlerUnitTest< T >, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, CentralityTableHandler, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, and PixelPopConSourceHandler< SiPixelDisabledModules >.

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

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

Implemented in popcon::SiStripDetVOffHandler, popcon::DQMReferenceHistogramRootFileSourceHandler, popcon::DQMSummarySourceHandler, popcon::DQMXMLFileSourceHandler, DTDeadFlagHandler, DTHVStatusHandler, DTKeyedConfigHandler, DTLVStatusHandler, DTMtimeHandler, DTPerformanceHandler, DTRangeT0Handler, DTReadOutMappingHandler, DTStatusFlagHandler, DTT0Handler, DTTPGParametersHandler, DTTtrigHandler, DTUserKeyedConfigHandler, popcon::EcalChannelStatusHandler, EcalCondHandler< Payload, XMLTranslator >, popcon::EcalDAQHandler, popcon::EcalDCSHandler, EcalFloatCondObjectContainerHandler, popcon::EcalIntercalibHandler, popcon::EcalLaserHandler, EcalMappingElectronicsHandler, popcon::EcalPedestalsHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutGroupHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGWeightIdMapHandler, CastorChannelQualityHandler, CastorElectronicsMapHandler, CastorGainsHandler, CastorGainWidthsHandler, CastorPedestalsHandler, CastorPedestalWidthsHandler, CastorQIEDataHandler, HcalChannelQualityHandler, HcalCholeskyMatricesHandler, HcalCovarianceMatricesHandler, HcalDcsMapHandler, HcalDcsValuesHandler, HcalElectronicsMapHandler, HcalGainsHandler, HcalGainWidthsHandler, HcalL1TriggerObjectsHandler, HcalLUTCorrsHandler, HcalLutMetadataHandler, HcalPedestalsHandler, HcalPedestalWidthsHandler, HcalPFCorrsHandler, HcalQIEDataHandler, HcalRespCorrsHandler, HcalTimeCorrsHandler, HcalValidationCorrsHandler, HcalZSThresholdsHandler, popcon::L1RPCHwConfigSourceHandler, RPCDBPerformanceHandler, popcon::RPCEMapSourceHandler, popcon::RpcDataFebmap, popcon::RpcDataGasMix, popcon::RpcObGasData, popcon::RPCObPVSSmapData, popcon::RpcDataI, popcon::RpcDataS, popcon::RpcDataT, popcon::RpcDataUXC, popcon::RpcDataV, L1TriggerScalerHandler, RunInfoHandler, RunSummaryHandler, PixelPopConCalibSourceHandler, PixelPopConDCSSourceHandler< Type >, PixelPopConSourceHandler< T >, popcon::SiStripPopConDbObjHandler< T, U >, popcon::DQMHistoryPopConHandler< U >, popcon::SiStripPopConConfigDbObjHandler< T >, popcon::SiStripPopConHandlerUnitTest< T >, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, CentralityTableHandler, PixelPopConSourceHandler< SiPixelCalibConfiguration >, PixelPopConSourceHandler< SiPixelFedCablingMap >, PixelPopConSourceHandler< bool >, and PixelPopConSourceHandler< SiPixelDisabledModules >.

template<class T>
void popcon::PopConSourceHandler< T >::initialize ( cond::DbSession  dbSession,
cond::TagInfo const &  tagInfo,
cond::LogDBEntry const &  logDBEntry 
) [inline]
template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload ( ) const [inline]

Definition at line 107 of file PopConSourceHandler.h.

                            {
      return Ref(m_session,tagInfo().lastPayloadToken);
    }
template<class T>
cond::LogDBEntry const& popcon::PopConSourceHandler< T >::logDBEntry ( ) const [inline]
template<class T>
std::pair<Container const *, std::string const> popcon::PopConSourceHandler< T >::operator() ( cond::DbSession  session,
cond::TagInfo const &  tagInfo,
cond::LogDBEntry const &  logDBEntry 
) const [inline]

Definition at line 123 of file PopConSourceHandler.h.

                                                                                                         {
      const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
      return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
    }
template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData ( ) [inline]
template<class T>
void popcon::PopConSourceHandler< T >::sort ( ) [inline]

Definition at line 146 of file PopConSourceHandler.h.

Referenced by popcon::PopConSourceHandler< CastorPedestals >::returnData(), and popcon::PopConSourceHandler< CastorPedestals >::sort().

                {
      std::sort(m_triplets.begin(),m_triplets.end(),
                boost::bind(std::less<cond::Time_t>(),
                            boost::bind(&Container::value_type::time,_1),
                            boost::bind(&Container::value_type::time,_2)
                            )
                );
    }
template<class T>
cond::TagInfo const& popcon::PopConSourceHandler< T >::tagInfo ( ) const [inline]
template<class T>
std::string const& popcon::PopConSourceHandler< T >::userTextLog ( ) const [inline]

Member Data Documentation

template<class T>
cond::LogDBEntry const* popcon::PopConSourceHandler< T >::m_logDBEntry [private]
template<class T>
cond::DbSession popcon::PopConSourceHandler< T >::m_session [mutable, private]
template<class T>
cond::TagInfo const* popcon::PopConSourceHandler< T >::m_tagInfo [private]
template<class T>
OldContainer popcon::PopConSourceHandler< T >::m_to_transfer [protected]
template<class T>
Container popcon::PopConSourceHandler< T >::m_triplets [private]
template<class T>
std::string popcon::PopConSourceHandler< T >::m_userTextLog [protected]