CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions
l1t::OMDSReader Class Reference

#include <OMDSReader.h>

Inheritance diagram for l1t::OMDSReader:
l1t::DataManager

Classes

class  QueryResults
 

Public Member Functions

const QueryResults basicQuery (const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
const QueryResults basicQuery (const std::string &columnName, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
template<class T >
const QueryResults basicQueryGenericKey (const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
template<class T >
const QueryResults basicQueryGenericKey (const std::string &columnName, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
const QueryResults basicQueryView (const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &viewName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
const QueryResults basicQueryView (const std::string &columnName, const std::string &schemaName, const std::string &viewName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
 
std::vector< std::string > columnNames (const std::string &schemaName, const std::string &tableName) const
 
std::vector< std::string > columnNamesView (const std::string &schemaName, const std::string &viewName) const
 
void connect (const std::string &connectString, const std::string &authenticationPath)
 
 OMDSReader ()
 
 OMDSReader (const std::string &connectString, const std::string &authenticationPath)
 
template<class T >
const QueryResults singleAttribute (const T &data) const
 
virtual ~OMDSReader ()
 
- Public Member Functions inherited from l1t::DataManager
void connect (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
 
 DataManager ()
 
 DataManager (const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
 
cond::DbConnectiondbConnection ()
 
cond::DbSessiondbSession ()
 
void setDebug (bool debug)
 
virtual ~DataManager ()
 

Private Member Functions

 OMDSReader (const OMDSReader &)
 
const OMDSReaderoperator= (const OMDSReader &)
 

Additional Inherited Members

- Protected Member Functions inherited from l1t::DataManager
edm::eventsetup::TypeTag findType (const std::string &type) const
 
- Protected Attributes inherited from l1t::DataManager
cond::DbConnectionconnection
 
cond::DbSessionsession
 

Detailed Description

Definition at line 44 of file OMDSReader.h.

Constructor & Destructor Documentation

OMDSReader::OMDSReader ( )

Definition at line 38 of file OMDSReader.cc.

39  : DataManager()
40  {}
OMDSReader::OMDSReader ( const std::string &  connectString,
const std::string &  authenticationPath 
)

Definition at line 42 of file OMDSReader.cc.

References l1t::DataManager::session, cond::DbTransaction::start(), and cond::DbSession::transaction().

44  : DataManager( connectString, authenticationPath, true )
45  {
46  session->transaction().start( true ) ;
47  }
DbTransaction & transaction()
Definition: DbSession.cc:189
int start(bool readOnly=false)
start transaction
cond::DbSession * session
Definition: DataManager.h:44
OMDSReader::~OMDSReader ( )
virtual

Definition at line 62 of file OMDSReader.cc.

63 {
64 }
l1t::OMDSReader::OMDSReader ( const OMDSReader )
private

Member Function Documentation

const OMDSReader::QueryResults OMDSReader::basicQuery ( const std::vector< std::string > &  columnNames,
const std::string &  schemaName,
const std::string &  tableName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 87 of file OMDSReader.cc.

References l1t::OMDSReader::QueryResults::attributeLists(), l1t::OMDSReader::QueryResults::columnNames(), end, l1t::OMDSReader::QueryResults::fillVariable(), cond::DbSession::nominalSchema(), l1t::OMDSReader::QueryResults::numberRows(), o2o::query, cond::DbSession::schema(), python.IdGenerator::schema, l1t::DataManager::session, asciidump::table, and tmp.

Referenced by L1GtPsbSetupConfigOnlineProd::addPsbFromDb(), basicQuery(), basicQueryView(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), CSCTFAlignmentOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), CSCTFConfigOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1MuTriggerPtScaleOnlineProducer::newObject(), L1HfRingEtScaleOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), and L1SubsystemKeysOnlineProd::produce().

94  {
95  coral::ISchema& schema = schemaName.empty() ?
97  session->schema( schemaName ) ;
98 
99  coral::ITable& table = schema.tableHandle( tableName ) ;
100 
101  // Pointer is deleted automatically at end of function.
102  boost::shared_ptr< coral::IQuery > query( table.newQuery() ) ;
103 
104  // Construct query
105  std::vector< std::string >::const_iterator it = columnNames.begin() ;
106  std::vector< std::string >::const_iterator end = columnNames.end() ;
107  for( ; it != end ; ++it )
108  {
109  query->addToOutputList( *it ) ;
110  }
111 
112  // Only apply condition if RHS has one row.
113  if( !conditionLHS.empty() && conditionRHS.numberRows() == 1 )
114  {
115  if( !conditionRHSName.empty() )
116  {
117  // Assume all RHS types are strings.
118  coral::AttributeList attList ;
119  attList.extend( conditionRHSName, typeid( std::string ) ) ;
120  std::string tmp ;
121  conditionRHS.fillVariable( conditionRHSName, tmp ) ;
122  attList[ conditionRHSName ].data< std::string >() = tmp ;
123 
124  query->setCondition( conditionLHS + " = :" + conditionRHSName,
125  attList ) ;
126  }
127  else if( conditionRHS.columnNames().size() == 1 )
128  // check for only one column
129  {
130  query->setCondition( conditionLHS + " = :" +
131  conditionRHS.columnNames().front(),
132  conditionRHS.attributeLists().front() ) ;
133  }
134  }
135 
136  coral::ICursor& cursor = query->execute() ;
137 
138  // Copy AttributeLists for external use because the cursor is deleted
139  // when the query goes out of scope.
140  std::vector< coral::AttributeList > atts ;
141  while( cursor.next() )
142  {
143  atts.push_back( cursor.currentRow() ) ;
144  } ;
145 
146  return QueryResults( columnNames, atts ) ;
147  }
list table
Definition: asciidump.py:386
coral::ISchema & schema(const std::string &schemaName)
Definition: DbSession.cc:223
#define end
Definition: vmac.h:38
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
tuple query
Definition: o2o.py:269
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
cond::DbSession * session
Definition: DataManager.h:44
const OMDSReader::QueryResults OMDSReader::basicQuery ( const std::string &  columnName,
const std::string &  schemaName,
const std::string &  tableName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 150 of file OMDSReader.cc.

References basicQuery(), and columnNames().

157  {
158  std::vector< std::string > columnNames ;
159  columnNames.push_back( columnName ) ;
160  return basicQuery( columnNames, schemaName, tableName,
161  conditionLHS, conditionRHS, conditionRHSName ) ;
162  }
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
Definition: OMDSReader.cc:87
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
template<class T >
const OMDSReader::QueryResults OMDSReader::basicQueryGenericKey ( const std::vector< std::string > &  columnNames,
const std::string &  schemaName,
const std::string &  tableName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 217 of file OMDSReader.h.

References l1t::OMDSReader::QueryResults::attributeLists(), l1t::OMDSReader::QueryResults::columnNames(), end, l1t::OMDSReader::QueryResults::fillVariable(), cond::DbSession::nominalSchema(), l1t::OMDSReader::QueryResults::numberRows(), o2o::query, cond::DbSession::schema(), python.IdGenerator::schema, l1t::DataManager::session, asciidump::table, and tmp.

Referenced by L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), and L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig().

224  {
225  coral::ISchema& schema = schemaName.empty() ?
227  session->schema( schemaName ) ;
228 
229  coral::ITable& table = schema.tableHandle( tableName ) ;
230 
231  // Pointer is deleted automatically at end of function.
232  boost::shared_ptr< coral::IQuery > query( table.newQuery() ) ;
233 
234  // Construct query
235  std::vector< std::string >::const_iterator it = columnNames.begin() ;
236  std::vector< std::string >::const_iterator end = columnNames.end() ;
237  for( ; it != end ; ++it )
238  {
239  query->addToOutputList( *it ) ;
240  }
241 
242  // Only apply condition if RHS has one row.
243  if( !conditionLHS.empty() && conditionRHS.numberRows() == 1 )
244  {
245  if( !conditionRHSName.empty() )
246  {
247  // Use type of dummyVariable to determine type of condition RHS
248  coral::AttributeList attList ;
249  attList.extend( conditionRHSName, typeid( T ) ) ;
250  T tmp ;
251  conditionRHS.fillVariable( conditionRHSName, tmp ) ;
252  attList[ conditionRHSName ].data< T >() = tmp ;
253 
254  query->setCondition( conditionLHS + " = :" + conditionRHSName,
255  attList ) ;
256  }
257  else if( conditionRHS.columnNames().size() == 1 )
258  // check for only one column
259  {
260  query->setCondition( conditionLHS + " = :" +
261  conditionRHS.columnNames().front(),
262  conditionRHS.attributeLists().front() ) ;
263  }
264  }
265 
266  coral::ICursor& cursor = query->execute() ;
267 
268  // Copy AttributeLists for external use because the cursor is deleted
269  // when the query goes out of scope.
270  std::vector< coral::AttributeList > atts ;
271  while( cursor.next() )
272  {
273  atts.push_back( cursor.currentRow() ) ;
274  } ;
275 
276  return QueryResults( columnNames, atts ) ;
277  }
list table
Definition: asciidump.py:386
coral::ISchema & schema(const std::string &schemaName)
Definition: DbSession.cc:223
#define end
Definition: vmac.h:38
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
tuple query
Definition: o2o.py:269
long double T
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
cond::DbSession * session
Definition: DataManager.h:44
template<class T >
const OMDSReader::QueryResults OMDSReader::basicQueryGenericKey ( const std::string &  columnName,
const std::string &  schemaName,
const std::string &  tableName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 280 of file OMDSReader.h.

References columnNames().

287  {
288  std::vector< std::string > columnNames ;
289  columnNames.push_back( columnName ) ;
290  return basicQueryGenericKey< T >( columnNames, schemaName, tableName,
291  conditionLHS, conditionRHS, conditionRHSName);
292  }
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
const OMDSReader::QueryResults OMDSReader::basicQueryView ( const std::vector< std::string > &  columnNames,
const std::string &  schemaName,
const std::string &  viewName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 191 of file OMDSReader.cc.

References l1t::OMDSReader::QueryResults::attributeLists(), l1t::OMDSReader::QueryResults::columnNames(), l1t::OMDSReader::QueryResults::fillVariable(), cond::DbSession::nominalSchema(), l1t::OMDSReader::QueryResults::numberRows(), o2o::query, cond::DbSession::schema(), python.IdGenerator::schema, l1t::DataManager::session, and tmp.

Referenced by L1CaloHcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

198  {
199  coral::ISchema& schema = schemaName.empty() ?
201  session->schema( schemaName ) ;
202 
203  // coral::IView& view = schema.viewHandle( viewName ) ;
204 
205  // Pointer is deleted automatically at end of function.
206  coral::IQuery* query = schema.newQuery(); ;
207 
208  // Construct query
209  for (std::vector<std::string>::const_iterator constIt = columnNames.begin(); constIt
210  != columnNames.end(); ++constIt) {
211  query->addToOutputList(*constIt);
212  }
213 
214  query->addToTableList(viewName);
215 
216  // Only apply condition if RHS has one row.
217  if (!conditionLHS.empty() && conditionRHS.numberRows() == 1) {
218 
219  if (!conditionRHSName.empty()) {
220  // Assume all RHS types are strings.
221  coral::AttributeList attList;
222  attList.extend(conditionRHSName, typeid(std::string));
223  std::string tmp;
224  conditionRHS.fillVariable(conditionRHSName, tmp);
225  attList[conditionRHSName].data<std::string> () = tmp;
226 
227  query->setCondition(conditionLHS + " = :" + conditionRHSName, attList);
228  } else if (conditionRHS.columnNames().size() == 1)
229  // check for only one column
230  {
231  query->setCondition(
232  conditionLHS + " = :" + conditionRHS.columnNames().front(),
233  conditionRHS.attributeLists().front());
234  }
235  }
236 
237  coral::ICursor& cursor = query->execute();
238 
239  // Copy AttributeLists for external use because the cursor is deleted
240  // when the query goes out of scope.
241  std::vector<coral::AttributeList> atts;
242  while (cursor.next()) {
243  atts.push_back(cursor.currentRow());
244  };
245 
246  delete query;
247 
248 // // Run a wildcard query on the view
249 // coral::IQuery* query2 = workingSchema.newQuery();
250 // query2->addToTableList(V0);
251 // coral::ICursor& cursor2 = query2->execute();
252 // while ( cursor2.next() ) {
253 // cursor2.currentRow().toOutputStream( std::cout ) << std::endl;
254 // }
255 // delete query2;
256 
257 
258 
259  return QueryResults(columnNames, atts);
260  }
coral::ISchema & schema(const std::string &schemaName)
Definition: DbSession.cc:223
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
tuple query
Definition: o2o.py:269
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
cond::DbSession * session
Definition: DataManager.h:44
const OMDSReader::QueryResults OMDSReader::basicQueryView ( const std::string &  columnName,
const std::string &  schemaName,
const std::string &  viewName,
const std::string &  conditionLHS = "",
const QueryResults  conditionRHS = QueryResults(),
const std::string &  conditionRHSName = "" 
) const

Definition at line 263 of file OMDSReader.cc.

References basicQuery(), and columnNames().

270  {
271  std::vector< std::string > columnNames ;
272  columnNames.push_back( columnName ) ;
273  return basicQuery( columnNames, schemaName, viewName,
274  conditionLHS, conditionRHS, conditionRHSName ) ;
275  }
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="") const
Definition: OMDSReader.cc:87
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName) const
Definition: OMDSReader.cc:165
std::vector< std::string > OMDSReader::columnNames ( const std::string &  schemaName,
const std::string &  tableName 
) const

Definition at line 165 of file OMDSReader.cc.

References i, cscdqm::h::names, cond::DbSession::nominalSchema(), cond::DbSession::schema(), python.IdGenerator::schema, l1t::DataManager::session, and asciidump::table.

Referenced by basicQuery(), basicQueryGenericKey(), basicQueryView(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), and L1GtPsbSetupConfigOnlineProd::newObject().

168  {
169  coral::ISchema& schema = schemaName.empty() ?
171  session->schema( schemaName ) ;
172 
173  coral::ITable& table = schema.tableHandle( tableName ) ;
174  const coral::ITableDescription& tableDesc = table.description() ;
175 
176  std::vector< std::string > names ;
177  int nCols = tableDesc.numberOfColumns() ;
178 
179  for( int i = 0 ; i < nCols ; ++i )
180  {
181  const coral::IColumn& column = tableDesc.columnDescription( i ) ;
182  names.push_back( column.name() ) ;
183  }
184 
185  return names ;
186  }
list table
Definition: asciidump.py:386
int i
Definition: DBlmapReader.cc:9
static const HistoName names[]
coral::ISchema & schema(const std::string &schemaName)
Definition: DbSession.cc:223
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
cond::DbSession * session
Definition: DataManager.h:44
std::vector< std::string > OMDSReader::columnNamesView ( const std::string &  schemaName,
const std::string &  viewName 
) const

Definition at line 278 of file OMDSReader.cc.

References i, cscdqm::h::names, cond::DbSession::nominalSchema(), cond::DbSession::schema(), python.IdGenerator::schema, and l1t::DataManager::session.

Referenced by L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

281  {
282  coral::ISchema& schema = schemaName.empty() ?
284  session->schema( schemaName ) ;
285 
286  std::set< std::string > views = schema.listViews ();
287  std::vector< std::string > names ;
288 
289  if (schema.existsView (viewName)) {
290 
291  coral::IView& view = schema.viewHandle( viewName ) ;
292 
293  int nCols = view.numberOfColumns() ;
294 
295  for (int i = 0; i < nCols; ++i) {
296  const coral::IColumn& column = view.column(i);
297  names.push_back(column.name());
298  }
299 
300  return names ;
301 
302  }
303 
304  return names ;
305 
306  }
int i
Definition: DBlmapReader.cc:9
static const HistoName names[]
coral::ISchema & schema(const std::string &schemaName)
Definition: DbSession.cc:223
coral::ISchema & nominalSchema()
Definition: DbSession.cc:228
cond::DbSession * session
Definition: DataManager.h:44
void OMDSReader::connect ( const std::string &  connectString,
const std::string &  authenticationPath 
)

Definition at line 50 of file OMDSReader.cc.

References l1t::DataManager::connect(), l1t::DataManager::session, cond::DbTransaction::start(), and cond::DbSession::transaction().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea::__init__(), Vispa.Views.PropertyView.BooleanProperty::__init__(), Vispa.Gui.FindDialog.FindDialog::_addScript(), Vispa.Gui.FindDialog.FindDialog::_addStringProperty(), Vispa.Main.Application.Application::_connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView::_createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog::addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer::addWidget(), Vispa.Views.PropertyView.PropertyView::append(), Vispa.Views.PropertyView.PropertyView::appendAddRow(), Vispa.Main.Application.Application::createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createButton(), Vispa.Views.LineDecayView.LineDecayView::createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty::createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), L1ConfigOnlineProdBase< TRcd, TData >::L1ConfigOnlineProdBase(), Vispa.Gui.PortWidget.PortWidget::mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty::setChecked(), Vispa.Main.SplitterTab.SplitterTab::setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab::setController(), Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), Vispa.Views.PropertyView.DropDownProperty::setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty::setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setTab(), Vispa.Views.PropertyView.IntegerProperty::setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController::updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::updateViewMenu().

52  {
53  DataManager::connect( connectString, authenticationPath, true ) ;
54  session->transaction().start( true ) ;
55  }
DbTransaction & transaction()
Definition: DbSession.cc:189
void connect(const std::string &connectString, const std::string &authenticationPath, bool isOMDS=false)
Definition: DataManager.cc:24
int start(bool readOnly=false)
start transaction
cond::DbSession * session
Definition: DataManager.h:44
const OMDSReader& l1t::OMDSReader::operator= ( const OMDSReader )
private
template<class T >
const OMDSReader::QueryResults OMDSReader::singleAttribute ( const T data) const

Definition at line 295 of file OMDSReader.h.

References cscdqm::h::names.

Referenced by L1GtPsbSetupConfigOnlineProd::addPsbFromDb(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), CSCTFAlignmentOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), L1JetEtScaleOnlineProd::newObject(), L1MuTriggerPtScaleOnlineProducer::newObject(), L1EmEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

296  {
297  std::vector< std::string > names ;
298  names.push_back( "dummy" ) ;
299 
300  coral::AttributeList attList ;
301  attList.extend( "dummy", typeid( T ) ) ;
302  attList[ "dummy" ].data< T >() = data ;
303 
304  std::vector< coral::AttributeList > atts ;
305  atts.push_back( attList ) ;
306 
307  return QueryResults( names, atts ) ;
308  }
static const HistoName names[]
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
long double T