List of all members.
Detailed Description
Definition at line 24 of file HLTConfDummy2DB.cc.
Constructor & Destructor Documentation
lumi::HLTConfDummy2DB::HLTConfDummy2DB |
( |
const std::string & |
dest | ) |
[explicit] |
lumi::HLTConfDummy2DB::~HLTConfDummy2DB |
( |
| ) |
[virtual] |
Member Function Documentation
const std::string lumi::HLTConfDummy2DB::dataType |
( |
| ) |
const [virtual] |
void lumi::HLTConfDummy2DB::retrieveData |
( |
unsigned int |
runnumber | ) |
[virtual] |
Implements lumi::DataPipe.
Definition at line 36 of file HLTConfDummy2DB.cc.
References trackerHits::c, gather_cfg::cout, Exception, i, lumi::DataPipe::m_authpath, lumi::DataPipe::m_dest, python::IdGenerator::schema, python::CommonUtils::session, lumi::DBConfig::setAuthentication(), python::CommonUtils::svc, and lumi::LumiNames::trghltMapTableName().
{
std::string fakehltkey("/cdaq/Cosmic/V12");
coral::ConnectionService* svc=new coral::ConnectionService;
lumi::DBConfig dbconf(*svc);
if(!m_authpath.empty()){
dbconf.setAuthentication(m_authpath);
}
coral::ISessionProxy* session=svc->connect(m_dest,coral::Update);
try{
unsigned int totalhltpath=126;
session->transaction().start(false);
coral::ISchema& schema=session->nominalSchema();
coral::ITable& hltconftable=schema.tableHandle(LumiNames::trghltMapTableName());
coral::AttributeList hltconfData;
hltconfData.extend<std::string>("HLTKEY");
hltconfData.extend<std::string>("HLTPATHNAME");
hltconfData.extend<std::string>("L1SEED");
coral::IBulkOperation* hltconfInserter=hltconftable.dataEditor().bulkInsert(hltconfData,200);
hltconfData["HLTKEY"].data<std::string>()=fakehltkey;
std::string& hltpathname=hltconfData["HLTPATHNAME"].data<std::string>();
std::string& l1seed=hltconfData["L1SEED"].data<std::string>();
for(unsigned int i=1;i<=totalhltpath;++i){
char c[10];
::sprintf(c,"-%d",i);
hltpathname=std::string("FakeHLTPATH_")+std::string(c);
l1seed=std::string("FakeL1SeedExpression_")+std::string(c);
hltconfInserter->processNextIteration();
}
hltconfInserter->flush();
delete hltconfInserter;
session->transaction().commit();
}catch( const coral::Exception& er){
std::cout<<"database problem "<<er.what()<<std::endl;
session->transaction().rollback();
delete session;
delete svc;
throw er;
}
delete session;
delete svc;
}
const std::string lumi::HLTConfDummy2DB::sourceType |
( |
| ) |
const [virtual] |