CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
popcon::PopConSourceHandler< T > Class Template Referenceabstract

#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 >

Classes

class  Ref
 
struct  Triplet
 

Public Types

typedef std::vector< TripletContainer
 
typedef std::vector< std::pair
< T *, cond::Time_t > > 
OldContainer
 
typedef PopConSourceHandler< Tself
 
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 (const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
 
Ref lastPayload () const
 
cond::LogDBEntry_t const & logDBEntry () const
 
std::pair< Container const
*, std::string const > 
operator() (const cond::persistency::Session &session, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry) const
 
 PopConSourceHandler ()
 
Container const & returnData ()
 
void sort ()
 
cond::TagInfo_t 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_t const * m_logDBEntry
 
cond::persistency::Session m_session
 
cond::TagInfo_t 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 36 of file PopConSourceHandler.h.

Member Typedef Documentation

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

Definition at line 49 of file PopConSourceHandler.h.

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

Definition at line 51 of file PopConSourceHandler.h.

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

Definition at line 39 of file PopConSourceHandler.h.

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

Definition at line 41 of file PopConSourceHandler.h.

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

Definition at line 40 of file PopConSourceHandler.h.

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

Definition at line 38 of file PopConSourceHandler.h.

Constructor & Destructor Documentation

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

Definition at line 94 of file PopConSourceHandler.h.

94  :
95  m_tagInfo(0),
96  m_logDBEntry(0)
97  {}
cond::LogDBEntry_t const * m_logDBEntry
cond::TagInfo_t const * m_tagInfo
template<class T>
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler ( )
inlinevirtual

Definition at line 99 of file PopConSourceHandler.h.

99  {
100  }

Member Function Documentation

template<class T>
int popcon::PopConSourceHandler< T >::add ( value_type payload,
Summary summary,
Time_t  time 
)
inlineprotected

Definition at line 172 of file PopConSourceHandler.h.

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

172  {
173  Triplet t = {payload,summary,time};
174  m_triplets.push_back(t);
175  return m_triplets.size();
176  }
Definition: Triplet.h:9
template<class T>
void popcon::PopConSourceHandler< T >::convertFromOld ( )
inline

Definition at line 160 of file PopConSourceHandler.h.

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

160  {
161  std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
162  boost::bind(&self::add, this,
163  boost::bind(&OldContainer::value_type::first,_1),
164  boost::bind(&self::dummySummary, this, _1),
165  boost::bind(&OldContainer::value_type::second,_1)
166  ));
167  }
U second(std::pair< T, U > const &p)
Summary * dummySummary(typename OldContainer::value_type const &) const
bool first
Definition: L1TdeRCT.cc:79
int add(value_type *payload, Summary *summary, Time_t time)
template<class T>
Summary* popcon::PopConSourceHandler< T >::dummySummary ( typename OldContainer::value_type const &  ) const
inline

Definition at line 156 of file PopConSourceHandler.h.

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

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

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

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

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

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

template<class T>
void popcon::PopConSourceHandler< T >::initialize ( const cond::persistency::Session dbSession,
cond::TagInfo_t const &  tagInfo,
cond::LogDBEntry_t const &  logDBEntry 
)
inline

Definition at line 114 of file PopConSourceHandler.h.

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

115  {
116  m_session = dbSession;
117  m_tagInfo = &tagInfo;
119  }
cond::LogDBEntry_t const * m_logDBEntry
cond::LogDBEntry_t const & logDBEntry() const
cond::TagInfo_t const * m_tagInfo
cond::persistency::Session m_session
cond::TagInfo_t const & tagInfo() const
template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload ( ) const
inline

Definition at line 106 of file PopConSourceHandler.h.

106  {
107  return Ref(m_session,tagInfo().lastPayloadToken);
108  }
cond::persistency::Session m_session
cond::TagInfo_t const & tagInfo() const
template<class T>
cond::LogDBEntry_t const& popcon::PopConSourceHandler< T >::logDBEntry ( ) const
inline
template<class T>
std::pair<Container const *, std::string const> popcon::PopConSourceHandler< T >::operator() ( const cond::persistency::Session session,
cond::TagInfo_t const &  tagInfo,
cond::LogDBEntry_t const &  logDBEntry 
) const
inline

Definition at line 122 of file PopConSourceHandler.h.

124  {
125  const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
126  return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
127  }
PopConSourceHandler< T > self
std::string const & userTextLog() const
cond::LogDBEntry_t const & logDBEntry() const
void initialize(const cond::persistency::Session &dbSession, cond::TagInfo_t const &tagInfo, cond::LogDBEntry_t const &logDBEntry)
cond::TagInfo_t const & tagInfo() const
template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData ( )
inline
template<class T>
void popcon::PopConSourceHandler< T >::sort ( )
inline

Definition at line 145 of file PopConSourceHandler.h.

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

145  {
146  std::sort(m_triplets.begin(),m_triplets.end(),
147  boost::bind(std::less<cond::Time_t>(),
148  boost::bind(&Container::value_type::time,_1),
149  boost::bind(&Container::value_type::time,_2)
150  )
151  );
152  }
template<class T>
cond::TagInfo_t 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_t const* popcon::PopConSourceHandler< T >::m_logDBEntry
private
template<class T>
cond::persistency::Session popcon::PopConSourceHandler< T >::m_session
mutableprivate
template<class T>
cond::TagInfo_t 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