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

93  :
94  m_tagInfo(0),
95  m_logDBEntry(0){}
cond::LogDBEntry const * m_logDBEntry
cond::TagInfo const * m_tagInfo
template<class T>
virtual popcon::PopConSourceHandler< T >::~PopConSourceHandler ( )
inlinevirtual

Definition at line 97 of file PopConSourceHandler.h.

97  {
98  }

Member Function Documentation

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

Definition at line 170 of file PopConSourceHandler.h.

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

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

Definition at line 158 of file PopConSourceHandler.h.

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

158  {
159  std::for_each( m_to_transfer.begin(), m_to_transfer.end(),
160  boost::bind(&self::add, this,
161  boost::bind(&OldContainer::value_type::first,_1),
162  boost::bind(&self::dummySummary, this, _1),
163  boost::bind(&OldContainer::value_type::second,_1)
164  ));
165  }
U second(std::pair< T, U > const &p)
Summary * dummySummary(typename OldContainer::value_type const &) const
bool first
Definition: L1TdeRCT.cc:94
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 154 of file PopConSourceHandler.h.

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

154  {
155  return new cond::GenericSummary("not supplied");
156  }
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::EcalLaserHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGBadXTHandler, DTHVStatusHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightIdMapHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, popcon::EcalDAQHandler, popcon::SiStripPopConHandlerUnitTestGain< T >, popcon::SiStripPopConHandlerUnitTestNoise< T >, 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::EcalTPGFineGrainStripEEHandler, popcon::EcalTPGPedestalsHandler, popcon::EcalTPGSlidingWindowHandler, popcon::EcalTPGFineGrainTowerEEHandler, popcon::EcalTPGWeightGroupHandler, popcon::EcalTPGBadStripHandler, popcon::EcalTPGBadTTHandler, popcon::EcalTPGFineGrainEBGroupHandler, popcon::EcalTPGBadXTHandler, popcon::EcalTPGFineGrainEBIdMapHandler, popcon::EcalTPGLinConstHandler, popcon::EcalTPGLutIdMapHandler, popcon::EcalTPGPhysicsConstHandler, popcon::EcalTPGWeightIdMapHandler, DTHVStatusHandler, DTKeyedConfigHandler, DTUserKeyedConfigHandler, 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 ( cond::DbSession  dbSession,
cond::TagInfo const &  tagInfo,
cond::LogDBEntry const &  logDBEntry 
)
inline

Definition at line 112 of file PopConSourceHandler.h.

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

113  {
114  m_session = dbSession;
115  m_tagInfo = &tagInfo;
117  }
cond::TagInfo const & tagInfo() const
cond::LogDBEntry const * m_logDBEntry
cond::LogDBEntry const & logDBEntry() const
cond::TagInfo const * m_tagInfo
template<class T>
Ref popcon::PopConSourceHandler< T >::lastPayload ( ) const
inline

Definition at line 104 of file PopConSourceHandler.h.

104  {
105  return Ref(m_session,tagInfo().lastPayloadToken);
106  }
cond::TagInfo const & tagInfo() const
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 120 of file PopConSourceHandler.h.

122  {
123  const_cast<self*>(this)->initialize(session, tagInfo, logDBEntry);
124  return std::pair<Container const *, std::string const>(&(const_cast<self*>(this)->returnData()), userTextLog());
125  }
PopConSourceHandler< T > self
std::string const & userTextLog() const
cond::TagInfo const & tagInfo() const
cond::LogDBEntry const & logDBEntry() const
void initialize(cond::DbSession dbSession, cond::TagInfo const &tagInfo, cond::LogDBEntry const &logDBEntry)
template<class T>
Container const& popcon::PopConSourceHandler< T >::returnData ( )
inline
template<class T>
void popcon::PopConSourceHandler< T >::sort ( )
inline

Definition at line 143 of file PopConSourceHandler.h.

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

143  {
144  std::sort(m_triplets.begin(),m_triplets.end(),
145  boost::bind(std::less<cond::Time_t>(),
146  boost::bind(&Container::value_type::time,_1),
147  boost::bind(&Container::value_type::time,_2)
148  )
149  );
150  }
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
mutableprivate
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