magic: works only if a file local registry exists in the file #define ELEM_CONSTR(xx_) \ cond::ClassInfo::ClassInfo(const std::type_info& t,int) : tinfo(t) {registry = registerMe(t);}
typedef edmplugin::PluginFactory< ora::IBlobStreamingService*() > cond::BlobStreamerPluginFactory |
Definition at line 8 of file BlobStreamerPluginFactory.h.
typedef edmplugin::PluginFactory<ClassInfo*() > cond::ClassInfoFactory |
typedef edmplugin::PluginFactory< coral::Service*(const std::string&) > cond::CoralServicePluginFactory |
Definition at line 24 of file CoralServiceFactory.h.
typedef std::vector<coral::monitor::Event::Record> cond::EventStream |
The raw stream of recorder monitoring events.
Definition at line 24 of file SQLMonitoringService.h.
typedef std::set<cond::TagMetadata> cond::GlobalTag |
Definition at line 20 of file CondPyInterface.h.
typedef ora::Guid cond::Guid |
typedef boost::transform_iterator<IterHelp,boost::counting_iterator<int> > cond::iov_range_iterator |
Definition at line 101 of file IOVProxy.h.
typedef edmplugin::PluginFactory< cond::DataProxyWrapperBase* () > cond::ProxyFactory |
Definition at line 25 of file ProxyFactory.h.
typedef std::map< std::string, SessionMonitor > cond::Repository |
The repository of monitored events for all sessions where event streams are identified by session key
Definition at line 38 of file SQLMonitoringService.h.
typedef edmplugin::PluginFactory< cond::TechnologyProxy*() > cond::TechnologyProxyFactory |
Definition at line 10 of file TechnologyProxyFactory.h.
typedef unsigned long long cond::Time_t |
typedef unsigned long long cond::uint64_t |
typedef std::pair<unsigned int, unsigned int> cond::UnpackedTime |
typedef std::pair<Time_t, Time_t> cond::ValidityInterval |
Definition at line 30 of file DbConnectionConfiguration.h.
Definition at line 28 of file DbConnectionConfiguration.h.
enum cond::TimeType |
std::auto_ptr<cond::TechnologyProxy> cond::buildTechnologyProxy | ( | const std::string & | userconnect, |
const DbConnection & | connection | ||
) | [inline] |
Definition at line 17 of file DbSession.cc.
References SurfaceDeformationFactory::create(), Exception, reco::get(), AlCaHLTBitMon_ParallelJobs::p, and pos.
Referenced by cond::DbSession::importMapping(), cond::SessionImpl::open(), and cond::SessionImpl::openReadOnly().
{ std::string protocol; std::size_t pos=userconnect.find_first_of(':'); if( pos!=std::string::npos ){ protocol=userconnect.substr(0,pos); std::size_t p=protocol.find_first_of('_'); if(p!=std::string::npos){ protocol=protocol.substr(0,p); } }else{ throw cond::Exception(userconnect +":connection string format error"); } std::auto_ptr<cond::TechnologyProxy> ptr(cond::TechnologyProxyFactory::get()->create(protocol)); (*ptr).initialize(connection); return ptr; }
char const * cond::className | ( | const std::type_info & | t | ) |
Definition at line 8 of file ClassID.cc.
References ntuplemaker::status.
Referenced by cond::service::GetTokenFromPointer< T >::operator()(), cond::ClassInfo::pluginName(), and cond::IOVSequence::swapTokens().
std::string cond::classNameForTypeId | ( | const std::type_info & | typeInfo | ) | [inline] |
Definition at line 38 of file PoolDBOutputService.h.
Referenced by cond::service::GetTokenFromPointer< T >::classNameForPointer(), l1t::WriterProxyT< Record, Type >::save(), and l1t::DataWriter::writeKeyList().
{ Reflex::Type reflexType = Reflex::Type::ByTypeInfo( typeInfo ); //FIXME: should become Reflex::SCOPED? return reflexType.Name(); }
unsigned int cond::countslash | ( | const std::string & | input | ) |
Definition at line 57 of file FrontierProxy.cc.
References prof2calltree::count.
Referenced by cond::FrontierProxy::makeRealConnectString().
{ unsigned int count=0; std::string::size_type slashpos( 0 ); while( slashpos!=std::string::npos){ slashpos = input.find('/', slashpos ); if ( slashpos != std::string::npos ){ ++count; // start next search after this word slashpos += 1; } } return count; }
void cond::draw | ( | std::vector< TH2F > & | graphData, |
std::string | filename | ||
) |
Definition at line 113 of file HcalGainsPyWrapper.cc.
References svgfig::canvas().
Referenced by CompHist::drawEps(), CompHist::drawPs(), cond::PayLoadInspector< DataT >::plot(), SiPixelRecHitQuality::Packing::setProbabilityQ(), SiPixelRecHitQuality::Packing::setProbabilityXY(), and examples::TrackAnalysisAlgorithm::terminate().
{ //Drawing... // use David's palette gStyle->SetPalette(1); const Int_t NCont = 999; gStyle->SetNumberContours(NCont); TCanvas canvas("CC map","CC map",840,369*4); TPad pad1("pad1","pad1", 0.0, 0.75, 1.0, 1.0); pad1.Draw(); TPad pad2("pad2","pad2", 0.0, 0.5, 1.0, 0.75); pad2.Draw(); TPad pad3("pad3","pad3", 0.0, 0.25, 1.0, 0.5); pad3.Draw(); TPad pad4("pad4","pad4", 0.0, 0.0, 1.0, 0.25); pad4.Draw(); pad1.cd(); graphData[0].SetStats(0); graphData[0].Draw("colz"); pad2.cd(); graphData[1].SetStats(0); graphData[1].Draw("colz"); pad3.cd(); graphData[2].SetStats(0); graphData[2].Draw("colz"); pad4.cd(); graphData[3].SetStats(0); graphData[3].Draw("colz"); canvas.SaveAs(filename.c_str()); }
const TimeTypeSpecs & cond::findSpecs | ( | std::string const & | name | ) |
Definition at line 33 of file Time.cc.
References Exception, i, TIMETYPE_LIST_MAX, and timeTypeSpecs.
Referenced by cond::service::PoolDBOutputService::fillRecord(), and cond::service::PoolDBOutputService::PoolDBOutputService().
{ size_t i=0; for (; i<TIMETYPE_LIST_MAX; i++) if (name==timeTypeSpecs[i].name) return timeTypeSpecs[i]; throw cms::Exception("invalid timetype: "+name); return timeTypeSpecs[0]; // compiler happy }
cond::Time_t cond::fromIOVSyncValue | ( | edm::IOVSyncValue const & | time, |
cond::TimeType | timetype | ||
) |
Definition at line 29 of file ConvertIOVSyncValue.cc.
References edm::IOVSyncValue::eventID(), lumiid, edm::IOVSyncValue::luminosityBlockNumber(), runnumber, edm::IOVSyncValue::time(), timestamp, and edm::LuminosityBlockID::value().
Referenced by CondDBESSource::setIntervalFor().
{ switch (timetype) { case cond::runnumber : return time.eventID().run(); case cond::lumiid : { edm::LuminosityBlockID lum(time.eventID().run(), time.luminosityBlockNumber()); return lum.value(); } case cond::timestamp : return time.time().value(); default: return 0; } }
void cond::genMD5 | ( | const string & | s, |
void * | code | ||
) |
void * cond::genMD5 | ( | void * | buffer, |
unsigned long | len, | ||
void * | code | ||
) |
Definition at line 358 of file GenMD5.cc.
Referenced by writeTokenContainerFragment().
{ MD5 checkSum((unsigned char*)buffer, len); checkSum.raw_digest((unsigned char*)code); return code; }
void cond::genMD5 | ( | const std::string & | s, |
void * | code | ||
) |
std::string cond::getLoginName | ( | ) |
Definition at line 41 of file DecodingKey.cc.
References lumiQueryAPI::msg, and throwException().
Referenced by cond::DecodingKey::init().
{ std::string loginName(""); struct passwd* userp = ::getpwuid(::getuid()); if(userp) { char* uName = userp->pw_name; if(uName){ loginName += uName; } } if(loginName.empty()){ std::string msg("Cannot determine login name."); throwException(msg,"DecodingKey::getLoginName"); } return loginName; }
std::string cond::getTotalErrors | ( | const std::vector< EcalChannelStatusCode > & | vItems | ) |
Definition at line 239 of file EcalChannelStatusPyWrapper.cc.
References bits, i, getHLTprescales::index, and setErr().
Referenced by cond::PayLoadInspector< DataT >::summary().
{ unsigned int stcode = 0, index = 0, totalErrorCodes = 22; std::stringstream ss; std::vector< std::pair< std::string, unsigned int > > vTotalWithErr(totalErrorCodes); // init error codes: index = 0; ss.str(""); ss << " No errors. "; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << "DAC settings problem, pedestal not in the design range, " << "Reco Action: standard reco."; vTotalWithErr[index].first = ss.str(); ++index;//1 ss.str(""); ss << "["<< index << "]:" << "channel with no laser, ok elsewhere; " << "Reco Action: standard reco."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << "noisy; " << "Reco Action: standard reco."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << "very noisy; " << "Reco Action: special reco (to be decided)."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]: reserved for more categories of noisy channels."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]: reserved for more categories of noisy channels."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]: reserved for more categories of noisy channels."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel at fixed gain 6 (or 6 and 1); " << "Reco Action: 3+5 or 3+1, special reco."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel at fixed gain 1; " << "Reco Action: 3+5 or 3+1, special reco."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel at fixed gain 0 (dead of type this); " << "Reco Action: recovery from neighbours."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " non responding isolated channel (dead of type other); " << "Reco Action: recovery from neighbours."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel and one or more neigbors not responding (e.g.: in a dead VFE 5x1 channel) " << "Reco Action: no recovery."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel in TT with no data link, TP data ok; " << "Reco Action: recovery from TP data."; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << "["<< index << "]:" << " channel in TT with no data link and no TP data; " << "Reco Action: none."; vTotalWithErr[index].first = ss.str(); ++index; unsigned int bits = 6; ss.str(""); ss << " bit["<< bits++ << "]:" << " HV good/not good;"; vTotalWithErr[index].first = ss.str(); ++index;//15 ss.str(""); ss << " bit["<< bits++ << "]:" << " LV on/off;"; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << " bit["<< bits++ << "]:" << " DAQ in/out;"; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << " bit["<< bits++ << "]:" << " TP readout on/off;"; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << " bit["<< bits++ << "]:" << " Trigger in/out;"; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << " bit["<< bits++ << "]:" << " Temperature ok/not ok;"; vTotalWithErr[index].first = ss.str(); ++index; ss.str(""); ss << " bit["<< bits++ << "]:" << " Humidity ok/not;"; vTotalWithErr[index].first = ss.str(); ++index;//21 ss.str(""); //count error codes for each error: for (std::vector<EcalChannelStatusCode>::const_iterator vIter = vItems.begin(); vIter != vItems.end(); ++vIter){ stcode = vIter->getStatusCode(); if (stcode !=0){ setErr(stcode, vTotalWithErr); } } unsigned int i = 0; for (std::vector< std::pair< std::string, unsigned int > >::const_iterator iTotalErr = vTotalWithErr.begin(); iTotalErr != vTotalWithErr.end(); ++iTotalErr){ if (iTotalErr->second != 0) ss << "Total:" << iTotalErr->second << " Error:" << iTotalErr->first << std::endl; ++i; } return ss.str(); }
ub8 cond::hash64 | ( | unsigned char * | k, |
unsigned long long | length, | ||
unsigned long long | level | ||
) |
Definition at line 45 of file hash64.cc.
References a, b, trackerHits::c, testEve_cfg::level, and mix64.
Referenced by cond::KeyedElement::convert().
{ register ub8 a,b,c,len; /* Set up the internal state */ len = length; a = b = level; /* the previous hash value */ c = 0x9e3779b97f4a7c13LL; /* the golden ratio; an arbitrary value */ /*---------------------------------------- handle most of the key */ if (((unsigned long)k)&7) { while (len >= 24) { a += (k[0] +((ub8)k[ 1]<< 8)+((ub8)k[ 2]<<16)+((ub8)k[ 3]<<24) +((ub8)k[4 ]<<32)+((ub8)k[ 5]<<40)+((ub8)k[ 6]<<48)+((ub8)k[ 7]<<56)); b += (k[8] +((ub8)k[ 9]<< 8)+((ub8)k[10]<<16)+((ub8)k[11]<<24) +((ub8)k[12]<<32)+((ub8)k[13]<<40)+((ub8)k[14]<<48)+((ub8)k[15]<<56)); c += (k[16] +((ub8)k[17]<< 8)+((ub8)k[18]<<16)+((ub8)k[19]<<24) +((ub8)k[20]<<32)+((ub8)k[21]<<40)+((ub8)k[22]<<48)+((ub8)k[23]<<56)); mix64(a,b,c); k += 24; len -= 24; } } else { while (len >= 24) /* aligned */ { a += *(ub8 *)(k+0); b += *(ub8 *)(k+8); c += *(ub8 *)(k+16); mix64(a,b,c); k += 24; len -= 24; } } /*------------------------------------- handle the last 23 bytes */ c += length; switch(len) /* all the case statements fall through */ { case 23: c+=((ub8)k[22]<<56); case 22: c+=((ub8)k[21]<<48); case 21: c+=((ub8)k[20]<<40); case 20: c+=((ub8)k[19]<<32); case 19: c+=((ub8)k[18]<<24); case 18: c+=((ub8)k[17]<<16); case 17: c+=((ub8)k[16]<<8); /* the first byte of c is reserved for the length */ case 16: b+=((ub8)k[15]<<56); case 15: b+=((ub8)k[14]<<48); case 14: b+=((ub8)k[13]<<40); case 13: b+=((ub8)k[12]<<32); case 12: b+=((ub8)k[11]<<24); case 11: b+=((ub8)k[10]<<16); case 10: b+=((ub8)k[ 9]<<8); case 9: b+=((ub8)k[ 8]); case 8: a+=((ub8)k[ 7]<<56); case 7: a+=((ub8)k[ 6]<<48); case 6: a+=((ub8)k[ 5]<<40); case 5: a+=((ub8)k[ 4]<<32); case 4: a+=((ub8)k[ 3]<<24); case 3: a+=((ub8)k[ 2]<<16); case 2: a+=((ub8)k[ 1]<<8); case 1: a+=((ub8)k[ 0]); /* case 0: nothing left to add */ } mix64(a,b,c); /*-------------------------------------------- report the result */ return c; }
std::string cond::insertIOV | ( | cond::DbSession & | dbSess, |
const boost::shared_ptr< IOVSequence > & | data, | ||
bool | swapOIds = false |
||
) |
Definition at line 26 of file IOVEditor.cc.
References cond::IOVNames::container(), cond::DbSession::isOldSchema(), cond::DbSession::storage(), and cond::DbSession::storeObject().
Referenced by cond::IOVEditor::create().
{ // ***** TEMPORARY FOR TRANSITION PHASE if( swapOIds && dbSess.isOldSchema() ){ PoolTokenWriter writer( dbSess.storage() ); data->swapOIds( writer ); } // ***** return dbSess.storeObject( data.get(), cond::IOVNames::container()); }
const Time_t cond::invalidTime | ( | 0 | ) |
const std::string cond::invalidToken | ( | " " | ) |
edm::IOVSyncValue cond::limitedIOVSyncValue | ( | cond::Time_t | time, |
cond::TimeType | timetype | ||
) |
Definition at line 46 of file ConvertIOVSyncValue.cc.
References edm::IOVSyncValue::invalidIOVSyncValue(), prof2calltree::l, lumiid, edm::LuminosityBlockID::luminosityBlock(), edm::EventID::maxEventNumber(), edm::LuminosityBlockID::run(), runnumber, and timestamp.
Referenced by CondDBESSource::setIntervalFor().
{ switch (timetype) { case cond::runnumber : // last lumi and event of this run return edm::IOVSyncValue( edm::EventID(time, edm::EventID::maxEventNumber(), edm::EventID::maxEventNumber()) ); case cond::lumiid : { // the same lumiblock edm::LuminosityBlockID l(time); return edm::IOVSyncValue(edm::EventID(l.run(), l.luminosityBlock(), edm::EventID::maxEventNumber()) ); } case cond::timestamp : // next event ? return edm::IOVSyncValue::invalidIOVSyncValue(); default: return edm::IOVSyncValue::invalidIOVSyncValue(); } }
edm::IOVSyncValue cond::limitedIOVSyncValue | ( | edm::IOVSyncValue const & | time, |
cond::TimeType | timetype | ||
) |
Definition at line 71 of file ConvertIOVSyncValue.cc.
References edm::IOVSyncValue::eventID(), edm::IOVSyncValue::invalidIOVSyncValue(), lumiid, edm::IOVSyncValue::luminosityBlockNumber(), edm::EventID::maxEventNumber(), runnumber, and timestamp.
{ switch (timetype) { case cond::runnumber : // last event of this run return edm::IOVSyncValue(edm::EventID(time.eventID().run(), edm::EventID::maxEventNumber(), edm::EventID::maxEventNumber()) ); case cond::lumiid : // the same lumiblock return edm::IOVSyncValue(edm::EventID(time.eventID().run(), time.luminosityBlockNumber(), edm::EventID::maxEventNumber()) ); case cond::timestamp : // same lumiblock return edm::IOVSyncValue(edm::EventID(time.eventID().run(), time.luminosityBlockNumber(), edm::EventID::maxEventNumber()) ); default: return edm::IOVSyncValue::invalidIOVSyncValue(); } }
Double_t cond::linearF | ( | Double_t * | x, |
Double_t * | par | ||
) |
Definition at line 260 of file RPCObGasPyWrapper.cc.
References detailsBasic3DVector::y.
Referenced by cond::PayLoadInspector< DataT >::plot().
boost::shared_ptr<cond::IOVSequence> cond::loadIOV | ( | cond::DbSession & | dbSess, |
const std::string & | iovToken | ||
) |
Definition at line 9 of file IOVEditor.cc.
References Exception, cond::DbSession::getTypedObject(), o2o::iov, cond::DbSession::isOldSchema(), cond::IOVSequence::loadAll(), geometryXMLtoCSV::parser, and cond::DbSession::storage().
{ if( iovToken.empty()){ throw cond::Exception("IOVEditor::loadIOV Error: token is empty."); } boost::shared_ptr<cond::IOVSequence> iov = dbSess.getTypedObject<cond::IOVSequence>( iovToken ); // loading the lazy-loading Queryable vector... iov->loadAll(); //**** temporary for the schema transition if( dbSess.isOldSchema() ){ PoolTokenParser parser( dbSess.storage() ); iov->swapTokens( parser ); } //**** return iov; }
void cond::parseLineForNamedParams | ( | const std::string & | line, |
std::map< std::string, std::string > & | params | ||
) |
Definition at line 57 of file DecodingKey.cc.
References ItemSeparator.
Referenced by cond::DecodingKey::createFromInputFile().
{ std::stringstream str( line ); std::string paramName(""); std::string paramValue(""); while( str.good() ){ std::string item(""); getline( str, item, ItemSeparator); if( item.size()>3 ){ paramName = item.substr(0,2); paramValue = item.substr(2); params.insert( std::make_pair( paramName, paramValue ) ); } } }
std::pair< std::string, int > cond::parseToken | ( | const std::string & | objectId | ) |
Definition at line 15 of file PoolToken.cc.
References fmt_oid, p1, p2, p3, LaserTracksInput_cfi::source, ora::throwException(), and tmp.
Referenced by cond::PayLoadInspector< DataT >::dump(), ora::CondMetadataTable::getObjectByName(), and cond::PoolTokenParser::parse().
{ if( source.empty() ) ora::throwException("Provided token is empty.","PoolToken::parseToken"); std::string tmp = source; std::pair<std::string,int> oid; oid.first = ""; oid.second = -1; for(char* p1 = (char*)tmp.c_str(); p1; p1 = ::strchr(++p1,'[')) { char* p2 = ::strchr(p1, '='); char* p3 = ::strchr(p1, ']'); if ( p2 && p3 ) { char* val = p2+1; if ( ::strncmp("[DB=", p1, 4) == 0 ) { *p3 = 0; } else if ( ::strncmp("[CNT=", p1, 5) == 0 ) { *p3 = 0; oid.first = val; } else if ( ::strncmp(fmt_oid, p1, 5) == 0 ) { int nn; ::sscanf(p1, fmt_oid, &nn, &oid.second); } else { *p3 = *p2 = 0; } *p3 = ']'; *p2 = '='; } } return oid; }
const char * cond::pluginCategory | ( | ) |
Definition at line 33 of file ProxyFactory.cc.
{ return "CondProxyFactory"; }
std::string cond::QIEDataCounter | ( | const int | nr, |
unsigned int & | formated_nr, | ||
int | base = 4 |
||
) |
Definition at line 102 of file HcalQIEDataPyWrapper.cc.
References newFWLiteAna::base.
Referenced by cond::PayLoadInspector< DataT >::plot().
char cond::randomChar | ( | ) |
Definition at line 36 of file DecodingKey.cc.
References b64str.
Referenced by cond::KeyGenerator::make().
std::string cond::schemaLabel | ( | const std::string & | serviceName, |
const std::string & | userName | ||
) |
std::string defaultConnectionString( const std::string& serviceConnectionString, const std::string& serviceName, const std::string& userName ){ size_t pos = serviceConnectionString.find( serviceName ); std::string technologyPrefix = serviceConnectionString.substr(0,pos); std::stringstream connStr; connStr << technologyPrefix; if( !userName.empty() ) connStr <<"/"<< userName; return connStr.str(); }
Definition at line 164 of file CredentialStore.cc.
References run_regression::ret, and serviceName.
Referenced by cond::CredentialStore::importForPrincipal(), and schemaLabelForCredentialStore().
{ std::string ret = userName; if( !serviceName.empty() ){ ret += "@"+serviceName; } return ret; }
std::string cond::schemaLabelForCredentialStore | ( | const std::string & | connectionString | ) |
Definition at line 172 of file CredentialStore.cc.
References geometryXMLtoCSV::parser, schemaLabel(), and serviceName.
Referenced by cond::CredentialStore::installAdmin(), and cond::CredentialStore::updatePrincipal().
{ coral::URIParser parser; parser.setURI( connectionString ); std::string serviceName = parser.hostName(); std::string schemaName = parser.databaseOrSchemaName(); return schemaLabel( serviceName, schemaName ); }
bool cond::selectAuthorization | ( | coral::ISchema & | schema, |
int | principalId, | ||
const std::string & | role, | ||
const std::string & | connectionString, | ||
AuthorizationData & | destination | ||
) |
Definition at line 301 of file CredentialStore.cc.
References AUTH_ID_COL(), AUTH_KEY_COL(), C_ID_COL(), COND_AUTHORIZATION_TABLE(), cond::AuthorizationData::connectionId, newFWLiteAna::found, cond::AuthorizationData::id, cond::AuthorizationData::key, P_ID_COL(), o2o::query, ROLE_COL(), and SCHEMA_COL().
Referenced by cond::CredentialStore::setPermission().
{ std::auto_ptr<coral::IQuery> query(schema.tableHandle(COND_AUTHORIZATION_TABLE).newQuery()); coral::AttributeList readBuff; readBuff.extend<int>(AUTH_ID_COL); readBuff.extend<int>(C_ID_COL); readBuff.extend<std::string>(AUTH_KEY_COL); coral::AttributeList whereData; whereData.extend<int>(P_ID_COL); whereData.extend<std::string>(ROLE_COL); whereData.extend<std::string>(SCHEMA_COL); whereData[ P_ID_COL ].data<int>() = principalId; whereData[ ROLE_COL ].data<std::string>() = role; whereData[ SCHEMA_COL ].data<std::string>() = connectionString; std::stringstream whereClause; whereClause << P_ID_COL << " = :"<<P_ID_COL; whereClause << " AND " << ROLE_COL << " = :"<<ROLE_COL; whereClause << " AND " << SCHEMA_COL << " = :"<<SCHEMA_COL; query->defineOutput(readBuff); query->addToOutputList( AUTH_ID_COL ); query->addToOutputList( C_ID_COL ); query->addToOutputList( AUTH_KEY_COL ); query->setCondition( whereClause.str(), whereData ); coral::ICursor& cursor = query->execute(); bool found = false; if ( cursor.next() ) { const coral::AttributeList& row = cursor.currentRow(); destination.id = row[AUTH_ID_COL].data<int>(); destination.connectionId = row[C_ID_COL].data<int>(); destination.key = row[AUTH_KEY_COL].data<std::string>(); found = true; } return found; }
bool cond::selectConnection | ( | coral::ISchema & | schema, |
const std::string & | connectionLabel, | ||
CredentialData & | destination | ||
) |
Definition at line 257 of file CredentialStore.cc.
References COND_CREDENTIAL_TABLE(), CONNECTION_ID_COL(), CONNECTION_KEY_COL(), CONNECTION_LABEL_COL(), cond::CredentialData::connectionKey, newFWLiteAna::found, cond::CredentialData::id, cond::CredentialData::password, PASSWORD_COL(), o2o::query, cond::CredentialData::userName, USERNAME_COL(), VERIFICATION_KEY_COL(), and cond::CredentialData::verificationKey.
Referenced by cond::CredentialStore::removeConnection(), cond::CredentialStore::setPermission(), cond::CredentialStore::updateConnection(), and cond::CredentialStore::updatePrincipal().
{ std::auto_ptr<coral::IQuery> query(schema.tableHandle(COND_CREDENTIAL_TABLE).newQuery()); coral::AttributeList readBuff; readBuff.extend<int>( CONNECTION_ID_COL ); readBuff.extend<std::string>( USERNAME_COL ); readBuff.extend<std::string>( PASSWORD_COL ); readBuff.extend<std::string>( VERIFICATION_KEY_COL ); readBuff.extend<std::string>( CONNECTION_KEY_COL ); coral::AttributeList whereData; whereData.extend<std::string>( CONNECTION_LABEL_COL ); whereData[ CONNECTION_LABEL_COL ].data<std::string>() = connectionLabel; std::string whereClause = CONNECTION_LABEL_COL + " = :" + CONNECTION_LABEL_COL; query->defineOutput(readBuff); query->addToOutputList( CONNECTION_ID_COL ); query->addToOutputList( USERNAME_COL ); query->addToOutputList( PASSWORD_COL ); query->addToOutputList( VERIFICATION_KEY_COL ); query->addToOutputList( CONNECTION_KEY_COL ); query->setCondition( whereClause, whereData ); coral::ICursor& cursor = query->execute(); bool found = false; if ( cursor.next() ) { const coral::AttributeList& row = cursor.currentRow(); destination.id = row[ CONNECTION_ID_COL].data<int>(); destination.userName = row[ USERNAME_COL].data<std::string>(); destination.password = row[ PASSWORD_COL].data<std::string>(); destination.verificationKey = row[ VERIFICATION_KEY_COL].data<std::string>(); destination.connectionKey = row[ CONNECTION_KEY_COL].data<std::string>(); found = true; } return found; }
bool cond::selectPrincipal | ( | coral::ISchema & | schema, |
const std::string & | principal, | ||
PrincipalData & | destination | ||
) |
Definition at line 213 of file CredentialStore.cc.
References ADMIN_KEY_COL(), cond::PrincipalData::adminKey, COND_AUTHENTICATION_TABLE(), newFWLiteAna::found, cond::PrincipalData::id, PRINCIPAL_ID_COL(), PRINCIPAL_KEY_COL(), PRINCIPAL_NAME_COL(), cond::PrincipalData::principalKey, o2o::query, VERIFICATION_COL(), and cond::PrincipalData::verifKey.
Referenced by cond::CredentialStore::importForPrincipal(), cond::CredentialStore::installAdmin(), cond::CredentialStore::removePrincipal(), cond::CredentialStore::setPermission(), cond::CredentialStore::startSession(), cond::CredentialStore::unsetPermission(), and cond::CredentialStore::updatePrincipal().
{ std::auto_ptr<coral::IQuery> query(schema.tableHandle(COND_AUTHENTICATION_TABLE).newQuery()); coral::AttributeList readBuff; readBuff.extend<int>(PRINCIPAL_ID_COL); readBuff.extend<std::string>(VERIFICATION_COL); readBuff.extend<std::string>(PRINCIPAL_KEY_COL); readBuff.extend<std::string>(ADMIN_KEY_COL); coral::AttributeList whereData; whereData.extend<std::string>(PRINCIPAL_NAME_COL); whereData[ PRINCIPAL_NAME_COL ].data<std::string>() = principal; std::string whereClause = PRINCIPAL_NAME_COL + " = :" + PRINCIPAL_NAME_COL; query->defineOutput(readBuff); query->addToOutputList( PRINCIPAL_ID_COL ); query->addToOutputList( VERIFICATION_COL ); query->addToOutputList( PRINCIPAL_KEY_COL ); query->addToOutputList( ADMIN_KEY_COL ); query->setCondition( whereClause, whereData ); coral::ICursor& cursor = query->execute(); bool found = false; if ( cursor.next() ) { found = true; const coral::AttributeList& row = cursor.currentRow(); destination.id = row[ PRINCIPAL_ID_COL ].data<int>(); destination.verifKey = row[ VERIFICATION_COL ].data<std::string>(); destination.principalKey = row[ PRINCIPAL_KEY_COL ].data<std::string>(); destination.adminKey = row[ ADMIN_KEY_COL ].data<std::string>(); } return found; }
void cond::setErr | ( | unsigned int const & | statusCode, |
std::vector< std::pair< std::string, unsigned int > > & | vTotalWithErr | ||
) |
Definition at line 199 of file EcalChannelStatusPyWrapper.cc.
References bits.
Referenced by getTotalErrors().
{ unsigned int bits_1to5, bits, mask; mask = 0x1F;//get first 5 bits; bits_1to5 = mask & statusCode; if ((bits_1to5 > 0) &&( bits_1to5 < 15)){ vTotalWithErr[bits_1to5].second += 1; } bits = 6; mask = 1 << bits; if (statusCode & mask) //case 15 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 16 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 17 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 18 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 19 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 20 vTotalWithErr[bits + 11].second += 1; mask = 1 << ++bits; if (statusCode & mask)//case 21 vTotalWithErr[bits + 11].second += 1; }
std::string cond::StCodeToStr | ( | unsigned int const & | statusCode | ) |
Definition at line 139 of file EcalChannelStatusPyWrapper.cc.
References bits.
{ unsigned int bits_1to5, bits, mask; mask = 0x1F;//get first 5 bits; bits_1to5 = mask & statusCode; std::stringstream ss; switch(bits_1to5){ case 0: break; case 1: ss<< "["<< bits_1to5 << "]:" << "DAC settings problem, pedestal not in the design range, " << "Reco Action: standard reco."; break; case 2: ss<< "["<< bits_1to5 << "]:" << "channel with no laser, ok elsewhere; " << "Reco Action: standard reco."; break; case 3: ss<< "["<< bits_1to5 << "]:" << "noisy; " << "Reco Action: standard reco."; break; case 4: ss<< "["<< bits_1to5 << "]:" << "very noisy; " << "Reco Action: special reco (to be decided)."; break; case 5: ss<< "["<< bits_1to5 << "]: reserved for more categories of noisy channels."; break; case 6: ss<< "["<< bits_1to5 << "]: reserved for more categories of noisy channels."; break; case 7: ss<< "["<< bits_1to5 << "]: reserved for more categories of noisy channels."; break; case 8: ss<< "["<< bits_1to5 << "]:" << " channel at fixed gain 6 (or 6 and 1); " << "Reco Action: 3+5 or 3+1, special reco."; break; case 9: ss<< "["<< bits_1to5 << "]:" << " channel at fixed gain 1; " << "Reco Action: 3+5 or 3+1, special reco."; break; case 10: ss<< "["<< bits_1to5 << "]:" << " channel at fixed gain 0 (dead of type this); " << "Reco Action: recovery from neighbours."; break; case 11: ss<< "["<< bits_1to5 << "]:" << " non responding isolated channel (dead of type other); " << "Reco Action: recovery from neighbours."; break; case 12: ss<< "["<< bits_1to5 << "]:" << " channel and one or more neigbors not responding (e.g.: in a dead VFE 5x1 channel) " << "Reco Action: no recovery."; break; case 13: ss<< "["<< bits_1to5 << "]:" << " channel in TT with no data link, TP data ok; " << "Reco Action: recovery from TP data."; break; case 14: ss<< "["<< bits_1to5 << "]:" << " channel in TT with no data link and no TP data; " << "Reco Action: none."; break; default: ss<< "no such bits can be set!"; } bits = 6; mask = 1 << bits; if (statusCode & mask) //case 15 ss << " bit["<< bits << "]:" << " HV good/not good;"; mask = 1 << ++bits; if (statusCode & mask)//case 16 ss << " bit["<< bits << "]:" << " LV on/off;"; mask = 1 << ++bits; if (statusCode & mask)//case 17 ss << " bit["<< bits << "]:" << " DAQ in/out;"; mask = 1 << ++bits; if (statusCode & mask)//case 18 ss << " bit["<< bits << "]:" << " TP readout on/off;"; mask = 1 << ++bits; if (statusCode & mask)//case 19 ss << " bit["<< bits << "]:" << " Trigger in/out;"; mask = 1 << ++bits; if (statusCode & mask)//case 20 ss << " bit["<< bits << "]:" << " Temperature ok/not ok;"; mask = 1 << ++bits; if (statusCode & mask)//case 21 ss << " bit["<< bits << "]:" << " Humidity ok/not;"; //for debugging: //ss << " StatusCode: " << statusCode << " bits_1to5: " <<bits_1to5 << std::endl; ss << std::endl; return ss.str(); }
const std::string cond::tagInventoryTable | ( | "TAGINVENTORY_TABLE" | ) |
const std::string cond::tagTreeTablePrefix | ( | "TAGTREE_TABLE" | ) |
void cond::throwException | ( | std::string const & | message, |
std::string const & | methodName | ||
) |
Definition at line 17 of file Exception.cc.
References Exception.
Referenced by L1CondDBPayloadWriter::analyze(), L1CondDBIOVWriter::analyze(), cond::Cipher::b64decrypt(), cond::DecodingKey::createFromInputFile(), cond::CredentialStore::createSchema(), cond::DecodingKey::flush(), getLoginName(), cond::FrontierProxy::getRealConnectString(), cond::CredentialStore::importForPrincipal(), cond::DecodingKey::init(), cond::CredentialStore::installAdmin(), cond::PoolTokenParser::parse(), cond::CredentialStore::removeConnection(), cond::CredentialStore::removePrincipal(), cond::CredentialStore::setPermission(), cond::CredentialStore::setUpForService(), cond::CredentialStore::startSession(), cond::CredentialStore::unsetPermission(), cond::CredentialStore::updateConnection(), and cond::CredentialStore::updatePrincipal().
const Time_t cond::TIMELIMIT | ( | std::numeric_limits< Time_t >:: | max() | ) |
Referenced by CondDBESSource::setIntervalFor().
std::string const & cond::timeTypeNames | ( | int | i | ) |
Definition at line 15 of file Time.cc.
References i.
Referenced by CondDBESSource::setIntervalFor(), and cond::TimeTypeTraits< type >::specs().
{ static const std::string local[]= {"runnumber","timestamp","lumiid","hash","userid"}; return local[i]; }
std::string cond::to_string | ( | const T & | t | ) |
Definition at line 26 of file Logger.cc.
References lumiQTWidget::t.
Referenced by cond::Logger::logFailedOperationNow(), cond::Logger::logOperationNow(), popcon::EcalTPGLutGroupHandler::readFromFile(), popcon::EcalTPGWeightGroupHandler::readFromFile(), popcon::EcalTPGPedestalsHandler::readFromFile(), popcon::EcalTPGBadStripHandler::readFromFile(), popcon::EcalTPGLutIdMapHandler::readFromFile(), popcon::EcalTPGLinConstHandler::readFromFile(), popcon::EcalTPGFineGrainEBIdMapHandler::readFromFile(), popcon::EcalTPGBadXTHandler::readFromFile(), popcon::EcalTPGWeightIdMapHandler::readFromFile(), popcon::EcalTPGSpikeThresholdHandler::readFromFile(), popcon::EcalTPGPhysicsConstHandler::readFromFile(), popcon::EcalTPGFineGrainEBGroupHandler::readFromFile(), popcon::EcalTPGFineGrainTowerEEHandler::readFromFile(), popcon::EcalTPGFineGrainStripEEHandler::readFromFile(), popcon::EcalTPGBadTTHandler::readFromFile(), and popcon::EcalTPGSlidingWindowHandler::readFromFile().
{ std::stringstream ss; ss<<t; return ss.str(); }
edm::IOVSyncValue cond::toIOVSyncValue | ( | cond::Time_t | time, |
cond::TimeType | timetype, | ||
bool | startOrStop | ||
) |
Definition at line 7 of file ConvertIOVSyncValue.cc.
References edm::IOVSyncValue::invalidIOVSyncValue(), prof2calltree::l, lumiid, edm::LuminosityBlockID::luminosityBlock(), edm::EventID::maxEventNumber(), edm::LuminosityBlockID::run(), runnumber, and timestamp.
Referenced by CondDBESSource::setIntervalFor().
{ switch (timetype) { case cond::runnumber : return edm::IOVSyncValue( edm::EventID(time, startOrStop ? 0 : edm::EventID::maxEventNumber(), startOrStop ? 0 : edm::EventID::maxEventNumber()) ); case cond::lumiid : { edm::LuminosityBlockID l(time); return edm::IOVSyncValue(edm::EventID(l.run(), l.luminosityBlock(), startOrStop ? 0 : edm::EventID::maxEventNumber()) ); } case cond::timestamp : return edm::IOVSyncValue( edm::Timestamp(time)); default: return edm::IOVSyncValue::invalidIOVSyncValue(); } }
static void cond::topinit | ( | ) | [static] |
Definition at line 40 of file CondPyInterface.cc.
References edmplugin::standard::config(), edmplugin::PluginManager::configure(), and edmplugin::PluginManager::isAvailable().
Referenced by cond::FWIncantation::FWIncantation().
{ if(!edmplugin::PluginManager::isAvailable()) edmplugin::PluginManager::configure(edmplugin::standard::config()); return; }
unsigned long long cond::toUNIX | ( | int | date, |
int | time | ||
) |
Definition at line 240 of file RPCObImonPyWrapper.cc.
References cond::rpcobgas::day, min, LaserDQM_cfi::mon, and estimatePileup_makeJSON::trunc.
Referenced by cond::PayLoadInspector< DataT >::plot().
{ int yea_ = (int)date/100; int yea = 2000 + (date - yea_*100); int mon_ = (int)yea_/100; int mon = yea_ - mon_*100; int day = (int)yea_/100; int sec_ = (int)time/100; int sec = time - sec_*100; int min_ = (int)sec_/100; int min = sec_ - min_*100; int hou = (int)sec_/100; int nan = 0; coral::TimeStamp TS; TS = coral::TimeStamp(yea, mon, day, hou, min, sec, nan); long long UT = (TS.year()-1970)*31536000+static_cast<int>(trunc((TS.year()-1972)/4))*86400+ (((TS.month()-1)*31)*86400)+((TS.day()-1)*86400)+TS.hour()*3600+TS.minute()*60+TS.second(); if (TS.month() == 3) UT = UT - 3*86400; if (TS.month() == 4) UT = UT - 3*86400; if (TS.month() == 5) UT = UT - 4*86400; if (TS.month() == 6) UT = UT - 4*86400; if (TS.month() == 7) UT = UT - 5*86400; if (TS.month() == 8) UT = UT - 5*86400; if (TS.month() == 9) UT = UT - 5*86400; if (TS.month() == 10) UT = UT - 6*86400; if (TS.month() == 11) UT = UT - 6*86400; if (TS.month() == 12) UT = UT - 7*86400; return UT; }
void cond::updateIOV | ( | cond::DbSession & | dbSess, |
const boost::shared_ptr< IOVSequence > & | data, | ||
const std::string & | token | ||
) |
Definition at line 38 of file IOVEditor.cc.
References cond::DbSession::isOldSchema(), cond::DbSession::storage(), and cond::DbSession::updateObject().
Referenced by cond::IOVEditor::append(), cond::IOVEditor::bulkAppend(), cond::IOVEditor::editMetadata(), cond::IOVEditor::freeInsert(), cond::IOVImportIterator::importMoreElements(), cond::IOVEditor::insert(), cond::IOVEditor::setScope(), cond::IOVEditor::stamp(), cond::IOVEditor::truncate(), and cond::IOVEditor::updateClosure().
{ // ***** TEMPORARY FOR TRANSITION PHASE if( dbSess.isOldSchema() ){ PoolTokenWriter writer( dbSess.storage() ); data->swapOIds( writer ); } // ***** dbSess.updateObject( data.get(), token ); }
std::string cond::userInfo | ( | ) |
Definition at line 9 of file IOVInfo.cc.
References alignCSCRings::pwd, and hcal_dqm_sourceclient-file_cfg::user.
Referenced by cond::service::PoolDBOutputService::appendIOV(), cond::service::PoolDBOutputService::closeIOV(), cond::service::PoolDBOutputService::createNewIOV(), cond::AlignSplitIOV::execute(), cond::IOVImportIterator::importMoreElements(), and popcon::PopCon::write().
{ // this are really static stuff std::ostringstream user_info; char * user= ::getenv("USER"); std::vector<char> hname(1024,'\0'); char * hostname = &hname.front(); ::gethostname(hostname, 1024); char * pwd = ::getenv("PWD"); if (user) { user_info<< "USER=" << user <<";" ;} else { user_info<< "USER="<< "??;";} if (hostname[0] != '\0') {user_info<< "HOSTNAME=" << hostname <<";";} else { user_info<< "HOSTNAME="<< "??;";} if (pwd) {user_info<< "PWD=" << pwd <<";";} else {user_info<< "PWD="<< "??;";} return user_info.str(); }
std::string cond::writeToken | ( | const std::string & | containerName, |
int | oid0, | ||
int | oid1, | ||
const std::string & | className | ||
) |
Definition at line 44 of file PoolToken.cc.
References fmt_oid, runonSM::text, and writeTokenContainerFragment().
Referenced by ora::CondMetadataTable::getNamesForObject(), ora::CondMetadataTable::setObjectName(), and cond::PoolTokenWriter::write().
std::string cond::writeTokenContainerFragment | ( | const std::string & | containerName, |
const std::string & | className | ||
) |
Definition at line 55 of file PoolToken.cc.
References fmt_tech, genMD5(), ora::Guid::null(), runonSM::text, and ora::Guid::toString().
Referenced by ora::CondMetadataTable::getNamesForContainer(), and writeToken().
{ char buff[20]; std::string clguid(""); // first lookup the class guid in the dictionary Reflex::Type containerType = Reflex::Type::ByName( className ); if( containerType ){ Reflex::PropertyList props = containerType.Properties(); if( props.HasProperty("ClassID")){ clguid = props.PropertyAsString("ClassID"); } } // if not found, generate one... if( clguid.empty() ){ genMD5(className,buff); Guid* gd = reinterpret_cast<Guid*>(buff); clguid = gd->toString(); } int tech = 0xB01; char text[128]; std::string str = "[DB="+Guid::null()+"][CNT=" + containerName + "][CLID="+clguid+"]"; ::sprintf(text, fmt_tech, tech); str += text; return str; }
const char* cond::fmt_oid = "[OID=%08X-%08X]" [static] |
Definition at line 13 of file PoolToken.cc.
Referenced by parseToken(), and writeToken().
const char* cond::fmt_tech = "[TECH=%08X]" [static] |
Definition at line 12 of file PoolToken.cc.
Referenced by writeTokenContainerFragment().
const std::string cond::tagInventoryTable |
Referenced by cond::TagCollectionRetriever::getTagCollection().
const std::string cond::tagTreeTablePrefix |
Referenced by cond::TagCollectionRetriever::getTagCollection().
const unsigned int cond::TIMETYPE_LIST_MAX = 5 |
Definition at line 22 of file Time.h.
Referenced by findSpecs().
{ TimeTypeTraits<runnumber>::specs(), TimeTypeTraits<timestamp>::specs(), TimeTypeTraits<lumiid>::specs(), TimeTypeTraits<hash>::specs(), TimeTypeTraits<userid>::specs() }
Definition at line 22 of file Time.cc.
Referenced by cond::IOVEditor::append(), cond::service::PoolDBOutputService::beginOfTime(), RunRangeDependentPedeLabeler::buildRunRangeDependencyMap(), cond::IOVEditor::debugInfo(), AlignmentProducer::endOfJob(), cond::service::PoolDBOutputService::endOfTime(), cond::ExportIOVUtilities::execute(), cond::AlignSplitIOV::execute(), findSpecs(), cond::IOVEditor::freeInsert(), MillePedeAlignmentAlgorithm::initialize(), AlignmentProducer::makeNonOverlappingRunRanges(), CondDBESSource::setIntervalFor(), cond::IOVSequence::timeType(), cond::service::PoolDBOutputService::Record::timetypestr(), and cond::IOVEditor::validTime().