CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Attributes
cond::payloadInspector::PlotBase Class Reference

#include <PayloadInspector.h>

Inheritance diagram for cond::payloadInspector::PlotBase:
cond::payloadInspector::Plot2D< PayloadType, X, Y > cond::payloadInspector::Plot3D< PayloadType, X, Y, Z > cond::payloadInspector::PlotImage< PayloadType > cond::payloadInspector::Plot2D< PayloadType, float, float > cond::payloadInspector::Plot2D< PayloadType, std::tuple< float, std::string >, Y > cond::payloadInspector::Plot2D< PayloadType, std::tuple< unsigned long long, std::string >, Y > cond::payloadInspector::Plot2D< PayloadType, unsigned long long, Y > cond::payloadInspector::Plot3D< PayloadType, float, float, float >

Public Member Functions

std::string data () const
 
cond::persistency::Session dbSession ()
 
template<typename PayloadType >
std::shared_ptr< PayloadType > fetchPayload (const cond::Hash &payloadHash)
 
cond::Tag_t getTagInfo (const std::string &tag)
 
virtual void init ()
 
bool isSingleIov () const
 
bool isTwoTags () const
 
std::string payloadType () const
 
 PlotBase ()
 
bool process (const std::string &connectionString, const std::string &tag, const std::string &timeType, cond::Time_t begin, cond::Time_t end)
 
virtual std::string processData (const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)
 
bool processTwoTags (const std::string &connectionString, const std::string &tag0, const std::string &tag1, cond::Time_t time0, cond::Time_t time1)
 
void setSingleIov (bool flag)
 
void setTwoTags (bool flag)
 
std::string title () const
 
std::string type () const
 
virtual ~PlotBase ()=default
 

Protected Attributes

PlotAnnotations m_plotAnnotations
 
std::string m_tag0 = ""
 
std::string m_tag1 = ""
 

Private Attributes

std::string m_data = ""
 
cond::persistency::Session m_dbSession
 

Detailed Description

Definition at line 133 of file PayloadInspector.h.

Constructor & Destructor Documentation

cond::payloadInspector::PlotBase::PlotBase ( )

Definition at line 24 of file PayloadInspector.cc.

virtual cond::payloadInspector::PlotBase::~PlotBase ( )
virtualdefault

Member Function Documentation

std::string cond::payloadInspector::PlotBase::data ( ) const
cond::persistency::Session cond::payloadInspector::PlotBase::dbSession ( )

Definition at line 150 of file PayloadInspector.cc.

References m_dbSession.

150  {
151  return m_dbSession;
152  }
cond::persistency::Session m_dbSession
template<typename PayloadType >
std::shared_ptr<PayloadType> cond::payloadInspector::PlotBase::fetchPayload ( const cond::Hash payloadHash)
inline

Definition at line 175 of file PayloadInspector.h.

References AlCaHLTBitMon_QueryRunRegistry::string.

175  {
176  return m_dbSession.fetchPayload<PayloadType>( payloadHash );
177  }
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:218
cond::persistency::Session m_dbSession
cond::Tag_t cond::payloadInspector::PlotBase::getTagInfo ( const std::string &  tag)

Definition at line 144 of file PayloadInspector.cc.

References cond::persistency::Session::getTagInfo(), info(), and m_dbSession.

144  {
146  m_dbSession.getTagInfo( tag, info );
147  return info;
148  }
static const TGPicture * info(bool iBackgroundIsBlack)
bool getTagInfo(const std::string &tag, cond::Tag_t &info)
Definition: Session.cc:102
cond::persistency::Session m_dbSession
void cond::payloadInspector::PlotBase::init ( void  )
virtual
bool cond::payloadInspector::PlotBase::isSingleIov ( ) const
bool cond::payloadInspector::PlotBase::isTwoTags ( ) const
std::string cond::payloadInspector::PlotBase::payloadType ( ) const
bool cond::payloadInspector::PlotBase::process ( const std::string &  connectionString,
const std::string &  tag,
const std::string &  timeType,
cond::Time_t  begin,
cond::Time_t  end 
)

Definition at line 52 of file PayloadInspector.cc.

References edm::ParameterSet::addParameter(), cond::persistency::Transaction::commit(), cond::persistency::ConnectionPool::createSession(), edm::ServiceRegistry::createSet(), cond::persistency::Session::getIovRange(), init(), m_data, m_dbSession, m_tag0, cmsPerfStripChart::operate(), processData(), cond::persistency::Transaction::start(), AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, and cond::persistency::Session::transaction().

Referenced by BOOST_PYTHON_MODULE(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::dumpPython(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::open(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::outputEventContent(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProcess(), and Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor::setProperty().

52  {
53  init();
54 
55  std::vector<edm::ParameterSet> psets;
56  edm::ParameterSet pSet;
57  pSet.addParameter("@service_type",std::string("SiteLocalConfigService"));
58  psets.push_back(pSet);
59  static const edm::ServiceToken services(edm::ServiceRegistry::createSet(psets));
60  static const edm::ServiceRegistry::Operate operate(services);
61 
62  m_tag0 = tag;
63  //m_tagTimeType = cond::time::timeTypeFromName(timeType);
65  m_dbSession = connection.createSession( connectionString );
67  std::vector<std::tuple<cond::Time_t,cond::Hash> > iovs;
68  m_dbSession.getIovRange( tag, begin, end, iovs );
69  m_data = processData( iovs );
71  // fixme...
72  return true;
73  }
void start(bool readOnly=true)
Definition: Session.cc:22
Transaction & transaction()
Definition: Session.cc:66
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:125
Session createSession(const std::string &connectionString, bool writeCapable=false)
#define end
Definition: vmac.h:39
static ServiceToken createSet(std::vector< ParameterSet > &)
virtual std::string processData(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)
#define begin
Definition: vmac.h:32
cond::persistency::Session m_dbSession
bool getIovRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, std::vector< std::tuple< cond::Time_t, cond::Hash > > &range)
Definition: Session.cc:116
def operate(timelog, memlog, json_f, num)
std::string cond::payloadInspector::PlotBase::processData ( const std::vector< std::tuple< cond::Time_t, cond::Hash > > &  iovs)
virtual
bool cond::payloadInspector::PlotBase::processTwoTags ( const std::string &  connectionString,
const std::string &  tag0,
const std::string &  tag1,
cond::Time_t  time0,
cond::Time_t  time1 
)

bool PlotBase::process( const std::string& connectionString, const std::string& tag, cond::Time_t begin, cond::Time_t end ){ init();

std::vector<edm::ParameterSet> psets; edm::ParameterSet pSet; pSet.addParameter("@service_type",std::string("SiteLocalConfigService")); psets.push_back(pSet); static const edm::ServiceToken services(edm::ServiceRegistry::createSet(psets)); static const edm::ServiceRegistry::Operate operate(services);

m_tag0 = tag; cond::persistency::ConnectionPool connection; m_dbSession = connection.createSession( connectionString ); m_dbSession.transaction().start(); std::vector<std::tuple<cond::Time_t,cond::Hash> > iovs; m_dbSession.getIovRange( tag, begin, end, iovs ); m_data = processData( iovs ); m_dbSession.transaction().commit(); fixme... return true; }

Definition at line 99 of file PayloadInspector.cc.

References edm::ParameterSet::addParameter(), cond::persistency::Transaction::commit(), cond::persistency::ConnectionPool::createSession(), edm::ServiceRegistry::createSet(), cond::persistency::Session::getIovRange(), init(), m_data, m_dbSession, m_tag0, m_tag1, cmsPerfStripChart::operate(), processData(), cond::persistency::Transaction::start(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::persistency::Session::transaction().

Referenced by BOOST_PYTHON_MODULE().

99  {
100  init();
101 
102  std::vector<edm::ParameterSet> psets;
103  edm::ParameterSet pSet;
104  pSet.addParameter("@service_type",std::string("SiteLocalConfigService"));
105  psets.push_back(pSet);
106  static const edm::ServiceToken services(edm::ServiceRegistry::createSet(psets));
107  static const edm::ServiceRegistry::Operate operate(services);
108 
109  m_tag0 = tag0;
110  m_tag1 = tag1;
112  m_dbSession = connection.createSession( connectionString );
114  std::vector<std::tuple<cond::Time_t,cond::Hash> > iovs;
115  m_dbSession.getIovRange( tag0, time0, time0, iovs );
116  m_dbSession.getIovRange( tag1, time1, time1, iovs );
117  m_data = processData( iovs );
119  // fixme...
120  return true;
121  }
const boost::posix_time::ptime time0
void start(bool readOnly=true)
Definition: Session.cc:22
Transaction & transaction()
Definition: Session.cc:66
void addParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:125
Session createSession(const std::string &connectionString, bool writeCapable=false)
static ServiceToken createSet(std::vector< ParameterSet > &)
virtual std::string processData(const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs)
cond::persistency::Session m_dbSession
bool getIovRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, std::vector< std::tuple< cond::Time_t, cond::Hash > > &range)
Definition: Session.cc:116
def operate(timelog, memlog, json_f, num)
void cond::payloadInspector::PlotBase::setSingleIov ( bool  flag)
void cond::payloadInspector::PlotBase::setTwoTags ( bool  flag)
std::string cond::payloadInspector::PlotBase::title ( ) const
std::string cond::payloadInspector::PlotBase::type ( ) const

Member Data Documentation

std::string cond::payloadInspector::PlotBase::m_data = ""
private

Definition at line 198 of file PayloadInspector.h.

Referenced by data(), process(), and processTwoTags().

cond::persistency::Session cond::payloadInspector::PlotBase::m_dbSession
private

Definition at line 195 of file PayloadInspector.h.

Referenced by dbSession(), getTagInfo(), process(), and processTwoTags().

PlotAnnotations cond::payloadInspector::PlotBase::m_plotAnnotations
protected
std::string cond::payloadInspector::PlotBase::m_tag0 = ""
protected

Definition at line 190 of file PayloadInspector.h.

Referenced by process(), and processTwoTags().

std::string cond::payloadInspector::PlotBase::m_tag1 = ""
protected

Definition at line 191 of file PayloadInspector.h.

Referenced by processTwoTags().