 |
ATLAS Offline Software
|
|
bool | openConnections (const std::string &sourcedb, const std::string &destdb, bool allowcreate) |
|
bool | openCoraCool () |
|
bool | getLockedTags () |
|
bool | procOptVector (const int argc, const char *argv[], std::vector< std::string > &folders) |
|
void | setChannelRange (const cool::IFolderPtr &sourcefl) |
|
int copyIOVs | ATLAS_NOT_THREAD_SAFE (const std::string &folder, const std::string &destfolder, const cool::IFolderPtr &sourcefl, const CoraCoolFolderPtr &sourceflc, const cool::IFolderPtr &destfl, const CoraCoolFolderPtr &destflc, const std::string &sourcetag, const std::string &desttag, const cool::ValidityKey since, const cool::ValidityKey until, bool timestamp, bool checkrefs, bool iscora, const cool::PayloadMode::Mode paymode, bool created) |
|
void | adjustIOVs (const cool::ValidityKey &since, const cool::ValidityKey &until, const cool::ValidityKey &qsince, const cool::ValidityKey &quntil, cool::ValidityKey &newsince, cool::ValidityKey &newuntil, const bool timestamp) const |
|
int | nocopyIOVs (const std::string &folder, const cool::IFolderPtr &sourcefl, const std::string &sourcetag, const cool::ValidityKey since, const cool::ValidityKey until, bool checkrefs) |
|
int | verifyIOVs (const std::string &folder, const cool::IFolderPtr &sourcefl, const CoraCoolFolderPtr &sourceflc, const cool::IFolderPtr &destfl, const CoraCoolFolderPtr &destflc, const std::string &sourcetag, const cool::ValidityKey since, const cool::ValidityKey until, const bool checkrefs, const bool iscora, const cool::PayloadMode::Mode paymode) |
|
int | rootIOVs (const std::string &folder, const cool::IFolderPtr &sourcefl, const std::string &sourcetag, const cool::ValidityKey since, const cool::ValidityKey until, const bool timestamp) |
|
std::string | rootDirs (const std::string &folder, const std::string &toproot) |
|
bool | rootAllocate (const cool::IFieldSpecification &spec, void *&sptr, char &rootID) const |
|
void | rootWrite (void *sptr, const cool::IField &field) const |
|
int | analyseIOVs (const std::string &folder, const cool::IFolderPtr &sourcefl, const std::string &sourcetag, const cool::ValidityKey since, const cool::ValidityKey until, const bool timestamp) |
|
bool | getTimeFromRun () |
|
bool | getOnlineRun () |
|
bool | getBulkRun () |
|
bool | getRunList () |
|
bool | checkChannels (const std::string &folder, const cool::IFolderPtr &sourcefl, const cool::IFolderPtr &destfl, bool newfolder) |
|
void | checkRef (const cool::IRecord &payload, const std::string &folder, const std::string &tag) |
|
int | tagParents () |
|
int | writeTagInfo () |
|
int | listPoolRefs () |
|
int resolvePoolRefs | ATLAS_NOT_THREAD_SAFE () |
|
void | filePoolRefs () |
|
Definition at line 80 of file AtlCoolCopy.cxx.
◆ CoolTagMap
◆ HiTagMap
◆ PoolMap
◆ AtlCoolCopy()
AtlCoolCopy::AtlCoolCopy |
( |
const std::string & |
sourcedb, |
|
|
const std::string & |
destdb, |
|
|
bool |
allowcreate = false |
|
) |
| |
Definition at line 300 of file AtlCoolCopy.cxx.
334 coral::IConnectionServiceConfiguration& csconfig=
m_coralsvc.configuration();
335 csconfig.disablePoolAutomaticCleanUp();
336 csconfig.setConnectionTimeOut(0);
◆ addExclude()
bool AtlCoolCopy::addExclude |
( |
const std::string & |
folder | ) |
|
Definition at line 528 of file AtlCoolCopy.cxx.
529 std::cout <<
"Adding folder to exclude list: " <<
folder << std::endl;
◆ addFolder()
bool AtlCoolCopy::addFolder |
( |
const std::string & |
folder, |
|
|
const bool |
onlyTags |
|
) |
| |
Definition at line 460 of file AtlCoolCopy.cxx.
461 std::cout <<
"Add folders in path:" <<
folder <<
" [ ";
462 const std::vector<std::string> nodelist=
m_sourceDbPtr->listAllNodes();
464 for (std::vector<std::string>::const_iterator nodeitr=nodelist.begin();
465 nodeitr!=nodelist.end();++nodeitr) {
471 nodeitr->size()>
folder.size() && nodeitr->compare(
folder.size(),1,
"/")==0)) {
474 for (std::vector<std::string>::const_iterator iexcl=
m_folderexcl.begin();
476 if (iexcl->compare(0,1,
"/")==0) {
489 std::cout << *nodeitr <<
" ";
496 const std::vector<std::string> foldersettags=
498 if (!foldersettags.empty()) {
499 for (std::vector<std::string>::const_iterator
500 itr=foldersettags.begin();itr!=foldersettags.end();++itr) {
507 cool::IFolderSetPtr sfolder=
m_sourceDbPtr->getFolderSet(*nodeitr);
508 for (std::vector<std::string>::const_iterator toptag=
m_tags.begin();
509 toptag!=
m_tags.end();++toptag) {
511 std::string rtag=sfolder->resolveTag(*toptag);
524 std::cout <<
"]" << std::endl;
◆ adjustIOVs()
void AtlCoolCopy::adjustIOVs |
( |
const cool::ValidityKey & |
since, |
|
|
const cool::ValidityKey & |
until, |
|
|
const cool::ValidityKey & |
qsince, |
|
|
const cool::ValidityKey & |
quntil, |
|
|
cool::ValidityKey & |
newsince, |
|
|
cool::ValidityKey & |
newuntil, |
|
|
const bool |
timestamp |
|
) |
| const |
|
private |
Definition at line 1290 of file AtlCoolCopy.cxx.
1313 if (newsince<qsince) newsince=qsince;
1314 if (newuntil>quntil) newuntil=quntil;
1317 if (newuntil<newsince)
throw cool::Exception(
1318 "Attempt to insert IOV with -ve length",
"AtlCoolCopy::adjustIOVs");
◆ analyseIOVs()
int AtlCoolCopy::analyseIOVs |
( |
const std::string & |
folder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const std::string & |
sourcetag, |
|
|
const cool::ValidityKey |
since, |
|
|
const cool::ValidityKey |
until, |
|
|
const bool |
timestamp |
|
) |
| |
|
private |
Definition at line 1857 of file AtlCoolCopy.cxx.
1862 std::cout <<
"Analyse tag " << sourcetag <<
" of folder " <<
folder <<
1866 std::cout <<
"Analyse time structures with tolerance of " <<
1867 m_anadelt/1.E9 <<
" seconds " << std::endl;
1872 std::cout <<
"Make directory " <<
dirname << std::endl;
1877 std::vector<cool::ChannelId>
channels=sourcefl->listChannels();
1880 long long* lastiov=
new long long[
nchan];
1881 long long* iovtotlen=
new long long[
nchan];
1882 long long* iovtotgap=
new long long[
nchan];
1883 int* iovn=
new int[
nchan];
1884 for (
unsigned int i=0;
i<
nchan;++
i) {
1890 cool::ValidityKey globsince=cool::ValidityKeyMax;
1891 cool::ValidityKey globuntil=cool::ValidityKeyMin;
1897 "IOVs per channel-name (copy of IOVSperChannel)",
1904 TH1F* h_anadelt=
nullptr;
1905 TH1F* h_chandelt=
nullptr;
1907 h_anadelt=
bookOrFindTH1F(
"IOVAlignLogDelT",
"IOV alignment log deltaT",
1911 h_chandelt=
bookOrFindTH1F(
"AlignedChanPerIOV",
"Aligned channels per IOV",
1914 std::cout <<
"Booked histograms for folder with " <<
nchan <<
" channels"
1917 using IOVTimeMap = std::map<cool::ValidityKey, int>;
1918 IOVTimeMap iov_time_map;
1923 cool::IObjectIteratorPtr sourceitr;
1925 if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1931 catch (cool::Exception&
e) {
1932 std::cout <<
"Exception thrown from analysis copy iterator setup: " <<
1933 e.what() << std::endl;
1937 std::map<cool::ChannelId,std::string>
1938 chanmap=sourcefl->listChannelsWithNames();
1941 while (sourceitr->goToNext()) {
1942 const cool::IObject& sobj=sourceitr->currentRef();
1944 cool::ChannelId ichanid=sobj.channelId();
1945 const std::string& cname=chanmap[ichanid];
1949 if (chanitr.first!=chanitr.second) {
1952 if (
ichan && !h_iovname->GetBinContent(
bin)) {
1953 h_iovname->GetXaxis()->SetBinLabel(
bin,cname.c_str());
1955 h_iovname->Fill(
ichan);
1957 cool::ValidityKey since2=sobj.since();
1958 cool::ValidityKey until2=sobj.until();
1959 if (since2<globsince) globsince=since2;
1961 if (until2!=cool::ValidityKeyMax) {
1962 if (until2>globuntil) globuntil=until2;
1963 long long len=until2-since2;
1964 h_iovlength->Fill(log10(len));
1966 iovtotlen[
ichan]+=len;
1968 if (lastiov[
ichan]<
static_cast<long long>(since2) &&
1969 lastiov[
ichan]>=0) {
1971 long long gap=since2-lastiov[
ichan];
1973 h_iovgap->Fill(log10(
gap));
1974 std::cout <<
"Gap of " <<
gap << std::endl;
1976 if (until2!=cool::ValidityKeyMax) {
1977 lastiov[
ichan]=until2;
1979 lastiov[
ichan]=since2;
1989 if (hiitr!=iov_time_map.end()) {
1991 del1=hiitr->first-since2;
1993 if (lowitr!=iov_time_map.begin()) {
1996 del2=since2-lowitr->first;
2001 if (del1<=m_anadelt && del1>-1) {
2006 if (del2<=m_anadelt && del2>-1 && (del2<del || del==-1)) {
2014 h_anadelt->Fill(log10(del));
2016 h_anadelt->Fill(0.);
2019 iov_time_map[since2]=0;
2024 std::cout <<
"ERROR :Channel " << ichanid <<
2025 " not found in channel list - ignored" << std::endl;
2029 std::cout <<
"Finished analysis with " << nobj <<
" objects" << std::endl;
2031 std::cout <<
"IOV timestamp range: " << globsince <<
" " <<
2032 timeString(globsince) <<
"to " << globuntil <<
" " <<
2035 std::cout <<
"IOV run/LB range [" << (globsince >> 32) <<
"," <<
2036 (globsince & 0
xFFFFFFFF) <<
"] to [" << (globuntil >> 32) <<
"," <<
2037 (globuntil & 0
xFFFFFFFF) <<
"]" << std::endl;
2043 "Mean IOV length per channel",
nchan,-0.5,
nchan-0.5);
2044 for (
unsigned int i=0;
i<
nchan;++
i) {
2048 occ=1.-
float(iovtotgap[
i])/
float(iovtotlen[
i]+iovtotgap[
i]);
2049 avlen=
float(iovtotlen[
i])/iovn[
i];
2051 h_iovoccchan->Fill(
i,occ);
2052 h_iovlenchan->Fill(
i,avlen);
2055 std::cout <<
"Alignment analysis: " << iov_time_map.size()
2056 <<
" seperate IOV starts (tolerance " <<
m_anadelt/1.E9 <<
2057 " seconds)" << std::endl;
2059 for (IOVTimeMap::const_iterator itr=iov_time_map.begin();
2060 itr!=iov_time_map.end();++itr) {
2061 h_chandelt->Fill(itr->second);
2065 catch (cool::Exception&
e) {
2066 std::cout <<
"Exception thrown from folder analysis reading loop: " <<
2067 e.what() << std::endl;
2072 delete [] iovtotlen;
2073 delete [] iovtotgap;
2074 delete[] iovn; iovn=
nullptr;
◆ ATLAS_NOT_THREAD_SAFE() [1/4]
int doCopy AtlCoolCopy::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
◆ ATLAS_NOT_THREAD_SAFE() [2/4]
int resolvePoolRefs AtlCoolCopy::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
private |
◆ ATLAS_NOT_THREAD_SAFE() [3/4]
int copyIOVs AtlCoolCopy::ATLAS_NOT_THREAD_SAFE |
( |
const std::string & |
folder, |
|
|
const std::string & |
destfolder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const CoraCoolFolderPtr & |
sourceflc, |
|
|
const cool::IFolderPtr & |
destfl, |
|
|
const CoraCoolFolderPtr & |
destflc, |
|
|
const std::string & |
sourcetag, |
|
|
const std::string & |
desttag, |
|
|
const cool::ValidityKey |
since, |
|
|
const cool::ValidityKey |
until, |
|
|
bool |
timestamp, |
|
|
bool |
checkrefs, |
|
|
bool |
iscora, |
|
|
const cool::PayloadMode::Mode |
paymode, |
|
|
bool |
created |
|
) |
| |
|
private |
◆ ATLAS_NOT_THREAD_SAFE() [4/4]
int copyFolder AtlCoolCopy::ATLAS_NOT_THREAD_SAFE |
( |
const std::string & |
folder, |
|
|
const std::vector< std::string > & |
taglist |
|
) |
| |
◆ bookOrFindTH1F()
TH1F * AtlCoolCopy::bookOrFindTH1F |
( |
const std::string & |
hID, |
|
|
const std::string & |
htitle, |
|
|
const int |
chan, |
|
|
const float |
xlow, |
|
|
const float |
xhigh |
|
) |
| |
|
staticprivate |
◆ channelID()
cool::ChannelId AtlCoolCopy::channelID |
( |
const cool::IFolderPtr & |
folder, |
|
|
const std::string & |
chanstring |
|
) |
| |
|
staticprivate |
Definition at line 855 of file AtlCoolCopy.cxx.
857 const char* cstr=chanstring.c_str();
860 return cool::ChannelId(strtoul(cstr,
nullptr,10));
862 cool::ChannelId
chan=0;
865 std::cout <<
"Channel name " << chanstring <<
" maps to channelID "
866 <<
chan << std::endl;
868 catch (cool::Exception&
e) {
869 std::cout <<
"ERROR: Channel name " << chanstring <<
870 " not defined in folder " << std::endl;
◆ checkChannels()
bool AtlCoolCopy::checkChannels |
( |
const std::string & |
folder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const cool::IFolderPtr & |
destfl, |
|
|
bool |
newfolder |
|
) |
| |
|
private |
Definition at line 2921 of file AtlCoolCopy.cxx.
2928 const std::map<cool::ChannelId,std::string> chanmap=
2929 sourcefl->listChannelsWithNames();
2930 if (
m_debug) std::cout <<
"Checking channels table for folder " <<
folder
2931 <<
" with " << chanmap.size() <<
" channels" << std::endl;
2935 for (std::map<cool::ChannelId,std::string>::const_iterator
2936 itr=chanmap.begin();itr!=chanmap.end();++itr) {
2938 const cool::ChannelId
chan=itr->first;
2946 const std::string& sourcename=itr->second;
2948 std::string sourcedesc=
"";
2949 if (
m_chdesc) sourcedesc=sourcefl->channelDescription(
chan);
2952 const std::string & destname=destfl->channelName(
chan);
2953 std::string destdesc=
"";
2954 if (
m_chdesc) destdesc=destfl->channelDescription(
chan);
2956 if (sourcename!=destname && !sourcename.empty()) {
2959 std::cout <<
"ERROR: Channel " <<
chan <<
" names differ: " <<
2960 sourcename <<
" " << destname << std::endl;
2963 destfl->setChannelName(
chan,sourcename);
2964 std::cout <<
"Modify channel " <<
chan <<
" name from "
2965 << destname <<
" to " << sourcename << std::endl;
2968 if (sourcedesc!=destdesc && !sourcedesc.empty()) {
2971 std::cout <<
"ERROR: Channel " <<
chan <<
" descriptions differ: "
2972 << sourcedesc <<
" " << destdesc << std::endl;
2975 std::cout <<
"Modify channel " <<
chan <<
" description from "
2976 << sourcedesc <<
" to " << destdesc << std::endl;
2977 destfl->setChannelDescription(
chan,sourcedesc);
2984 if (
m_debug) std::cout <<
"Create new channel " <<
chan <<
" name "
2985 << sourcename <<
" description" << sourcedesc << std::endl;
2986 destfl->createChannel(
chan,sourcename,sourcedesc);
2990 if (ncreate>0) std::cout <<
"Created " << ncreate <<
" new channels for "
2992 if (nmodify>0) std::cout <<
"Modified " << nmodify <<
" channel info for "
◆ checkRef()
void AtlCoolCopy::checkRef |
( |
const cool::IRecord & |
payload, |
|
|
const std::string & |
folder, |
|
|
const std::string & |
tag |
|
) |
| |
|
private |
Definition at line 2998 of file AtlCoolCopy.cxx.
3001 if (
name==
"PoolRef" ||
name==
"fileGUID") {
3002 std::string poolref;
3003 std::string addr=
payload[0].data<std::string>();
3004 if (
name==
"PoolRef") {
3005 std::string::size_type iofs1=addr.find(
"[DB=");
3006 std::string::size_type iofs2=addr.find(
']',iofs1);
3007 if (iofs1!=std::string::npos && iofs2!=std::string::npos && iofs2>iofs1) {
3008 poolref=addr.substr(iofs1+4,iofs2-iofs1-4);
3010 std::cout <<
"ERROR: Badly formed POOL object reference " <<
◆ equalRecord()
bool AtlCoolCopy::equalRecord |
( |
const cool::IRecord & |
lhs, |
|
|
const cool::IRecord & |
rhs |
|
) |
| |
|
staticprivate |
Definition at line 2509 of file AtlCoolCopy.cxx.
2513 if (lhs.size()!=rhs.size())
return false;
2514 for (
size_t i=0;
i<lhs.size();++
i) {
2516 if (lhs[
i].specification().storageType()!=
2517 rhs[
i].specification().storageType())
2520 if (lhs[
i]!=rhs[
i]) {
2523 const cool::StorageType& stype=lhs[
i].specification().storageType();
2524 if (stype==cool::StorageType::String255 ||
2525 stype==cool::StorageType::String4k ||
2526 stype==cool::StorageType::String64k ||
2527 stype==cool::StorageType::String16M) {
2529 if (lhs[
i].data<std::string>()!=rhs[
i].data<std::string>())
◆ filePoolRefs()
void AtlCoolCopy::filePoolRefs |
( |
| ) |
|
|
private |
Definition at line 3282 of file AtlCoolCopy.cxx.
3291 std::cout <<
"ErrCode GUID Count LFN PFN Folders ..." << std::endl;
3292 for (PoolMap::const_iterator ipool=
m_poolrefs.begin();
3294 if (
m_poolall || ipool->second.errcode()>0) {
3295 std::ostringstream
line;
3297 line << ipool->second.errcode() <<
" " << ipool->first <<
" " <<
3298 ipool->second.count() <<
" ";
3299 if (!ipool->second.lfn().empty()) {
3300 line << ipool->second.lfn() <<
" ";
3304 if (!ipool->second.pfn().empty()) {
3305 line << ipool->second.pfn() <<
" ";
3309 for (std::vector<std::string>::const_iterator
3310 itr=ipool->second.foldertag().begin();
3311 itr!=ipool->second.foldertag().end();++itr)
3312 line << *itr <<
" ";
3313 std::cout <<
line.str() << std::endl;
3314 chkostream <<
line.str() << std::endl;
◆ getBulkRun()
bool AtlCoolCopy::getBulkRun |
( |
| ) |
|
|
private |
Definition at line 2781 of file AtlCoolCopy.cxx.
2784 std::cout <<
"ERROR: -getonline and -getbulk cannot be used simultaneously"
2788 std::cout <<
"Call getbulk using URL" << std::endl;
2790 curl_global_init(CURL_GLOBAL_ALL);
2791 using uniqueCurl_t = std::unique_ptr<CURL,decltype(&curl_easy_cleanup)>;
2792 uniqueCurl_t curl(curl_easy_init(), curl_easy_cleanup);
2794 CURLcode
res = CURLE_OK;
2799 res = curl_easy_setopt(curl.get(), CURLOPT_URL,
url.c_str());
2800 if (
res != CURLE_OK) {
2801 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2805 res = curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1
L);
2806 if (
res != CURLE_OK) {
2807 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2815 if (
res != CURLE_OK) {
2816 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2819 res = curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &
response);
2820 if (
res != CURLE_OK) {
2821 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2825 res = curl_easy_perform(curl.get());
2826 if (
res != CURLE_OK) {
2827 std::cerr <<
"Failed to perform request: " << curl_easy_strerror(
res) <<
":" <<
url.c_str() << std::endl;
2831 std::cout <<
"Response: " << std::endl;
2832 std::cout <<
response << std::endl;
2837 int nextrun = jsonData[
"run"];
2838 long long rtime = jsonData[
"timestamp"];
2839 std::cout <<
"Next run started will be " << nextrun << std::endl;
2840 std::cout <<
"Epoch time extracted " <<
rtime << std::endl;
2847 m_runemin=(
static_cast<long long>(nextrun)) << 32;
2851 }
catch (nlohmann::json::parse_error&
e) {
2852 std::cerr <<
"Failed to parse JSON response: " <<
e.what() << std::endl;
2854 }
catch (nlohmann::json::type_error&
e) {
2855 std::cerr <<
"Failed to extract data from JSON response: " <<
e.what() << std::endl;
2858 std::cerr <<
"Failed to extract run and timestamp from JSON response: " <<
e.what() << std::endl;
2864 std::cerr <<
"Failed to initialize libcurl." << std::endl;
2868 curl_global_cleanup();
◆ getCoolHistGUID()
std::string AtlCoolCopy::getCoolHistGUID |
( |
const std::string & |
file | ) |
|
|
staticprivate |
Definition at line 3266 of file AtlCoolCopy.cxx.
3268 std::string hguid=
"";
3269 TFile* myfile=TFile::Open(
file.c_str(),
"READ");
3270 if (myfile!=
nullptr) {
3272 myfile->GetObject(
"fileGUID",oguid);
3273 if (oguid!=
nullptr) {
3274 hguid=oguid->GetString();
3275 std::cout <<
"CoolHist GUID found to be " << hguid << std::endl;
◆ getLockedTags()
bool AtlCoolCopy::getLockedTags |
( |
| ) |
|
|
private |
Definition at line 429 of file AtlCoolCopy.cxx.
432 cool::IFolderSetPtr topfolder=
m_sourceDbPtr->getFolderSet(
"/");
433 const std::vector<std::string>& toptaglist=topfolder->listTags();
434 for (std::vector<std::string>::const_iterator toptag=toptaglist.begin();
435 toptag!=toptaglist.end();++toptag) {
437 if (tstat==cool::HvsTagLock::LOCKED ||
438 tstat==cool::HvsTagLock::PARTIALLYLOCKED) {
439 std::cout <<
"Top-level tag " << *toptag <<
" will be copied" <<
441 m_tags.push_back(*toptag);
444 std::cout <<
"Total of " <<
m_tags.size() <<
" top-level tags to be copied"
◆ getOnlineRun()
bool AtlCoolCopy::getOnlineRun |
( |
| ) |
|
|
private |
Definition at line 2693 of file AtlCoolCopy.cxx.
2697 std::cout <<
"Extracting current run-number from ATLAS_RUN_NUMBER @ ATONR_ADG ... " <<
2699 curl_global_init(CURL_GLOBAL_ALL);
2700 using uniqueCurl_t = std::unique_ptr<CURL,decltype(&curl_easy_cleanup)>;
2701 uniqueCurl_t curl(curl_easy_init(), curl_easy_cleanup);
2702 CURLcode
res = CURLE_OK;
2706 res = curl_easy_setopt(curl.get(), CURLOPT_URL,
url.c_str());
2707 if (
res != CURLE_OK) {
2708 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2712 res = curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1
L);
2713 if (
res != CURLE_OK) {
2714 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2722 if (
res != CURLE_OK) {
2723 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2726 res = curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &
response);
2727 if (
res != CURLE_OK) {
2728 std::cerr <<
"Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2733 res = curl_easy_perform(curl.get());
2734 if (
res != CURLE_OK) {
2735 std::cerr <<
"Failed to perform request: " << curl_easy_strerror(
res) <<
":" <<
url.c_str() << std::endl;
2739 std::cout <<
"Response: " << std::endl;
2740 std::cout <<
response << std::endl;
2746 int runNumber = jsonData[
"resources"][0][
"runnumber"];
2748 std::cout <<
"Next run started will be " << nextrun << std::endl;
2750 std::cout <<
"Epoch time extracted " <<
rtime << std::endl;
2757 m_runemin=(
static_cast<long long>(nextrun)) << 32;
2761 }
catch (nlohmann::json::parse_error&
e) {
2762 std::cerr <<
"Failed to parse JSON response: " <<
e.what() << std::endl;
2764 }
catch (nlohmann::json::type_error&
e) {
2765 std::cerr <<
"Failed to extract data from JSON response: " <<
e.what() << std::endl;
2768 std::cerr <<
"Failed to extract run and timestamp from JSON response: " <<
e.what() << std::endl;
2774 std::cerr <<
"Failed to initialize libcurl." << std::endl;
2778 curl_global_cleanup();
◆ getRunList()
bool AtlCoolCopy::getRunList |
( |
| ) |
|
|
private |
Definition at line 2873 of file AtlCoolCopy.cxx.
2875 for (std::vector<std::string>::const_iterator itr=
m_runfile.begin();
2877 std::cout <<
"Reading allowed run numbers from file " << *itr << std::endl;
2878 FILE* p_inp=fopen(itr->c_str(),
"r");
2879 if (p_inp==
nullptr) {
2880 std::cout <<
"File not found" << std::endl;
2883 char* p_buf=
new char[999];
2884 while (!feof(p_inp)) {
2885 char* p_line=fgets(p_buf,999,p_inp);
2886 if (p_line!=
nullptr) {
2887 unsigned int run=
atoi(p_line);
2895 std::cout <<
"Read list of " <<
m_runlist.size() <<
" runs from " <<
2896 m_runfile.size() <<
" input runlist files" << std::endl;
2897 for (std::vector<unsigned int>::const_iterator itr=
m_runlist.begin();
2898 itr!=
m_runlist.end();++itr) std::cout <<
2899 "Update allowed for run " << *itr << std::endl;
◆ getTimeFromRun()
bool AtlCoolCopy::getTimeFromRun |
( |
| ) |
|
|
private |
Definition at line 2604 of file AtlCoolCopy.cxx.
2617 std::string sorfolder=
"/TDAQ/RunCtrl/SOR_Params";
2618 std::string eorfolder=
"/TDAQ/RunCtrl/EOR_Params";
2619 if (
m_timedb.find (
"CONDBR2")!=std::string::npos) {
2620 sorfolder=
"/TDAQ/RunCtrl/SOR";
2621 eorfolder=
"/TDAQ/RunCtrl/EOR";
2623 std::cout <<
"Extracting times for run range [" << (
m_runemin >> 32) <<
2625 " folder " << sorfolder << std::endl;
2627 std::cout <<
"ERROR: Run range not correctly specified" << std::endl;
2631 cool::IDatabasePtr tdaqdb;
2634 std::cout <<
"Opened database connection" << std::endl;
2637 std::cout <<
"COOL exception caught: " <<
e.what() << std::endl;
2642 cool::IFolderPtr
folder=tdaqdb->getFolder(sorfolder);
2647 while (itr->goToNext()) {
2648 const cool::IRecord&
payload=itr->currentRef().payload();
2654 std::cout <<
"ERROR: Found " << nobj <<
" SOR records" << std::endl;
2659 std::cout <<
"Exception accessing SOR information: " <<
e.what() <<
2665 cool::IFolderPtr
folder=tdaqdb->getFolder(eorfolder);
2670 while (itr->goToNext()) {
2671 const cool::IRecord&
payload=itr->currentRef().payload();
2677 std::cout <<
"ERROR: Found " << nobj <<
" EOR records" << std::endl;
2682 std::cout <<
"Exception accessing SOR information: " <<
e.what() <<
2686 tdaqdb->closeDatabase();
2687 std::cout <<
"Timestamp range set to " <<
m_timemin <<
" " <<
◆ getUpdateMode()
int AtlCoolCopy::getUpdateMode |
( |
std::string_view |
desc, |
|
|
std::string_view |
tag |
|
) |
| |
|
staticprivate |
Definition at line 2903 of file AtlCoolCopy.cxx.
2907 std::string_view modestr=
"";
2909 std::string::size_type iofs1=
desc.find(
"<updateMode>");
2910 std::string::size_type iofs2=
desc.find(
"</updateMode>");
2911 if (iofs1!=std::string::npos && iofs2!=std::string::npos && iofs2>iofs1)
2912 modestr=
desc.substr(iofs1+12,iofs2-iofs1-12);
2913 if (modestr==
"UPD1" ||
tag.find(
"UPD1")!=std::string::npos)
mode=1;
2914 if (modestr==
"UPD2" ||
tag.find(
"UPD2")!=std::string::npos)
mode=2;
2915 if (modestr==
"UPD3" ||
tag.find(
"UPD3")!=std::string::npos)
mode=3;
2916 if (modestr==
"UPD4" ||
tag.find(
"UPD4")!=std::string::npos)
mode=4;
◆ isNumeric()
bool AtlCoolCopy::isNumeric |
( |
const char * |
input | ) |
|
|
staticprivate |
Definition at line 2498 of file AtlCoolCopy.cxx.
2501 const char* cptr=
input;
2502 while (*cptr!=
'\0') {
2503 if (!isdigit(*cptr)) { isnum=
false;
break;}
◆ isOpen()
bool AtlCoolCopy::isOpen |
( |
| ) |
const |
|
inline |
◆ listPoolRefs()
int AtlCoolCopy::listPoolRefs |
( |
| ) |
|
|
private |
Definition at line 3108 of file AtlCoolCopy.cxx.
3109 std::cout <<
"Total of " <<
m_poolrefs.size() <<
" POOL files referenced"
3111 for (PoolMap::const_iterator ipool=
m_poolrefs.begin();
3113 std::cout <<
"Ref " << ipool->first <<
" (" << ipool->second.count()
3114 <<
")" << std::endl;
◆ nocopyIOVs()
int AtlCoolCopy::nocopyIOVs |
( |
const std::string & |
folder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const std::string & |
sourcetag, |
|
|
const cool::ValidityKey |
since, |
|
|
const cool::ValidityKey |
until, |
|
|
bool |
checkrefs |
|
) |
| |
|
private |
Definition at line 1321 of file AtlCoolCopy.cxx.
1326 std::cout <<
"Reading tag " << sourcetag <<
" of folder " <<
folder <<
1327 " (no copy)" << std::endl;
1330 cool::IObjectIteratorPtr sourceitr;
1331 if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1337 while (sourceitr->goToNext()) {
1338 const cool::IObject&
obj=sourceitr->currentRef();
1342 std::cout <<
"Folder scanned with " << nobj <<
" objects" << std::endl;
1345 catch (cool::Exception&
e) {
1346 std::cout <<
"Exception thrown from read loop: " <<
e.what() <<
◆ openConnections()
bool AtlCoolCopy::openConnections |
( |
const std::string & |
sourcedb, |
|
|
const std::string & |
destdb, |
|
|
bool |
allowcreate |
|
) |
| |
|
private |
Definition at line 339 of file AtlCoolCopy.cxx.
346 coral::IConnectionServiceConfiguration& csconfig=
m_coralsvc.configuration();
347 csconfig.setReplicaSortingAlgorithm(*
m_repsort);
351 std::cout <<
"Open source database: " << sourcedb << std::endl;
352 if (!
m_sourceread) std::cout <<
"... in UPDATE mode" << std::endl;
357 std::cout <<
"Cool exception caught: " <<
e.what() << std::endl;
365 std::cout <<
"Open destination ROOT file: " << destdb << std::endl;
366 p_rootfile=
new TFile(destdb.c_str(),
"RECREATE");
367 if (
p_rootfile==
nullptr) std::cout <<
"ERROR: Could not open ROOT file" <<
373 std::cout <<
"Open destination database: " << tdestdb << std::endl;
380 "Forcing recreation of destination database - deleting existing data!"
383 m_dbSvc->dropDatabase(tdestdb);
385 throw cool::DatabaseDoesNotExist(
"old database deleted");
389 std::cout <<
"COOL exception caught: " <<
e.what() << std::endl;
392 std::cout <<
"Try to create new conditions DB" << std::endl;
395 std::cout <<
"Creation succeeded" << std::endl;
397 catch (cool::Exception&
e) {
398 std::cout <<
"Creation failed" << std::endl;
◆ openCoraCool()
bool AtlCoolCopy::openCoraCool |
( |
| ) |
|
|
private |
Definition at line 409 of file AtlCoolCopy.cxx.
411 std::cout <<
"Attempt to open source CoraCool DB " <<
m_sourcedb <<
415 std::cout <<
"Opened CoraCool source DB" << std::endl;
420 std::cout <<
"Attempt to open destination CoraCool DB " <<
m_destdb <<
424 std::cout <<
"Opened CoraCool dest DB" << std::endl;
◆ procOptVector()
bool AtlCoolCopy::procOptVector |
( |
const int |
argc, |
|
|
const char * |
argv[], |
|
|
std::vector< std::string > & |
folders |
|
) |
| |
|
private |
Definition at line 2131 of file AtlCoolCopy.cxx.
2138 std::string_view par0=
argv[
ic];
2140 if (par0.compare(0,2,
"--")==0) par0=par0.substr(1);
2141 if ((par0==
"-f" || par0==
"-folder") &&
ir>1) {
2144 }
else if ((par0==
"-e" || par0==
"-exclude") &&
ir>1) {
2147 }
else if ((par0==
"-t" || par0==
"-tag") &&
ir>1) {
2150 }
else if ((par0==
"-mt" || par0==
"-magic") &&
ir>1) {
2153 }
else if ((par0==
"-of" || par0==
"-outfolder") &&
ir>1) {
2156 }
else if ((par0==
"-ot" || par0==
"-outtag") &&
ir>1) {
2159 }
else if ((par0==
"-bs" || par0==
"-buffersize") &&
ir>1) {
2162 }
else if ((par0==
"-sl" || par0==
"-seal") &&
ir>1) {
2165 }
else if ((par0==
"-rls" || par0==
"-runlumisince") &&
ir>2) {
2168 }
else if ((par0==
"-rlu" || par0==
"-runlumiuntil") &&
ir>2) {
2171 }
else if ((par0==
"-nrls" || par0==
"-newrunlumisince") &&
ir>2) {
2174 }
else if ((par0==
"-nrlu" || par0==
"-newrunlumiuntil") &&
ir>2) {
2177 }
else if ((par0==
"-srls" || par0==
"-skiprunlumisince") &&
ir>2) {
2181 }
else if ((par0==
"-srlu" || par0==
"-skiprunlumiuntil") &&
ir>2) {
2185 }
else if (par0==
"-ro" || par0==
"-root") {
2187 }
else if (par0==
"-zn" || par0==
"-zeronull") {
2189 }
else if (par0==
"-ana" || par0==
"-analyse") {
2192 m_anadelt=
static_cast<long long>(ttime);
2194 }
else if ((par0==
"-rs" || par0==
"-runsince") &&
ir>1) {
2197 }
else if ((par0==
"-ru" || par0==
"-rununtil") &&
ir>1) {
2200 }
else if ((par0==
"-r" || par0==
"-run") &&
ir>1) {
2204 }
else if ((par0==
"-ts" || par0==
"-timesince") &&
ir>1) {
2207 }
else if ((par0==
"-tu" || par0==
"-timeuntil") &&
ir>1) {
2210 }
else if ((par0==
"-nts" || par0==
"-newtimesince") &&
ir>1) {
2213 }
else if ((par0==
"-ntu" || par0==
"-newtimeuntil") &&
ir>1) {
2216 }
else if (par0==
"-c" || par0==
"-create") {
2218 }
else if ((par0==
"-ch" || par0==
"-channel") &&
ir>1) {
2221 }
else if ((par0==
"-ch1" || par0==
"-channel1") &&
ir>1) {
2224 }
else if ((par0==
"-ch2" || par0==
"-channel2") &&
ir>1) {
2227 }
else if (par0==
"-chd" || par0==
"-channeldesc") {
2230 }
else if (par0==
"-forcerecreate") {
2232 }
else if (par0==
"-d" || par0==
"-debug") {
2234 }
else if (par0==
"-a" || par0==
"-alliov") {
2236 }
else if (par0==
"-ih" || par0==
"-includehead") {
2238 }
else if (par0==
"-eh" || par0==
"-excludehead") {
2240 }
else if (par0==
"-ht" || par0==
"-headtag") {
2242 }
else if (par0==
"-uht" || par0==
"-userheadtag") {
2244 }
else if (par0==
"-v" || par0==
"-verify") {
2246 }
else if (par0==
"-nc" || par0==
"-nocopy") {
2248 }
else if (par0==
"-noc" || par0==
"-nocoracool") {
2250 }
else if (par0==
"-nch" || par0==
"-nochannel") {
2252 }
else if (par0==
"-ncr" || par0==
"-noclobroot") {
2254 }
else if (par0==
"-nd" || par0==
"-nodata") {
2256 }
else if (par0==
"-nh" || par0==
"-nohitag") {
2258 }
else if (par0==
"-hi" || par0==
"-hitag") {
2260 }
else if ((par0==
"-ec" || par0==
"-excludechannel") &&
ir>1) {
2263 }
else if (par0==
"-fs" || par0==
"-forcesingle") {
2265 }
else if (par0==
"-fm" || par0==
"-forcemulti") {
2267 }
else if (par0==
"-frl" || par0==
"-forcerunlumi") {
2269 }
else if (par0==
"-ftm" || par0==
"-forcetime") {
2271 }
else if (par0==
"-fp" || par0==
"-forcepayload") {
2273 }
else if (par0==
"-fnp" || par0==
"-forcenopayload") {
2275 }
else if (par0==
"-cr" || par0==
"-checkrefs") {
2277 }
else if (par0==
"-lp" || par0==
"-listpfn") {
2280 }
else if (par0==
"-cf" || par0==
"-checkfiles") {
2283 }
else if (par0==
"-pa" || par0==
"-poolall") {
2285 }
else if ((par0==
"-co" || par0==
"-checkoutput") &&
ir>1) {
2288 }
else if ((par0==
"-pc" || par0==
"-poolcat") &&
ir>1) {
2291 }
else if ((par0==
"-mc" || par0==
"-mergecat") &&
ir>1) {
2294 }
else if ((par0==
"-ds" || par0==
"-dataset") &&
ir>1) {
2297 }
else if (par0==
"-us" || par0==
"-updatesource") {
2299 }
else if (par0==
"-cd" || par0==
"-checkdest") {
2301 }
else if (par0==
"-tr" || par0==
"-truncate") {
2303 }
else if (par0==
"-al" || par0==
"-appendlocked") {
2305 }
else if (par0==
"-alsv" || par0==
"-appendlockedsv") {
2308 }
else if (par0==
"-rdo" || par0==
"-readoracle") {
2310 }
else if (par0==
"-skiprep" || par0==
"-sr") {
2312 }
else if (par0==
"-go" || par0==
"-getonline") {
2314 }
else if (par0==
"-onr" || par0==
"-onlinerun") {
2316 }
else if (par0==
"-gb" || par0==
"-getbulk") {
2318 }
else if (par0==
"-gt" || par0==
"-gettime") {
2320 }
else if ((par0==
"-tdb" || par0==
"-timedb") &&
ir>1) {
2323 }
else if (par0==
"-ignoremode" &&
ir>1) {
2324 std::cout <<
"Ignoremode password is " <<
argv[
ic+1] <<
":end" << std::endl;
2325 if (strcmp(
argv[
ic+1],
"BackDoor")==0) {
2328 std::cout <<
"ERROR: Incorrect password for -ignoremode" << std::endl;
2332 }
else if (par0==
"-is" || par0==
"-ignorespec") {
2334 }
else if (par0==
"-pt" || par0==
"-prunetags") {
2337 }
else if (par0==
"-lo" || par0==
"-lockedonly") {
2341 }
else if (par0==
"-cti" || par0==
"-copytaginfo") {
2343 }
else if (par0==
"-ctl" || par0==
"-copytaglock") {
2346 }
else if ((par0==
"-tl" || par0==
"-taglabel") &&
ir>1) {
2350 }
else if ((par0==
"-ag" || par0==
"-addguid") &&
ir>1) {
2353 }
else if ((par0==
"-alf" || par0==
"-addlfn") &&
ir>1) {
2356 }
else if ((par0==
"-pf" || par0==
"-parfile") &&
ir>1) {
2359 }
else if ((par0==
"-rf" || par0==
"-runfile") &&
ir>1) {
2362 }
else if ((par0==
"-ws" || par0==
"-runinfohost") &&
ir>1) {
2365 }
else if (par0==
"-h" || par0==
"-help") {
2369 std::cout <<
"Parameter error for argument: " << par0 << std::endl;
◆ rootAllocate()
bool AtlCoolCopy::rootAllocate |
( |
const cool::IFieldSpecification & |
spec, |
|
|
void *& |
sptr, |
|
|
char & |
rootID |
|
) |
| const |
|
private |
Definition at line 1715 of file AtlCoolCopy.cxx.
1717 const cool::StorageType& stype=
spec.storageType();
1720 if (stype==cool::StorageType::Bool) {
1722 sptr=
static_cast<void*
>(
new unsigned int(0));
1724 }
else if (stype==cool::StorageType::UChar) {
1725 sptr=
static_cast<void*
>(
new unsigned char(
' '));
1727 }
else if (stype==cool::StorageType::Int16) {
1728 sptr=
static_cast<void*
>(
new short(0));
1730 }
else if (stype==cool::StorageType::UInt16) {
1731 sptr=
static_cast<void*
>(
new unsigned short(0));
1733 }
else if (stype==cool::StorageType::Int32) {
1734 sptr=
static_cast<void*
>(
new int(0));
1736 }
else if (stype==cool::StorageType::UInt32) {
1737 sptr=
static_cast<void*
>(
new unsigned int(0));
1739 }
else if (stype==cool::StorageType::Int64) {
1740 sptr=
static_cast<void*
>(
new long long int(0));
1742 }
else if (stype==cool::StorageType::UInt63) {
1743 sptr=
static_cast<void*
>(
new unsigned long long int(0));
1745 }
else if (stype==cool::StorageType::Float) {
1746 sptr=
static_cast<void*
>(
new float(0.));
1748 }
else if (stype==cool::StorageType::Double) {
1749 sptr=
static_cast<void*
>(
new double(0.));
1751 }
else if (stype==cool::StorageType::String4k ||
1752 stype==cool::StorageType::String255) {
1753 sptr=
static_cast<void*
>(
new char[4100]);
1755 }
else if (stype==cool::StorageType::String64k && !
m_noclobroot) {
1756 sptr=
static_cast<void*
>(
new char[65536]);
1758 }
else if (stype==cool::StorageType::String16M && !
m_noclobroot) {
1759 sptr=
static_cast<void*
>(
new char[67108864]);
1761 }
else if (stype==cool::StorageType::Blob64k && !
m_noclobroot) {
1762 sptr=
static_cast<void*
>(
new char[65536]);
1765 std::cout <<
"rootAllocate: Unsupported storage type for attribute: " <<
1766 spec.name() << std::endl;
1768 return (sptr!=
nullptr);
◆ rootDirs()
std::string AtlCoolCopy::rootDirs |
( |
const std::string & |
folder, |
|
|
const std::string & |
toproot |
|
) |
| |
|
private |
Definition at line 1681 of file AtlCoolCopy.cxx.
1687 if (
p_rootfile->FindObject(toproot.c_str())==
nullptr) {
1689 std::cout <<
"Made top directory " << toproot << std::endl;
1694 std::string::size_type iofs1=1;
1695 std::string::size_type iofs2=1;
1697 while (iofs2!=std::string::npos) {
1698 iofs2=
folder.find(
'/',iofs1);
1699 if (iofs2==std::string::npos) {
1706 std::cout <<
"Make directory " <<
dirname << std::endl;
◆ rootIOVs()
int AtlCoolCopy::rootIOVs |
( |
const std::string & |
folder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const std::string & |
sourcetag, |
|
|
const cool::ValidityKey |
since, |
|
|
const cool::ValidityKey |
until, |
|
|
const bool |
timestamp |
|
) |
| |
|
private |
Definition at line 1550 of file AtlCoolCopy.cxx.
1555 std::cout <<
"Write tag " << sourcetag <<
" of folder " <<
folder <<
1556 " to ROOT file" << std::endl;
1559 bool timestamp2=timestamp;
1566 if (
tree==
nullptr) {
1567 std::cout <<
"Book TTree " <<
treename << std::endl;
1579 if (vermode==cool::FolderVersioning::MULTI_VERSION)
1582 const cool::IRecordSpecification&
spec=
1583 (sourcefl->folderSpecification()).payloadSpecification();
1584 unsigned int ncolumns=
spec.size();
1591 const cool::IFieldSpecification& fieldspec=
spec[
icol];
1595 tree->Branch(fieldspec.name().c_str(),
ptr,
1596 (fieldspec.name()+
"/"+rootID).c_str());
1598 <<
" of type " <<
spec[
icol].storageType().name() << std::endl;
1600 std::cout <<
"Attribute " <<
spec[
icol].name() <<
" of type " <<
1601 spec[
icol].storageType().name() <<
" will be skipped" << std::endl;
1606 std::cout <<
"TTree " <<
treename <<
" already exists" << std::endl;
1609 (sourcefl->folderSpecification()).payloadSpecification().size();
1611 std::cout <<
"ERROR in tree buffer definition: expect " <<
treename <<
1620 cool::IObjectIteratorPtr sourceitr;
1622 if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1628 catch (cool::Exception&
e) {
1629 std::cout <<
"Exception thrown from ROOT copy iterator setup: " <<
1630 e.what() << std::endl;
1635 while (sourceitr->goToNext()) {
1636 const cool::IObject& sobj=sourceitr->currentRef();
1647 if (vermode==cool::FolderVersioning::MULTI_VERSION) {
1650 std::string sourcetag2=sourcetag.substr(0,255);
1656 const cool::IRecord& record=sobj.payload();
1663 catch (cool::Exception&
e) {
1670 std::cout <<
"Written " << nobj <<
" objects to ROOT TTree with " << nex
1671 <<
" nulls/exceptions" << std::endl;
1673 catch (cool::Exception&
e) {
1674 std::cout <<
"Exception thrown from ROOT file writing loop: " <<
1675 e.what() << std::endl;
◆ rootWrite()
void AtlCoolCopy::rootWrite |
( |
void * |
sptr, |
|
|
const cool::IField & |
field |
|
) |
| const |
|
private |
Definition at line 1771 of file AtlCoolCopy.cxx.
1774 const cool::StorageType& stype=
field.storageType();
1775 if (stype==cool::StorageType::Bool) {
1777 *(
static_cast<int*
>(sptr))=0;
1779 *(
static_cast<int*
>(sptr))=(
field.data<
bool>() ? 1 : 0);
1781 }
else if (stype==cool::StorageType::UChar) {
1783 *(
static_cast<unsigned char*
>(sptr))=0;
1785 *(
static_cast<unsigned char*
>(sptr))=
field.data<
unsigned char>();
1787 }
else if (stype==cool::StorageType::Int16) {
1789 *(
static_cast<short*
>(sptr))=0;
1791 *(
static_cast<short*
>(sptr))=
field.data<
short>();
1793 }
else if (stype==cool::StorageType::UInt16) {
1795 *(
static_cast<unsigned short*
>(sptr))=0;
1797 *(
static_cast<unsigned short*
>(sptr))=
field.data<
unsigned short>();
1799 }
else if (stype==cool::StorageType::Int32) {
1801 *(
static_cast<int*
>(sptr))=0;
1803 *(
static_cast<int*
>(sptr))=
field.data<
int>();
1805 }
else if (stype==cool::StorageType::UInt32) {
1807 *(
static_cast<unsigned int*
>(sptr))=0;
1809 *(
static_cast<unsigned int*
>(sptr))=
field.data<
unsigned int>();
1811 }
else if (stype==cool::StorageType::Int64) {
1813 *(
static_cast<long long*
>(sptr))=0;
1815 *(
static_cast<long long*
>(sptr))=
field.data<
long long>();
1817 }
else if (stype==cool::StorageType::UInt63) {
1819 *(
static_cast<unsigned long long*
>(sptr))=0;
1821 *(
static_cast<unsigned long long*
>(sptr))=
field.data<
unsigned long long>();
1823 }
else if (stype==cool::StorageType::Float) {
1825 *(
static_cast<float*
>(sptr))=0.;
1827 *(
static_cast<float*
>(sptr))=
field.data<
float>();
1829 }
else if (stype==cool::StorageType::Double) {
1831 *(
static_cast<double*
>(sptr))=0.;
1833 *(
static_cast<double*
>(sptr))=
field.data<
double>();
1835 }
else if (stype==cool::StorageType::String255 ||
1836 stype==cool::StorageType::String4k ||
1837 stype==cool::StorageType::String64k ||
1838 stype==cool::StorageType::String16M) {
1840 strcpy(
static_cast<char*
>(sptr),
"NULL");
1842 strcpy(
static_cast<char*
>(sptr),
field.data<std::string>().c_str());
1844 }
else if (stype==cool::StorageType::Blob64k && !
m_noclobroot) {
1846 strcpy(
static_cast<char*
>(sptr),
"NULL");
1849 std::string blobStr((
char*)
blob.startingAddress(),
blob.size());
1850 strcpy(
static_cast<char*
>(sptr), blobStr.c_str());
1853 std::cout <<
"ERROR: Unknown storage type in rootWrite!" << std::endl;
◆ runLBVal()
cool::ValidityKey AtlCoolCopy::runLBVal |
( |
const char * |
input1, |
|
|
const char * |
input2 |
|
) |
| |
|
staticprivate |
Definition at line 2585 of file AtlCoolCopy.cxx.
2588 cool::ValidityKey
val;
2590 val=((1LL << 31)-1) << 32;
2592 val=
static_cast<long long>(atol(
input1)) << 32;
2594 if (input2[0]==
'M' || input2[0]==
'm') {
2599 if (
val>cool::ValidityKeyMax)
val=cool::ValidityKeyMax;
◆ setChannelRange()
void AtlCoolCopy::setChannelRange |
( |
const cool::IFolderPtr & |
sourcefl | ) |
|
|
private |
Definition at line 820 of file AtlCoolCopy.cxx.
828 for (
size_t i=0;
i<nChanRange;
i++) {
833 " to channel selection" << std::endl;
844 std::cout <<
"Adding channel range " <<
c1 <<
" to " <<
c2 <<
845 " to channel selection" << std::endl;
◆ setOpts()
int AtlCoolCopy::setOpts |
( |
int |
argc, |
|
|
const char * |
argv[] |
|
) |
| |
Definition at line 2378 of file AtlCoolCopy.cxx.
2380 std::vector<std::string>
folders;
2385 for (std::vector<std::string>::const_iterator
ifile=
m_parfile.begin();
2387 std::cout <<
"Reading parameters from file " << *
ifile << std::endl;
2388 FILE* p_inp=fopen(
ifile->c_str(),
"r");
2389 if (p_inp==
nullptr) {
2390 std::cout <<
"File not found" << std::endl;
2393 char* p_buf=
new char[999];
2394 while (!feof(p_inp)) {
2395 char* p_line=fgets(p_buf,999,p_inp);
2396 if (p_line!=
nullptr) {
2398 const char* fargv[99];
2400 char* p_start=
nullptr;
2401 while (*p_line!=
'\0') {
2402 if (*p_line==
' ' || *p_line==
'\n') {
2404 if (p_start!=
nullptr) {
2407 fargv[fargc]=p_start;
2413 if (p_start==
nullptr) p_start=p_line;
2425 std::cout <<
"Close file" << std::endl;
2432 std::cout <<
"Problem opening connections" << std::endl;
2446 for (std::vector<std::string>::const_iterator ifold=
folders.begin();
2466 std::cout <<
"Source run/LB range [" << (
m_runemin >> 32) <<
"," <<
2470 std::cout <<
"Source timestamp range " <<
m_timemin <<
" " <<
2474 std::cout <<
"Change o/p run/LB range [" << (
m_newrunemin >> 32) <<
"," <<
2478 std::cout <<
"Change o/p timestamp range " <<
m_newtimemin <<
" " <<
2482 std::cout <<
"Skip IOVs extending outside run/LB range [" <<
2488 for (std::vector<cool::ChannelId>::const_iterator itr=
2490 std::cout <<
"Channel " << *itr <<
" will be excluded" << std::endl;
2492 if (
m_hitag) std::cout <<
"All hierarchical tags connecting to referenced tags will be copied" << std::endl;
2493 if (
m_nohitag) std::cout <<
"Hierarchical tag relations will not be copied"
◆ setupCatalog()
Definition at line 3319 of file AtlCoolCopy.cxx.
3324 for (std::vector<std::string>::const_iterator icat=catvec.begin();
3325 icat!=catvec.end();++icat) {
3326 std::cout <<
"Add catalogue: " << *icat << std::endl;
3328 if (icat->find(
':')==std::string::npos) {
3339 std::cout <<
"Could not setup POOL catalogues, exception:" <<
e.what()
◆ tagParents()
int AtlCoolCopy::tagParents |
( |
| ) |
|
|
private |
Definition at line 3035 of file AtlCoolCopy.cxx.
3036 std::cout <<
"Copying additional hierarchical tags of parent folders"
3044 cool::IFolderSetPtr sourcefl=
m_sourceDbPtr->getFolderSet(folderset);
3045 cool::IFolderSetPtr destfl=
m_destDbPtr->getFolderSet(folderset);
3046 std::cout <<
"Processing folderset " << folderset << std::endl;
3047 for (HiTagMap::const_iterator imap=
m_hitagmap.begin();
3051 std::string sourcetag=sourcefl->findTagRelation(imap->first);
3052 std::cout <<
"Create hierarchical tag between " << sourcetag <<
3053 " and " << imap->first <<
" in folder " << imap->second <<
3057 std::string etag=destfl->resolveTag(imap->first);
3058 if (etag==sourcetag) {
3059 std::cout <<
"This relation has already been created" << std::endl;
3061 std::cout <<
"ERROR: Tag in parent already related to " <<
3066 catch (cool::Exception&
e ) {
3069 destfl->createTagRelation(imap->first,sourcetag);
3075 m_cooltagmap.insert(CoolTagMap::value_type(imap->first,
3077 imap->first,imap->first)));
3079 catch (cool::Exception&
e) {
3080 std::cout <<
"Cool exception " <<
e.what() <<
3081 "thrown in hierarchical tag creation" << std::endl;
3087 catch (cool::Exception&
e) { }
3090 std::cout <<
"ERROR Folderset " << folderset <<
" not found" <<
◆ timeString()
std::string AtlCoolCopy::timeString |
( |
const cool::ValidityKey |
iovtime | ) |
|
|
staticprivate |
Definition at line 2572 of file AtlCoolCopy.cxx.
2573 if (iovtime==cool::ValidityKeyMin) {
2574 return "ValidityKeyMin ";
2575 }
else if (iovtime==cool::ValidityKeyMax) {
2576 return "ValidityKeyMax ";
2578 time_t
time=
static_cast<time_t
>(iovtime/1E9);
2581 return "UTC "+std::string(asctime_r(gmtime_r(&
time, &
result), buf));
◆ timeVal()
cool::ValidityKey AtlCoolCopy::timeVal |
( |
const char * |
input | ) |
|
|
staticprivate |
Definition at line 2541 of file AtlCoolCopy.cxx.
2547 return static_cast<long long>(atol(
input))*
2548 static_cast<long long>(1.E9);
2550 struct tm mytm{},mytm2{};
2558 cool::ValidityKey itime=
static_cast<cool::ValidityKey
>(mktime(&mytm));
2559 strptime(
"1970-01-02:00:00:00",
"%Y-%m-%d:%T",&mytm2);
2560 cool::ValidityKey caltime=
static_cast<cool::ValidityKey
>(mktime(&mytm2));
2561 itime+=24*60*60-caltime;
2562 return itime*
static_cast<cool::ValidityKey
>(1.E9);
2565 "ERROR in format of time value, use e.g. 2007-05-25:14:01:00" <<
◆ transConn()
std::string AtlCoolCopy::transConn |
( |
const std::string & |
inconn | ) |
|
|
staticprivate |
Definition at line 449 of file AtlCoolCopy.cxx.
452 if (inconn.find(
'/')==std::string::npos) {
453 return "sqlite://X;schema=mycool.db;dbname="+inconn;
◆ verifyIOVs()
int AtlCoolCopy::verifyIOVs |
( |
const std::string & |
folder, |
|
|
const cool::IFolderPtr & |
sourcefl, |
|
|
const CoraCoolFolderPtr & |
sourceflc, |
|
|
const cool::IFolderPtr & |
destfl, |
|
|
const CoraCoolFolderPtr & |
destflc, |
|
|
const std::string & |
sourcetag, |
|
|
const cool::ValidityKey |
since, |
|
|
const cool::ValidityKey |
until, |
|
|
const bool |
checkrefs, |
|
|
const bool |
iscora, |
|
|
const cool::PayloadMode::Mode |
paymode |
|
) |
| |
|
private |
Definition at line 1355 of file AtlCoolCopy.cxx.
1363 std::cout <<
"Verifying tag " << sourcetag <<
" of folder " <<
folder <<
1365 destfl->setPrefetchAll(
false);
1368 cool::IObjectIteratorPtr sourceitr,destitr;
1370 std::string
tag=sourcetag;
1371 if (vermode==cool::FolderVersioning::SINGLE_VERSION || sourcetag==
"HEAD")
1375 sourceflc->setPrefetchAll(
false);
1384 std::cout <<
"Exception thrown from verify iterator setup: " <<
e.what() <<
1393 const std::string& cfkey=sourceflc->coralFKey();
1394 const std::string& cpkey=sourceflc->coralPKey();
1395 while (csourceitr->hasNext()) {
1404 if (cdestitr->hasNext()) {
1409 if (sobj->since()!=dobj->since() || sobj->until()!=dobj->until())
1412 if (sobj->channelId()!=dobj->channelId())
1415 if (sobj->size()!=dobj->size()) {
1416 std::cout <<
"ERROR CoraCool object " << nobj <<
1417 " sizes do not match: " << sobj->size() <<
" " << dobj->size()
1424 sitr!=sobj->end();++sitr,++ditr) {
1426 for (coral::AttributeList::const_iterator aitr=sitr->begin();
1427 aitr!=sitr->end();++aitr) {
1428 const std::string&
aname=aitr->specification().name();
1431 if (*aitr!=(*ditr)[
aname]) {
1432 std::cout <<
"ERROR Values of attriute " <<
aname <<
1433 " differ" << std::endl;
1437 catch (coral::AttributeListException&
e) {
1438 std::cout <<
"ERROR: CoraCool attribute " <<
aname <<
1439 " not found in destination!" << std::endl;
1446 std::cout <<
"ERROR database entries do not match: since: " <<
1447 sobj->since() <<
"," << dobj->since() <<
" until: " <<
1448 sobj->until() <<
"," << dobj->until() <<
" channel: " <<
1449 sobj->channelId() <<
"," << dobj->channelId() << std::endl;
1454 "ERROR destination folder no matching CoraCool iterator for object "
1455 << nobj << std::endl;
1461 while (sourceitr->goToNext()) {
1462 const cool::IObject& sobj=sourceitr->currentRef();
1471 if (destitr->goToNext()) {
1472 const cool::IObject& dobj=destitr->currentRef();
1476 if (sobj.since()!=dobj.since() || sobj.until()!=dobj.until())
1479 if (sobj.channelId()!=dobj.channelId())
1484 if (paymode==cool::PayloadMode::VECTORPAYLOAD) {
1485 cool::IRecordIterator& spitr=sobj.payloadIterator();
1486 const cool::IRecordVectorPtr svptr=spitr.fetchAllAsVector();
1487 cool::IRecordIterator& dpitr=dobj.payloadIterator();
1488 const cool::IRecordVectorPtr dvptr=dpitr.fetchAllAsVector();
1489 if (svptr->size()!=dvptr->size()) {
1494 cool::IRecordVector::const_iterator svitr=svptr->begin();
1495 cool::IRecordVector::const_iterator svend=svptr->end();
1496 cool::IRecordVector::const_iterator dvitr=dvptr->begin();
1497 for (;svitr!=svend;++svitr,++dvitr) {
1502 std::cout <<
"ERROR vector payloads do not match (size " << svptr->size() <<
"," << dvptr->size() <<
")" << std::endl;
1507 if (!
equalRecord(sobj.payload(),dobj.payload())) iret=102;
1511 std::cout <<
"ERROR database entries do not match: since: " <<
1512 sobj.since() <<
"," << dobj.since() <<
" until: " <<
1513 sobj.until() <<
"," << dobj.until() <<
" channel: " <<
1514 sobj.channelId() <<
"," << dobj.channelId() << std::endl;
1515 std::cout <<
"Source payload:" << std::endl;
1516 sobj.payload().attributeList().toOutputStream(std::cout);
1517 std::cout << std::endl <<
"Destination payload:" << std::endl;
1518 dobj.payload().attributeList().toOutputStream(std::cout);
1519 std::cout << std::endl;
1524 "ERROR destination folder no matching iterator for object "
1525 << nobj << std::endl;
1532 catch (cool::Exception&
e) {
1533 std::cout <<
"Exception thrown from verify loop: " <<
e.what() <<
1543 std::cout <<
"Verification of folder " <<
folder <<
" tag " <<
1544 sourcetag <<
" OK (" << nobj <<
" objects)" << std::endl;
◆ writeTagInfo()
int AtlCoolCopy::writeTagInfo |
( |
| ) |
|
|
private |
Definition at line 3097 of file AtlCoolCopy.cxx.
3098 std::cout <<
"Write tag description ";
3100 std::cout <<
"for " <<
m_cooltagmap.size() <<
" tags" << std::endl;
3101 for (CoolTagMap::const_iterator itr=
m_cooltagmap.begin();
◆ m_addguid
std::vector<std::string> AtlCoolCopy::m_addguid |
|
private |
◆ m_addlfn
std::vector<std::string> AtlCoolCopy::m_addlfn |
|
private |
◆ m_alliov
bool AtlCoolCopy::m_alliov |
|
private |
◆ m_allowcreate
bool AtlCoolCopy::m_allowcreate |
|
private |
◆ m_anadelt
long long AtlCoolCopy::m_anadelt |
|
private |
◆ m_analyse
bool AtlCoolCopy::m_analyse |
|
private |
◆ m_applock
bool AtlCoolCopy::m_applock |
|
private |
◆ m_applocksv
bool AtlCoolCopy::m_applocksv |
|
private |
◆ m_bufsize
int AtlCoolCopy::m_bufsize |
|
private |
◆ m_channel1
std::string AtlCoolCopy::m_channel1 |
|
private |
◆ m_channel2
std::string AtlCoolCopy::m_channel2 |
|
private |
◆ m_channelRange
std::vector<std::string> AtlCoolCopy::m_channelRange |
|
private |
◆ m_chansel
cool::ChannelSelection AtlCoolCopy::m_chansel |
|
private |
◆ m_chdesc
bool AtlCoolCopy::m_chdesc |
|
private |
◆ m_checkdesttag
bool AtlCoolCopy::m_checkdesttag |
|
private |
◆ m_checkoutputfile
std::string AtlCoolCopy::m_checkoutputfile |
|
private |
◆ m_checkrefs
bool AtlCoolCopy::m_checkrefs |
|
private |
◆ m_coolapp
cool::Application AtlCoolCopy::m_coolapp |
|
private |
◆ m_cooltagmap
◆ m_copytaginfo
bool AtlCoolCopy::m_copytaginfo |
|
private |
◆ m_copytaglock
bool AtlCoolCopy::m_copytaglock |
|
private |
◆ m_coracool
bool AtlCoolCopy::m_coracool |
|
private |
◆ m_coralsvc
coral::ConnectionService AtlCoolCopy::m_coralsvc |
|
private |
◆ m_dbSvc
cool::IDatabaseSvc* AtlCoolCopy::m_dbSvc |
|
private |
◆ m_debug
bool AtlCoolCopy::m_debug |
|
private |
◆ m_destCoraPtr
◆ m_destdb
std::string AtlCoolCopy::m_destdb |
|
private |
◆ m_destDbPtr
cool::IDatabasePtr AtlCoolCopy::m_destDbPtr |
|
private |
◆ m_excludechans
std::vector<cool::ChannelId> AtlCoolCopy::m_excludechans |
|
private |
◆ m_excludehead
bool AtlCoolCopy::m_excludehead |
|
private |
◆ m_folderexcl
std::vector<std::string> AtlCoolCopy::m_folderexcl |
|
private |
◆ m_folderlist
std::vector<std::string> AtlCoolCopy::m_folderlist |
|
private |
◆ m_forcemulti
bool AtlCoolCopy::m_forcemulti |
|
private |
◆ m_forcenopay
bool AtlCoolCopy::m_forcenopay |
|
private |
◆ m_forcepay
bool AtlCoolCopy::m_forcepay |
|
private |
◆ m_forcerune
bool AtlCoolCopy::m_forcerune |
|
private |
◆ m_forcesingle
bool AtlCoolCopy::m_forcesingle |
|
private |
◆ m_forcetime
bool AtlCoolCopy::m_forcetime |
|
private |
◆ m_getbulk
bool AtlCoolCopy::m_getbulk |
|
private |
◆ m_getonline
bool AtlCoolCopy::m_getonline |
|
private |
◆ m_gettime
bool AtlCoolCopy::m_gettime |
|
private |
◆ m_hiparent
std::vector<std::string> AtlCoolCopy::m_hiparent |
|
private |
◆ m_hitag
bool AtlCoolCopy::m_hitag |
|
private |
◆ m_hitagmap
◆ m_ignoremode
bool AtlCoolCopy::m_ignoremode |
|
private |
◆ m_ignorespec
bool AtlCoolCopy::m_ignorespec |
|
private |
◆ m_includehead
bool AtlCoolCopy::m_includehead |
|
private |
◆ m_listpfn
bool AtlCoolCopy::m_listpfn |
|
private |
◆ m_lockedonly
bool AtlCoolCopy::m_lockedonly |
|
private |
◆ m_magic
std::vector<std::string> AtlCoolCopy::m_magic |
|
private |
◆ m_mergecat
std::vector<std::string> AtlCoolCopy::m_mergecat |
|
private |
◆ m_newdataset
std::string AtlCoolCopy::m_newdataset |
|
private |
◆ m_newrunemax
cool::ValidityKey AtlCoolCopy::m_newrunemax |
|
private |
◆ m_newrunemin
cool::ValidityKey AtlCoolCopy::m_newrunemin |
|
private |
◆ m_newtimemax
cool::ValidityKey AtlCoolCopy::m_newtimemax |
|
private |
◆ m_newtimemin
cool::ValidityKey AtlCoolCopy::m_newtimemin |
|
private |
◆ m_nochannel
bool AtlCoolCopy::m_nochannel |
|
private |
◆ m_noclobroot
bool AtlCoolCopy::m_noclobroot |
|
private |
◆ m_nocopy
bool AtlCoolCopy::m_nocopy |
|
private |
◆ m_nodata
bool AtlCoolCopy::m_nodata |
|
private |
◆ m_nohitag
bool AtlCoolCopy::m_nohitag |
|
private |
◆ m_nt_bufferptr
std::vector<void*> AtlCoolCopy::m_nt_bufferptr |
|
private |
◆ m_nt_channel
UInt_t AtlCoolCopy::m_nt_channel = 0 |
|
private |
◆ m_nt_lbsince
UInt_t AtlCoolCopy::m_nt_lbsince = 0 |
|
private |
◆ m_nt_lbuntil
UInt_t AtlCoolCopy::m_nt_lbuntil = 0 |
|
private |
◆ m_nt_runsince
UInt_t AtlCoolCopy::m_nt_runsince = 0 |
|
private |
◆ m_nt_rununtil
UInt_t AtlCoolCopy::m_nt_rununtil = 0 |
|
private |
◆ m_nt_since
ULong64_t AtlCoolCopy::m_nt_since = 0 |
|
private |
◆ m_nt_tagid
char AtlCoolCopy::m_nt_tagid[256] = {0} |
|
private |
◆ m_nt_treename
std::string AtlCoolCopy::m_nt_treename |
|
private |
◆ m_nt_until
ULong64_t AtlCoolCopy::m_nt_until = 0 |
|
private |
◆ m_onlinerun
bool AtlCoolCopy::m_onlinerun |
|
private |
◆ m_open
◆ m_outfolder
std::string AtlCoolCopy::m_outfolder |
|
private |
◆ m_outtag
std::string AtlCoolCopy::m_outtag |
|
private |
◆ m_parfile
std::vector<std::string> AtlCoolCopy::m_parfile |
|
private |
◆ m_poolall
bool AtlCoolCopy::m_poolall |
|
private |
◆ m_poolcat
std::vector<std::string> AtlCoolCopy::m_poolcat |
|
private |
◆ m_poollast
PoolMap::iterator AtlCoolCopy::m_poollast |
|
private |
◆ m_poolopen
bool AtlCoolCopy::m_poolopen |
|
private |
◆ m_poolrefs
◆ m_prunetags
bool AtlCoolCopy::m_prunetags |
|
private |
◆ m_readoracle
bool AtlCoolCopy::m_readoracle |
|
private |
◆ m_recreate
bool AtlCoolCopy::m_recreate |
|
private |
◆ m_repsort
◆ m_root
◆ m_runemax
cool::ValidityKey AtlCoolCopy::m_runemax |
|
private |
◆ m_runemin
cool::ValidityKey AtlCoolCopy::m_runemin |
|
private |
◆ m_runfile
std::vector<std::string> AtlCoolCopy::m_runfile |
|
private |
◆ m_runinfohost
std::string AtlCoolCopy::m_runinfohost |
|
private |
◆ m_runlist
std::vector<unsigned int> AtlCoolCopy::m_runlist |
|
private |
◆ m_sealmsg
int AtlCoolCopy::m_sealmsg |
|
private |
◆ m_skipout
bool AtlCoolCopy::m_skipout |
|
private |
◆ m_skiprep
bool AtlCoolCopy::m_skiprep |
|
private |
◆ m_sourceCoraPtr
◆ m_sourcedb
std::string AtlCoolCopy::m_sourcedb |
|
private |
◆ m_sourceDbPtr
cool::IDatabasePtr AtlCoolCopy::m_sourceDbPtr |
|
private |
◆ m_sourceread
bool AtlCoolCopy::m_sourceread |
|
private |
◆ m_srunemax
cool::ValidityKey AtlCoolCopy::m_srunemax |
|
private |
◆ m_srunemin
cool::ValidityKey AtlCoolCopy::m_srunemin |
|
private |
◆ m_taglabel
std::string AtlCoolCopy::m_taglabel |
|
private |
◆ m_tags
std::vector<std::string> AtlCoolCopy::m_tags |
|
private |
◆ m_timedb
std::string AtlCoolCopy::m_timedb |
|
private |
◆ m_timemax
cool::ValidityKey AtlCoolCopy::m_timemax |
|
private |
◆ m_timemin
cool::ValidityKey AtlCoolCopy::m_timemin |
|
private |
◆ m_truncate
bool AtlCoolCopy::m_truncate |
|
private |
◆ m_usertags
bool AtlCoolCopy::m_usertags |
|
private |
◆ m_userupdatehead
bool AtlCoolCopy::m_userupdatehead |
|
private |
◆ m_verify
bool AtlCoolCopy::m_verify |
|
private |
◆ m_zeronull
bool AtlCoolCopy::m_zeronull |
|
private |
◆ p_rootfile
TFile* AtlCoolCopy::p_rootfile |
|
private |
The documentation for this class was generated from the following file:
JetConstituentVector::iterator iterator
static cool::ValidityKey runLBVal(const char *input1, const char *input2)
static cool::ChannelId channelID(const cool::IFolderPtr &folder, const std::string &chanstring)
void rootWrite(void *sptr, const cool::IField &field) const
std::vector< std::string > m_magic
def rtime(fn, *args, **kw)
cool::ValidityKey m_srunemax
std::string find(const std::string &s)
return a remapped string
coral::ConnectionService m_coralsvc
ReplicaSorter * m_repsort
std::string m_checkoutputfile
std::string dirname(std::string name)
std::string rootDirs(const std::string &folder, const std::string &toproot)
cool::ValidityKey m_timemax
cool::ChannelSelection m_chansel
bool openConnections(const std::string &sourcedb, const std::string &destdb, bool allowcreate)
std::vector< std::string > m_parfile
cool::IDatabaseSvc * m_dbSvc
std::set< std::string > exclude
list of directories to be excluded
cool::ValidityKey m_newrunemin
cool::ValidityKey m_srunemin
def gap(flags, cells_name, *args, **kw)
static bool equalRecord(const cool::IRecord &lhs, const cool::IRecord &rhs)
cool::ValidityKey m_newtimemax
static cool::ValidityKey timeVal(const char *input)
void checkRef(const cool::IRecord &payload, const std::string &folder, const std::string &tag)
cool::ValidityKey m_newrunemax
AttrListVec::const_iterator const_iterator
std::vector< std::string > m_channelRange
std::vector< std::string > m_poolcat
void start()
redirect to init() for Gaudi FC
std::pair< std::vector< unsigned int >, bool > res
std::vector< cool::ChannelId > m_excludechans
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
cool::Application m_coolapp
bool procOptVector(const int argc, const char *argv[], std::vector< std::string > &folders)
cool::IDatabasePtr m_sourceDbPtr
cool::ValidityKey m_runemax
std::vector< std::string > m_folderlist
std::vector< unsigned int > m_runlist
double atof(std::string_view str)
Converts a string into a double / float.
boost::shared_ptr< CoraCoolDatabase > CoraCoolDatabasePtr
CoraCoolDatabasePtr m_sourceCoraPtr
cool::ValidityKey m_timemin
cool::IDatabasePtr m_destDbPtr
std::vector< void * > m_nt_bufferptr
cool::ValidityKey m_runemin
PoolMap::iterator m_poollast
std::vector< std::string > m_tags
std::vector< std::string > m_mergecat
int ir
counter of the current depth
std::string m_runinfohost
static TH1F * bookOrFindTH1F(const std::string &hID, const std::string &htitle, const int chan, const float xlow, const float xhigh)
std::vector< std::string > m_runfile
Status
Athena specific StatusCode values.
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
def time(flags, cells_name, *args, **kw)
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
bool addFolder(const std::string &folder, const bool onlyTags)
static std::string transConn(const std::string &inconn)
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
std::string m_nt_treename
bool rootAllocate(const cool::IFieldSpecification &spec, void *&sptr, char &rootID) const
CoraCoolDatabasePtr m_destCoraPtr
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
size_t WriteCallback(void *contents, size_t size, size_t nmemb, std::string *s)
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
std::vector< std::string > m_addlfn
bool addExclude(const std::string &folder)
std::vector< std::string > m_hiparent
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
static std::string timeString(const cool::ValidityKey iovtime)
void addReadCatalog(const std::string &connect)
Add new catalog identified by name to the existing ones.
std::vector< std::string > m_folderexcl
static bool isNumeric(const char *input)
std::vector< std::string > m_addguid
cool::ValidityKey m_newtimemin