ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
AtlCoolCopy Class Reference
Collaboration diagram for AtlCoolCopy:

Public Member Functions

 AtlCoolCopy (const std::string &sourcedb, const std::string &destdb, bool allowcreate=false)
 
bool isOpen () const
 
bool addFolder (const std::string &folder, const bool onlyTags)
 
bool addExclude (const std::string &folder)
 
int copyFolder ATLAS_NOT_THREAD_SAFE (const std::string &folder, const std::vector< std::string > &taglist)
 
int doCopy ATLAS_NOT_THREAD_SAFE ()
 
int setOpts (int argc, const char *argv[])
 

Private Types

typedef std::map< std::string, PoolMapElementPoolMap
 
using HiTagMap = std::map< std::string, std::string >
 
using CoolTagMap = std::map< std::string, CoolTagInfo >
 

Private Member Functions

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 ()
 

Static Private Member Functions

static std::string transConn (const std::string &inconn)
 
static cool::ChannelId channelID (const cool::IFolderPtr &folder, const std::string &chanstring)
 
static bool isNumeric (const char *input)
 
static bool equalRecord (const cool::IRecord &lhs, const cool::IRecord &rhs)
 
static TH1F * bookOrFindTH1F (const std::string &hID, const std::string &htitle, const int chan, const float xlow, const float xhigh)
 
static cool::ValidityKey timeVal (const char *input)
 
static std::string timeString (const cool::ValidityKey iovtime)
 
static cool::ValidityKey runLBVal (const char *input1, const char *input2)
 
static int getUpdateMode (std::string_view desc, std::string_view tag)
 
static std::string getCoolHistGUID (const std::string &file)
 
static pool::IFileCatalogsetupCatalog (const std::vector< std::string > &catvec)
 

Private Attributes

std::string m_sourcedb
 
std::string m_destdb
 
bool m_allowcreate
 
bool m_recreate
 
bool m_includehead
 
bool m_excludehead
 
bool m_usertags
 
bool m_userupdatehead
 
bool m_debug
 
bool m_alliov
 
bool m_verify
 
bool m_root
 
bool m_zeronull
 
bool m_analyse
 
bool m_checkrefs
 
bool m_listpfn
 
bool m_poolopen
 
bool m_poolall
 
bool m_nocopy
 
bool m_nodata
 
bool m_nochannel
 
bool m_chdesc
 
bool m_hitag
 
bool m_nohitag
 
bool m_forcesingle
 
bool m_forcemulti
 
bool m_forcerune
 
bool m_forcetime
 
bool m_forcepay
 
bool m_forcenopay
 
bool m_sourceread
 
bool m_truncate
 
bool m_skipout
 
bool m_skiprep
 
bool m_applock
 
bool m_applocksv
 
bool m_readoracle
 
bool m_gettime
 
bool m_getonline
 
bool m_onlinerun
 
bool m_getbulk
 
bool m_prunetags
 
bool m_lockedonly
 
bool m_copytaginfo
 
bool m_copytaglock
 
bool m_coracool
 
bool m_ignoremode
 
bool m_ignorespec
 
bool m_checkdesttag
 
bool m_noclobroot
 
cool::ValidityKey m_runemin
 
cool::ValidityKey m_runemax
 
cool::ValidityKey m_timemin
 
cool::ValidityKey m_timemax
 
cool::ValidityKey m_newrunemin
 
cool::ValidityKey m_newrunemax
 
cool::ValidityKey m_newtimemin
 
cool::ValidityKey m_newtimemax
 
cool::ValidityKey m_srunemin
 
cool::ValidityKey m_srunemax
 
std::vector< std::string > m_channelRange
 
std::string m_channel1
 
std::string m_channel2
 
int m_bufsize
 
int m_sealmsg
 
long long m_anadelt
 
std::string m_outfolder
 
std::string m_outtag
 
std::string m_newdataset
 
std::string m_checkoutputfile
 
std::string m_timedb
 
std::string m_taglabel
 
std::string m_runinfohost
 
std::vector< std::string > m_addguid
 
std::vector< std::string > m_addlfn
 
std::vector< std::string > m_parfile
 
std::vector< cool::ChannelId > m_excludechans
 
std::vector< std::string > m_runfile
 
std::vector< unsigned int > m_runlist
 
coral::ConnectionService m_coralsvc
 
cool::Application m_coolapp
 
cool::IDatabaseSvc * m_dbSvc
 
ReplicaSorterm_repsort
 
cool::IDatabasePtr m_sourceDbPtr
 
cool::IDatabasePtr m_destDbPtr
 
CoraCoolDatabasePtr m_sourceCoraPtr
 
CoraCoolDatabasePtr m_destCoraPtr
 
std::vector< std::string > m_folderlist
 
std::vector< std::string > m_folderexcl
 
std::vector< std::string > m_tags
 
std::vector< std::string > m_magic
 
std::vector< std::string > m_poolcat
 
std::vector< std::string > m_mergecat
 
bool m_open
 
cool::ChannelSelection m_chansel
 
PoolMap::iterator m_poollast
 
PoolMap m_poolrefs
 
HiTagMap m_hitagmap
 
std::vector< std::string > m_hiparent
 
CoolTagMap m_cooltagmap
 
TFile * p_rootfile
 
ULong64_t m_nt_since = 0
 
ULong64_t m_nt_until = 0
 
UInt_t m_nt_runsince = 0
 
UInt_t m_nt_rununtil = 0
 
UInt_t m_nt_lbsince = 0
 
UInt_t m_nt_lbuntil = 0
 
UInt_t m_nt_channel = 0
 
char m_nt_tagid [256] = {0}
 
std::string m_nt_treename
 
std::vector< void * > m_nt_bufferptr
 

Detailed Description

Definition at line 81 of file AtlCoolCopy.cxx.

Member Typedef Documentation

◆ CoolTagMap

using AtlCoolCopy::CoolTagMap = std::map<std::string, CoolTagInfo>
private

Definition at line 279 of file AtlCoolCopy.cxx.

◆ HiTagMap

using AtlCoolCopy::HiTagMap = std::map<std::string, std::string>
private

Definition at line 273 of file AtlCoolCopy.cxx.

◆ PoolMap

typedef std::map<std::string,PoolMapElement> AtlCoolCopy::PoolMap
private

Definition at line 269 of file AtlCoolCopy.cxx.

Constructor & Destructor Documentation

◆ AtlCoolCopy()

AtlCoolCopy::AtlCoolCopy ( const std::string &  sourcedb,
const std::string &  destdb,
bool  allowcreate = false 
)

Definition at line 301 of file AtlCoolCopy.cxx.

302  :
303  m_sourcedb(sourcedb),m_destdb(destdb),m_allowcreate(allowcreate),
304  m_recreate(false),
305  m_includehead(false),m_excludehead(false),
306  m_usertags(true),m_userupdatehead(false),m_debug(false),m_alliov(false),
307  m_verify(false),m_root(false),m_zeronull(false),m_analyse(false),
308  m_checkrefs(false),m_listpfn(false),m_poolopen(false),m_poolall(false),
309  m_nocopy(false),m_nodata(false),m_nochannel(false),m_chdesc(false),
310  m_hitag(false),m_nohitag(false),m_forcesingle(false),m_forcemulti(false),
311  m_forcerune(false),m_forcetime(false),m_forcepay(false),m_forcenopay(false),
312  m_sourceread(true),m_truncate(false),m_skipout(false),m_skiprep(false),
313  m_applock(false),m_applocksv(false),
314  m_readoracle(false),m_gettime(false),m_getonline(false),m_onlinerun(false),
315  m_getbulk(false),
316  m_prunetags(false),m_lockedonly(false),m_copytaginfo(false),
317  m_copytaglock(false),m_coracool(true),m_ignoremode(false),
318  m_ignorespec(false),m_checkdesttag(false),m_noclobroot(false),
319  m_runemin(cool::ValidityKeyMin),m_runemax(cool::ValidityKeyMax),
320  m_timemin(cool::ValidityKeyMin),m_timemax(cool::ValidityKeyMax),
321  m_newrunemin(cool::ValidityKeyMin),m_newrunemax(cool::ValidityKeyMax),
322  m_newtimemin(cool::ValidityKeyMin),m_newtimemax(cool::ValidityKeyMax),
323  m_srunemin(cool::ValidityKeyMin),m_srunemax(cool::ValidityKeyMax),
324  m_channel1(""),m_channel2(""),m_bufsize(1000),m_sealmsg(5),
325  m_anadelt(-1),m_outfolder(""),m_outtag(""),m_newdataset(""),
327  m_runinfohost("http://atlas-run-info-api.web.cern.ch/api"),
329  m_dbSvc(&(m_coolapp.databaseService())),m_repsort(nullptr),
331 {
332  m_poolrefs.clear();
333  m_poollast=m_poolrefs.end();
334  // configure CORAL components
335  coral::IConnectionServiceConfiguration& csconfig=m_coralsvc.configuration();
336  csconfig.disablePoolAutomaticCleanUp();
337  csconfig.setConnectionTimeOut(0);
338 }

Member Function Documentation

◆ addExclude()

bool AtlCoolCopy::addExclude ( const std::string &  folder)

Definition at line 529 of file AtlCoolCopy.cxx.

529  {
530  std::cout << "Adding folder to exclude list: " << folder << std::endl;
531  m_folderexcl.push_back(folder);
532  return true;
533 }

◆ addFolder()

bool AtlCoolCopy::addFolder ( const std::string &  folder,
const bool  onlyTags 
)

Definition at line 461 of file AtlCoolCopy.cxx.

461  {
462  std::cout << "Add folders in path:" << folder << " [ ";
463  const std::vector<std::string> nodelist=m_sourceDbPtr->listAllNodes();
464  // find all matching leaf folders
465  for (std::vector<std::string>::const_iterator nodeitr=nodelist.begin();
466  nodeitr!=nodelist.end();++nodeitr) {
467  // match exact folder name or leading part of path
468  // for leading part matches, next char in folder name must be '/'
469  // so /CALO/SetA matches /CALO/SetA/X but not /CALO/SetAB
470  if (*nodeitr==folder || folder=="/" ||
471  (nodeitr->compare(0,folder.size(),folder)==0 &&
472  nodeitr->size()>folder.size() && nodeitr->compare(folder.size(),1,"/")==0)) {
473  // check if folder on exclude list
474  bool exclude=false;
475  for (std::vector<std::string>::const_iterator iexcl=m_folderexcl.begin();
476  iexcl!=m_folderexcl.end();++iexcl) {
477  if (iexcl->compare(0,1,"/")==0) {
478  // exclude pattern starting / matches folder path (/SCT or /SCT/DCS)
479  exclude=(exclude || nodeitr->compare(0,iexcl->size(),*iexcl)==0);
480  } else {
481  // exclude pattern without leading / matches anywhere in folder
482  exclude=(exclude || (nodeitr->find(*iexcl)!=std::string::npos));
483  }
484  }
485  // check folder exists (is a leaf folder), and not excluded
486  if (m_sourceDbPtr->existsFolder(*nodeitr) && !exclude && !onlyTags) {
487  // only add if folder not already on list
488  if (find(m_folderlist.begin(),m_folderlist.end(),*nodeitr)==
489  m_folderlist.end()) {
490  std::cout << *nodeitr << " ";
491  m_folderlist.push_back(*nodeitr);
492  }
493  }
494  // if its a folderset, check for any hierarchical tags
495  if (!m_nohitag && m_sourceDbPtr->existsFolderSet(*nodeitr) && !exclude) {
496  if (!m_prunetags) {
497  const std::vector<std::string> foldersettags=
498  m_sourceDbPtr->getFolderSet(*nodeitr)->listTags();
499  if (!foldersettags.empty()) {
500  for (std::vector<std::string>::const_iterator
501  itr=foldersettags.begin();itr!=foldersettags.end();++itr) {
502  m_hitagmap[*itr]=*nodeitr;
503  }
504  }
505  } else {
506  // only take tags in this folder which are referenced from one of
507  // the input tags (assumed to be top-level tags)
508  cool::IFolderSetPtr sfolder=m_sourceDbPtr->getFolderSet(*nodeitr);
509  for (std::vector<std::string>::const_iterator toptag=m_tags.begin();
510  toptag!=m_tags.end();++toptag) {
511  try {
512  std::string rtag=sfolder->resolveTag(*toptag);
513  m_hitagmap[rtag]=*nodeitr;
514  }
515  // catch exceptions indicating tag defines nothing here
516  // note std::exception rather than COOL exception to cover case
517  // when trying to resolve a leaf tag in the '/' folder, which
518  // throws a coral AttributeException
519  catch (std::exception& e) {}
520  }
521  }
522  }
523  }
524  }
525  std::cout << "]" << std::endl;
526  return true;
527 }

◆ 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 1291 of file AtlCoolCopy.cxx.

1297  {
1298  // set newsince/until to since/until
1299  // but doing any required truncation/adjustment
1300  newsince=since;
1301  newuntil=until;
1302  if (m_alliov) {
1303  // make IOV cover specified range
1304  if (timestamp) {
1305  newsince=m_newtimemin;
1306  newuntil=m_newtimemax;
1307  } else {
1308  newsince=m_newrunemin;
1309  newuntil=m_newrunemax;
1310  }
1311  }
1312  // check for IOV truncation to range of query
1313  if (m_truncate) {
1314  if (newsince<qsince) newsince=qsince;
1315  if (newuntil>quntil) newuntil=quntil;
1316  }
1317  // check not requesting an IOV with negative length
1318  if (newuntil<newsince) throw cool::Exception(
1319  "Attempt to insert IOV with -ve length","AtlCoolCopy::adjustIOVs");
1320 }

◆ 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 1858 of file AtlCoolCopy.cxx.

1861  {
1862  // analyse the IOV and channel structure of this folder/tag, make ROOT histos
1863  std::cout << "Analyse tag " << sourcetag << " of folder " << folder <<
1864  std::endl;
1865  bool anatime=(m_anadelt>=0);
1866  if (anatime) {
1867  std::cout << "Analyse time structures with tolerance of " <<
1868  m_anadelt/1.E9 << " seconds " << std::endl;
1869  }
1870  // create COOLANA/folder structure and create leaf directory for histograms
1871  std::string dirname=rootDirs(folder,"COOLANA");
1872  if (gDirectory->FindObject(dirname.c_str())==nullptr) {
1873  std::cout << "Make directory " << dirname << std::endl;
1874  gDirectory->mkdir(dirname.c_str());
1875  }
1876  gDirectory->cd(dirname.c_str());
1877  // get channels
1878  std::vector<cool::ChannelId> channels=sourcefl->listChannels();
1879  unsigned int nchan=channels.size();
1880  // end of last IOV seen on this channel
1881  long long* lastiov=new long long[nchan];
1882  long long* iovtotlen=new long long[nchan];
1883  long long* iovtotgap=new long long[nchan];
1884  int* iovn=new int[nchan];
1885  for (unsigned int i=0;i<nchan;++i) {
1886  lastiov[i]=-1; // no IOV seen on this channel yet
1887  iovtotlen[i]=0;
1888  iovtotgap[i]=0;
1889  iovn[i]=0;
1890  }
1891  cool::ValidityKey globsince=cool::ValidityKeyMax;
1892  cool::ValidityKey globuntil=cool::ValidityKeyMin;
1893 
1894  // book histograms - only if the objects do not already exist (previous tag)
1895  TH1F* h_iovchan=bookOrFindTH1F("IOVSperChannel","IOVs per channel",
1896  nchan,-0.5,nchan-0.5);
1897  TH1F* h_iovname=bookOrFindTH1F("IOVSperChannelName",
1898  "IOVs per channel-name (copy of IOVSperChannel)",
1899  nchan,-0.5,nchan-0.5);
1900  TH1F* h_iovlength=bookOrFindTH1F("IOVLogLength","IOV log10 length",
1901  100,0.,20.);
1902  TH1F* h_iovgap=bookOrFindTH1F("IOVLogGapLength","IOV log10 gap length",
1903  100,0.,20.);
1904  // histograms for time analysis if needed
1905  TH1F* h_anadelt=nullptr;
1906  TH1F* h_chandelt=nullptr;
1907  if (anatime) {
1908  h_anadelt=bookOrFindTH1F("IOVAlignLogDelT","IOV alignment log deltaT",
1909  100,0.,20.);
1910  // add factor 2 in number of channels, to catch those where a channel
1911  // changes many times within the m_anadelt window (i.e. noise/jitter)
1912  h_chandelt=bookOrFindTH1F("AlignedChanPerIOV","Aligned channels per IOV",
1913  nchan*2,0.5,nchan*2-0.5);
1914  }
1915  std::cout << "Booked histograms for folder with " << nchan << " channels"
1916  << std::endl;
1917  // setup storage for IOV time analysis
1918  using IOVTimeMap = std::map<cool::ValidityKey, int>;
1919  IOVTimeMap iov_time_map;
1920 
1921  // setup iterator to loop over objects
1922  int nobj=0;
1923  cool::FolderVersioning::Mode vermode=sourcefl->versioningMode();
1924  cool::IObjectIteratorPtr sourceitr;
1925  try {
1926  if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1927  sourceitr=sourcefl->browseObjects(since,until,m_chansel);
1928  } else {
1929  sourceitr=sourcefl->browseObjects(since,until,m_chansel,sourcetag);
1930  }
1931  }
1932  catch (cool::Exception& e) {
1933  std::cout << "Exception thrown from analysis copy iterator setup: " <<
1934  e.what() << std::endl;
1935  return 135;
1936  }
1937  // look up names of all the channels in one go
1938  std::map<cool::ChannelId,std::string>
1939  chanmap=sourcefl->listChannelsWithNames();
1940  // now loop over all IOVs and write them
1941  try {
1942  while (sourceitr->goToNext()) {
1943  const cool::IObject& sobj=sourceitr->currentRef();
1944  // get channel and find its index
1945  cool::ChannelId ichanid=sobj.channelId();
1946  const std::string& cname=chanmap[ichanid];
1949  std::equal_range(channels.begin(),channels.end(),ichanid);
1950  if (chanitr.first!=chanitr.second) {
1951  cool::ChannelId ichan=std::distance(channels.begin(),chanitr.first);
1952  Int_t bin=h_iovchan->Fill(ichan);
1953  if (ichan && !h_iovname->GetBinContent(bin)) {
1954  h_iovname->GetXaxis()->SetBinLabel(bin,cname.c_str());
1955  }
1956  h_iovname->Fill(ichan);
1957  // analyse IOV start/stop
1958  cool::ValidityKey since2=sobj.since();
1959  cool::ValidityKey until2=sobj.until();
1960  if (since2<globsince) globsince=since2;
1961  // dont count IOV is open-ended, so length statistics will make sense
1962  if (until2!=cool::ValidityKeyMax) {
1963  if (until2>globuntil) globuntil=until2;
1964  long long len=until2-since2;
1965  h_iovlength->Fill(log10(len));
1966  iovn[ichan]+=1;
1967  iovtotlen[ichan]+=len;
1968  }
1969  if (lastiov[ichan]<static_cast<long long>(since2) &&
1970  lastiov[ichan]>=0) {
1971  // have a gap in the IOV structure for this channel
1972  long long gap=since2-lastiov[ichan];
1973  iovtotgap[ichan]+=gap;
1974  h_iovgap->Fill(log10(gap));
1975  std::cout << "Gap of " << gap << std::endl;
1976  }
1977  if (until2!=cool::ValidityKeyMax) {
1978  lastiov[ichan]=until2;
1979  } else {
1980  lastiov[ichan]=since2;
1981  }
1982  // analyse IOV alignment
1983  if (anatime) {
1984  long long del1=-1;
1985  long long del2=-1;
1986  // find the nearest time to this one
1987  // this gives the first value exceeding since2
1988  IOVTimeMap::iterator hiitr=iov_time_map.lower_bound(since2);
1989  IOVTimeMap::iterator lowitr=hiitr;
1990  if (hiitr!=iov_time_map.end()) {
1991  // del1 is +ve time interval to next one
1992  del1=hiitr->first-since2;
1993  }
1994  if (lowitr!=iov_time_map.begin()) {
1995  // del2 is +ve time interval to previous one
1996  --lowitr;
1997  del2=since2-lowitr->first;
1998  }
1999  long long del=-1;
2000  IOVTimeMap::iterator moditr;
2001  bool domod=false;
2002  if (del1<=m_anadelt && del1>-1) {
2003  moditr=hiitr;
2004  del=del1;
2005  domod=true;
2006  }
2007  if (del2<=m_anadelt && del2>-1 && (del2<del || del==-1)) {
2008  moditr=lowitr;
2009  del=del2;
2010  domod=true;
2011  }
2012  if (domod) {
2013  ++(moditr->second);
2014  if (del>0) {
2015  h_anadelt->Fill(log10(del));
2016  } else {
2017  h_anadelt->Fill(0.);
2018  }
2019  } else {
2020  iov_time_map[since2]=0;
2021  }
2022  }
2023  } else {
2024  // channel ID not found
2025  std::cout << "ERROR :Channel " << ichanid <<
2026  " not found in channel list - ignored" << std::endl;
2027  }
2028  ++nobj;
2029  }
2030  std::cout << "Finished analysis with " << nobj << " objects" << std::endl;
2031  if (timestamp) {
2032  std::cout << "IOV timestamp range: " << globsince << " " <<
2033  timeString(globsince) << "to " << globuntil << " " <<
2034  timeString(globuntil) << std::endl;
2035  } else {
2036  std::cout << "IOV run/LB range [" << (globsince >> 32) << "," <<
2037  (globsince & 0xFFFFFFFF) << "] to [" << (globuntil >> 32) << "," <<
2038  (globuntil & 0xFFFFFFFF) << "]" << std::endl;
2039  }
2040  // calculate statistics for each channel
2041  TH1F* h_iovoccchan=bookOrFindTH1F("ChannelOcc","Channel Occupancy",
2042  nchan,-0.5,nchan-0.5);
2043  TH1F* h_iovlenchan=bookOrFindTH1F("IOVLenChan",
2044  "Mean IOV length per channel",nchan,-0.5,nchan-0.5);
2045  for (unsigned int i=0;i<nchan;++i) {
2046  float occ=0.;
2047  float avlen=0.;
2048  if (iovn[i]>0) {
2049  occ=1.-float(iovtotgap[i])/float(iovtotlen[i]+iovtotgap[i]);
2050  avlen=float(iovtotlen[i])/iovn[i];
2051  }
2052  h_iovoccchan->Fill(i,occ);
2053  h_iovlenchan->Fill(i,avlen);
2054  }
2055  if (anatime) {
2056  std::cout << "Alignment analysis: " << iov_time_map.size()
2057  << " seperate IOV starts (tolerance " << m_anadelt/1.E9 <<
2058  " seconds)" << std::endl;
2059  // fill histogram of number of channels incremented per IOV
2060  for (IOVTimeMap::const_iterator itr=iov_time_map.begin();
2061  itr!=iov_time_map.end();++itr) {
2062  h_chandelt->Fill(itr->second);
2063  }
2064  }
2065  }
2066  catch (cool::Exception& e) {
2067  std::cout << "Exception thrown from folder analysis reading loop: " <<
2068  e.what() << std::endl;
2069  return 134;
2070  }
2071  sourceitr->close();
2072  delete [] lastiov;
2073  delete [] iovtotlen;
2074  delete [] iovtotgap;
2075  delete[] iovn; iovn=nullptr;
2076  return 0;
2077 }

◆ 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

Definition at line 2079 of file AtlCoolCopy.cxx.

2081  {
2082  // check histogram does not exist in current directory
2083  // if yes, return pointer to it, else book and return pointer
2084  TObject* obj=gDirectory->FindObject(hID.c_str());
2085  if (obj==nullptr) {
2086  return new TH1F(hID.c_str(),htitle.c_str(),nchan,xlow,xhigh);
2087  } else {
2088  return static_cast<TH1F*>(obj);
2089  }
2090 }

◆ channelID()

cool::ChannelId AtlCoolCopy::channelID ( const cool::IFolderPtr &  folder,
const std::string &  chanstring 
)
staticprivate

Definition at line 856 of file AtlCoolCopy.cxx.

857  {
858  const char* cstr=chanstring.c_str();
859  if (isNumeric(cstr)) {
860  // channel is a number
861  return cool::ChannelId(strtoul(cstr,nullptr,10));
862  } else {
863  cool::ChannelId chan=0;
864  try {
865  chan=folder->channelId(chanstring);
866  std::cout << "Channel name " << chanstring << " maps to channelID "
867  << chan << std::endl;
868  }
869  catch (cool::Exception& e) {
870  std::cout << "ERROR: Channel name " << chanstring <<
871  " not defined in folder " << std::endl;
872  }
873  return chan;
874  }
875 }

◆ checkChannels()

bool AtlCoolCopy::checkChannels ( const std::string &  folder,
const cool::IFolderPtr &  sourcefl,
const cool::IFolderPtr &  destfl,
bool  newfolder 
)
private

Definition at line 2922 of file AtlCoolCopy.cxx.

2924  {
2925  // Channel manipulation is slow due to lack of bulk API for creating them
2926  // this routine therefore does the minimum work, not checking destination
2927  // if folder is newly created, and not copying description unless requested
2928  // get map of all channels
2929  const std::map<cool::ChannelId,std::string> chanmap=
2930  sourcefl->listChannelsWithNames();
2931  if (m_debug) std::cout << "Checking channels table for folder " << folder
2932  << " with " << chanmap.size() << " channels" << std::endl;
2933  int ncreate=0;
2934  int nmodify=0;
2935  // iterate over all channels
2936  for (std::map<cool::ChannelId,std::string>::const_iterator
2937  itr=chanmap.begin();itr!=chanmap.end();++itr) {
2938  // assume now ALL channels are in channels table (COOL 2.4 and above)
2939  const cool::ChannelId chan=itr->first;
2940  // check if channel should be skipped
2941  if (!m_excludechans.empty()) {
2942  if (find(m_excludechans.begin(),m_excludechans.end(),
2943  chan)!=m_excludechans.end()) continue;
2944  }
2945  if (!m_chansel.inSelection(chan)) continue;
2946 
2947  const std::string& sourcename=itr->second;
2948  // only look up channel description if we are copying it
2949  std::string sourcedesc="";
2950  if (m_chdesc) sourcedesc=sourcefl->channelDescription(chan);
2951  // only check destination if folder alreay existed
2952  if (!newfolder && destfl->existsChannel(chan)) {
2953  const std::string & destname=destfl->channelName(chan);
2954  std::string destdesc="";
2955  if (m_chdesc) destdesc=destfl->channelDescription(chan);
2956  // if sourcename is not set, and destination is, dont worry
2957  if (sourcename!=destname && !sourcename.empty()) {
2958  // channel names differ - error if verifying, set if copying
2959  if (m_verify) {
2960  std::cout << "ERROR: Channel " << chan << " names differ: " <<
2961  sourcename << " " << destname << std::endl;
2962  return false;
2963  }
2964  destfl->setChannelName(chan,sourcename);
2965  std::cout << "Modify channel " << chan << " name from "
2966  << destname << " to " << sourcename << std::endl;
2967  ++nmodify;
2968  }
2969  if (sourcedesc!=destdesc && !sourcedesc.empty()) {
2970  // channel descriptions differ - error if verifying, set if copying
2971  if (m_verify) {
2972  std::cout << "ERROR: Channel " << chan << " descriptions differ: "
2973  << sourcedesc << " " << destdesc << std::endl;
2974  return false;
2975  }
2976  std::cout << "Modify channel " << chan << " description from "
2977  << sourcedesc << " to " << destdesc << std::endl;
2978  destfl->setChannelDescription(chan,sourcedesc);
2979  ++nmodify;
2980  }
2981  } else {
2982  // channel does not exist on destination - if verifying, this is error
2983  if (m_verify) return false;
2984  // otherwise create it
2985  if (m_debug) std::cout << "Create new channel " << chan << " name "
2986  << sourcename << " description" << sourcedesc << std::endl;
2987  destfl->createChannel(chan,sourcename,sourcedesc);
2988  ++ncreate;
2989  }
2990  }
2991  if (ncreate>0) std::cout << "Created " << ncreate << " new channels for "
2992  << folder << std::endl;
2993  if (nmodify>0) std::cout << "Modified " << nmodify << " channel info for "
2994  << folder << std::endl;
2995  return true;
2996 }

◆ checkRef()

void AtlCoolCopy::checkRef ( const cool::IRecord &  payload,
const std::string &  folder,
const std::string &  tag 
)
private

Definition at line 2999 of file AtlCoolCopy.cxx.

3000  {
3001  const std::string name=payload[0].name();
3002  if (name=="PoolRef" || name=="fileGUID") {
3003  std::string poolref;
3004  std::string addr=payload[0].data<std::string>();
3005  if (name=="PoolRef") {
3006  std::string::size_type iofs1=addr.find("[DB=");
3007  std::string::size_type iofs2=addr.find(']',iofs1);
3008  if (iofs1!=std::string::npos && iofs2!=std::string::npos && iofs2>iofs1) {
3009  poolref=addr.substr(iofs1+4,iofs2-iofs1-4);
3010  } else {
3011  std::cout << "ERROR: Badly formed POOL object reference " <<
3012  addr << std::endl;
3013  }
3014  } else {
3015  // for fileGUID, POOL GUID is just the string
3016  poolref=addr;
3017  }
3018  std::string foldertag=folder+":"+tag;
3019  // insert into list, first check if same as before
3020  if (m_poollast!=m_poolrefs.end() && m_poollast->first==poolref) {
3021  m_poollast->second.inccount();
3022  m_poollast->second.addfoldertag(foldertag);
3023  } else {
3024  m_poollast=m_poolrefs.find(poolref);
3025  if (m_poollast!=m_poolrefs.end()) {
3026  m_poollast->second.inccount();
3027  m_poollast->second.addfoldertag(foldertag);
3028  } else {
3029  m_poolrefs[poolref]=PoolMapElement(1,foldertag);
3030  m_poollast=m_poolrefs.find(poolref);
3031  }
3032  }
3033  }
3034 }

◆ equalRecord()

bool AtlCoolCopy::equalRecord ( const cool::IRecord &  lhs,
const cool::IRecord &  rhs 
)
staticprivate

Definition at line 2510 of file AtlCoolCopy.cxx.

2511  {
2512  // equality test for COOL IRecords, handling NULL string attributes correctly
2513  // tests values and types of Attributes, not names
2514  if (lhs.size()!=rhs.size()) return false;
2515  for (size_t i=0;i<lhs.size();++i) {
2516  // types must match - have to test explicitly first
2517  if (lhs[i].specification().storageType()!=
2518  rhs[i].specification().storageType())
2519  return false;
2520  // now use IField equality to for final test (spec again and data)
2521  if (lhs[i]!=rhs[i]) {
2522  // if not equal, check for special case of strings and compare directly
2523  // types are known to be equal so only test LHS
2524  const cool::StorageType& stype=lhs[i].specification().storageType();
2525  if (stype==cool::StorageType::String255 ||
2526  stype==cool::StorageType::String4k ||
2527  stype==cool::StorageType::String64k ||
2528  stype==cool::StorageType::String16M) {
2529  // check if string data payloads are really equal or not
2530  if (lhs[i].data<std::string>()!=rhs[i].data<std::string>())
2531  return false;
2532  } else {
2533  // if not string, trust the result of IField !=operator
2534  return false;
2535  }
2536  }
2537  }
2538  return true;
2539 }

◆ filePoolRefs()

void AtlCoolCopy::filePoolRefs ( )
private

Definition at line 3283 of file AtlCoolCopy.cxx.

3283  {
3284  // list POOL refs and error codes, optionally to file
3285  if (!m_checkoutputfile.empty()) {
3286  std::cout << "Write POOL file checkoutput on " << m_checkoutputfile <<
3287  std::endl;
3288  } else {
3289  m_checkoutputfile="/dev/null";
3290  }
3291  std::ofstream chkostream(m_checkoutputfile.c_str());
3292  std::cout << "ErrCode GUID Count LFN PFN Folders ..." << std::endl;
3293  for (PoolMap::const_iterator ipool=m_poolrefs.begin();
3294  ipool!=m_poolrefs.end();++ipool) {
3295  if (m_poolall || ipool->second.errcode()>0) {
3296  std::ostringstream line;
3297  // write error code, GUID, usage count
3298  line << ipool->second.errcode() << " " << ipool->first << " " <<
3299  ipool->second.count() << " ";
3300  if (!ipool->second.lfn().empty()) {
3301  line << ipool->second.lfn() << " ";
3302  } else {
3303  line << "noLFN ";
3304  }
3305  if (!ipool->second.pfn().empty()) {
3306  line << ipool->second.pfn() << " ";
3307  } else {
3308  line << "noPFN ";
3309  }
3310  for (std::vector<std::string>::const_iterator
3311  itr=ipool->second.foldertag().begin();
3312  itr!=ipool->second.foldertag().end();++itr)
3313  line << *itr << " ";
3314  std::cout << line.str() << std::endl;
3315  chkostream << line.str() << std::endl;
3316  }
3317  }
3318 }

◆ getBulkRun()

bool AtlCoolCopy::getBulkRun ( )
private

Definition at line 2782 of file AtlCoolCopy.cxx.

2782  {
2783  // get minimum run-number/timestamp for bulk reco update
2784  if (m_getonline) {
2785  std::cout << "ERROR: -getonline and -getbulk cannot be used simultaneously"
2786  << std::endl;
2787  return false;
2788  }
2789  std::cout << "Call getbulk using URL" << std::endl;
2790  // Initialize libcurl
2791  curl_global_init(CURL_GLOBAL_ALL);
2792  using uniqueCurl_t = std::unique_ptr<CURL,decltype(&curl_easy_cleanup)>;
2793  uniqueCurl_t curl(curl_easy_init(), curl_easy_cleanup);
2794  //CURL *curl = curl_easy_init();
2795  CURLcode res = CURLE_OK;
2796 
2797  if (curl) {
2798  std::string url = m_runinfohost + "/runs/nemop/sync";
2799  // Set the URL
2800  res = curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
2801  if (res != CURLE_OK) {
2802  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2803  return false;
2804  }
2805  // Follow HTTP redirections
2806  res = curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L);
2807  if (res != CURLE_OK) {
2808  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2809  return false;
2810  }
2811  // Response data buffer
2812  std::string response;
2813 
2814  // Set the callback function to receive response data
2815  res = curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, WriteCallback);
2816  if (res != CURLE_OK) {
2817  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2818  return false;
2819  }
2820  res = curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &response);
2821  if (res != CURLE_OK) {
2822  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2823  return false;
2824  }
2825  // Perform the request
2826  res = curl_easy_perform(curl.get());
2827  if (res != CURLE_OK) {
2828  std::cerr << "Failed to perform request: " << curl_easy_strerror(res) << ":" << url.c_str() << std::endl;
2829  return false;
2830  } else {
2831  // Print the received response
2832  std::cout << "Response: " << std::endl;
2833  std::cout << response << std::endl;
2834  try {
2835  // Split the response into two fields
2837  // Extract the run and timestamp fields
2838  int nextrun = jsonData["run"];
2839  long long rtime = jsonData["timestamp"];
2840  std::cout << "Next run started will be " << nextrun << std::endl;
2841  std::cout << "Epoch time extracted " << rtime << std::endl;
2842  if (m_alliov) {
2843  // if overwriting IOVs, set the new IOV lower limit
2844  m_newrunemin=(static_cast<long long>(nextrun)) << 32;
2845  m_newtimemin=rtime*static_cast<long long>(1E9);
2846  } else {
2847  // set the query lower limit - for use with truncate option
2848  m_runemin=(static_cast<long long>(nextrun)) << 32;
2849  m_timemin=rtime*static_cast<long long>(1E9);
2850  m_truncate=true;
2851  }
2852  } catch (nlohmann::json::parse_error& e) {
2853  std::cerr << "Failed to parse JSON response: " << e.what() << std::endl;
2854  return false;
2855  } catch (nlohmann::json::type_error& e) {
2856  std::cerr << "Failed to extract data from JSON response: " << e.what() << std::endl;
2857  return false;
2858  } catch (std::exception& e) {
2859  std::cerr << "Failed to extract run and timestamp from JSON response: " << e.what() << std::endl;
2860  return false;
2861  }
2862  }
2863  // Clean up done by unique_ptr
2864  } else {
2865  std::cerr << "Failed to initialize libcurl." << std::endl;
2866  return false;
2867  }
2868  // Cleanup libcurl
2869  curl_global_cleanup();
2870 
2871  return true;
2872 }

◆ getCoolHistGUID()

std::string AtlCoolCopy::getCoolHistGUID ( const std::string &  file)
staticprivate

Definition at line 3267 of file AtlCoolCopy.cxx.

3267  {
3268  // attempt to extract COOL Hist GUID from file
3269  std::string hguid="";
3270  TFile* myfile=TFile::Open(file.c_str(),"READ");
3271  if (myfile!=nullptr) {
3272  TObjString* oguid;
3273  myfile->GetObject("fileGUID",oguid);
3274  if (oguid!=nullptr) {
3275  hguid=oguid->GetString();
3276  std::cout << "CoolHist GUID found to be " << hguid << std::endl;
3277  }
3278  myfile->Close();
3279  }
3280  return hguid;
3281 }

◆ getLockedTags()

bool AtlCoolCopy::getLockedTags ( )
private

Definition at line 430 of file AtlCoolCopy.cxx.

430  {
431  // set m_tags to list of top level tags which are locked
432  m_tags.clear();
433  cool::IFolderSetPtr topfolder=m_sourceDbPtr->getFolderSet("/");
434  const std::vector<std::string>& toptaglist=topfolder->listTags();
435  for (std::vector<std::string>::const_iterator toptag=toptaglist.begin();
436  toptag!=toptaglist.end();++toptag) {
437  cool::HvsTagLock::Status tstat=topfolder->tagLockStatus(*toptag);
438  if (tstat==cool::HvsTagLock::LOCKED ||
439  tstat==cool::HvsTagLock::PARTIALLYLOCKED) {
440  std::cout << "Top-level tag " << *toptag << " will be copied" <<
441  std::endl;
442  m_tags.push_back(*toptag);
443  }
444  }
445  std::cout << "Total of " << m_tags.size() << " top-level tags to be copied"
446  << std::endl;
447  return (!m_tags.empty());
448 }

◆ getOnlineRun()

bool AtlCoolCopy::getOnlineRun ( )
private

Definition at line 2694 of file AtlCoolCopy.cxx.

2694  {
2695  // open using the ATLAS_COOLONL_GLOBAL schema, since we have authentication
2696  // information for this one by default
2697  // get minimum run-number/timestamp for bulk reco update
2698  std::cout << "Extracting current run-number from ATLAS_RUN_NUMBER @ ATONR_ADG ... " <<
2699  // Initialize libcurl
2700  curl_global_init(CURL_GLOBAL_ALL);
2701  using uniqueCurl_t = std::unique_ptr<CURL,decltype(&curl_easy_cleanup)>;
2702  uniqueCurl_t curl(curl_easy_init(), curl_easy_cleanup);
2703  CURLcode res = CURLE_OK;
2704  if (curl) {
2705  std::string url = m_runinfohost + "/runs?sort=runnumber:DESC&size=1";
2706  // Set the URL
2707  res = curl_easy_setopt(curl.get(), CURLOPT_URL, url.c_str());
2708  if (res != CURLE_OK) {
2709  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2710  return false;
2711  }
2712  // Follow HTTP redirections
2713  res = curl_easy_setopt(curl.get(), CURLOPT_FOLLOWLOCATION, 1L);
2714  if (res != CURLE_OK) {
2715  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2716  return false;
2717  }
2718  // Response data buffer
2719  std::string response;
2720 
2721  // Set the callback function to receive response data
2722  res = curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, WriteCallback);
2723  if (res != CURLE_OK) {
2724  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2725  return false;
2726  }
2727  res = curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, &response);
2728  if (res != CURLE_OK) {
2729  std::cerr << "Failed to perform request: curl_easy_setopt, line "<<__LINE__<<std::endl;
2730  return false;
2731  }
2732 
2733  // Perform the request
2734  res = curl_easy_perform(curl.get());
2735  if (res != CURLE_OK) {
2736  std::cerr << "Failed to perform request: " << curl_easy_strerror(res) << ":" << url.c_str() << std::endl;
2737  return false;
2738  } else {
2739  // Print the received response
2740  std::cout << "Response: " << std::endl;
2741  std::cout << response << std::endl;
2742  // Parse the JSON string
2743  try {
2745 
2746  // Extract the runnumber field
2747  int runNumber = jsonData["resources"][0]["runnumber"];
2748  int nextrun=runNumber+1;
2749  std::cout << "Next run started will be " << nextrun << std::endl;
2750  const long long rtime=time(nullptr);
2751  std::cout << "Epoch time extracted " << rtime << std::endl;
2752  if (m_alliov) {
2753  // if overwriting IOVs, set the new IOV lower limit
2754  m_newrunemin=(static_cast<long long>(nextrun)) << 32;
2755  m_newtimemin=rtime*static_cast<long long>(1E9);
2756  } else {
2757  // set the query lower limit - for use with truncate option
2758  m_runemin=(static_cast<long long>(nextrun)) << 32;
2759  m_timemin=rtime*static_cast<long long>(1E9);
2760  m_truncate=true;
2761  }
2762  } catch (nlohmann::json::parse_error& e) {
2763  std::cerr << "Failed to parse JSON response: " << e.what() << std::endl;
2764  return false;
2765  } catch (nlohmann::json::type_error& e) {
2766  std::cerr << "Failed to extract data from JSON response: " << e.what() << std::endl;
2767  return false;
2768  } catch (std::exception& e) {
2769  std::cerr << "Failed to extract run and timestamp from JSON response: " << e.what() << std::endl;
2770  return false;
2771  }
2772  }
2773  // Clean up done by unique_ptr d'tor
2774  } else {
2775  std::cerr << "Failed to initialize libcurl." << std::endl;
2776  return false;
2777  }
2778  // Cleanup libcurl
2779  curl_global_cleanup();
2780  return true;
2781 }

◆ getRunList()

bool AtlCoolCopy::getRunList ( )
private

Definition at line 2874 of file AtlCoolCopy.cxx.

2874  {
2875  // loop over all given filenames
2876  for (std::vector<std::string>::const_iterator itr=m_runfile.begin();
2877  itr!=m_runfile.end();++itr) {
2878  std::cout << "Reading allowed run numbers from file " << *itr << std::endl;
2879  FILE* p_inp=fopen(itr->c_str(),"r");
2880  if (p_inp==nullptr) {
2881  std::cout << "File not found" << std::endl;
2882  return false;
2883  }
2884  char* p_buf=new char[999];
2885  while (!feof(p_inp)) {
2886  char* p_line=fgets(p_buf,999,p_inp);
2887  if (p_line!=nullptr) {
2888  unsigned int run=atoi(p_line);
2889  m_runlist.push_back(run);
2890  }
2891  }
2892  fclose(p_inp);
2893  delete[] p_buf;
2894  }
2895  std::sort(m_runlist.begin(),m_runlist.end());
2896  std::cout << "Read list of " << m_runlist.size() << " runs from " <<
2897  m_runfile.size() << " input runlist files" << std::endl;
2898  for (std::vector<unsigned int>::const_iterator itr=m_runlist.begin();
2899  itr!=m_runlist.end();++itr) std::cout <<
2900  "Update allowed for run " << *itr << std::endl;
2901  return true;
2902 }

◆ getTimeFromRun()

bool AtlCoolCopy::getTimeFromRun ( )
private

Definition at line 2605 of file AtlCoolCopy.cxx.

2605  {
2606  // extract time limits for a run range using the expected information
2607  // in the /TDAQ/RunCtrl/SOR_Params and EOR_Params on the given DB connection
2608 
2609  // choose database instance based on run number switchover if none is given
2610  if (m_timedb.empty()) {
2611  if ((m_runemin >> 32)>=236107) {
2612  m_timedb="COOLONL_TDAQ/CONDBR2";
2613  } else {
2614  m_timedb="COOLONL_TDAQ/COMP200";
2615  }
2616  }
2617  // select foldername based on database instance
2618  std::string sorfolder="/TDAQ/RunCtrl/SOR_Params";
2619  std::string eorfolder="/TDAQ/RunCtrl/EOR_Params";
2620  if (m_timedb.find ("CONDBR2")!=std::string::npos) {
2621  sorfolder="/TDAQ/RunCtrl/SOR";
2622  eorfolder="/TDAQ/RunCtrl/EOR";
2623  }
2624  std::cout << "Extracting times for run range [" << (m_runemin >> 32) <<
2625  "," << (m_runemax >> 32) << "] from database " << m_timedb <<
2626  " folder " << sorfolder << std::endl;
2627  if (m_runemin==cool::ValidityKeyMin || m_runemax==cool::ValidityKeyMax) {
2628  std::cout << "ERROR: Run range not correctly specified" << std::endl;
2629  return false;
2630  }
2631  // open database connection
2632  cool::IDatabasePtr tdaqdb;
2633  try {
2634  tdaqdb=m_dbSvc->openDatabase(transConn(m_timedb),m_sourceread);
2635  std::cout << "Opened database connection" << std::endl;
2636  }
2637  catch (std::exception& e) {
2638  std::cout << "COOL exception caught: " << e.what() << std::endl;
2639  return false;
2640  }
2641  // start of run information
2642  try {
2643  cool::IFolderPtr folder=tdaqdb->getFolder(sorfolder);
2644  // channel number is arbitrary - have to loop
2645  cool::IObjectIteratorPtr itr=folder->browseObjects(m_runemin,m_runemin,
2647  int nobj=0;
2648  while (itr->goToNext()) {
2649  const cool::IRecord& payload=itr->currentRef().payload();
2650  m_timemin=payload["SORTime"].data<unsigned long long>();
2651  ++nobj;
2652  }
2653  itr->close();
2654  if (nobj!=1) {
2655  std::cout << "ERROR: Found " << nobj << " SOR records" << std::endl;
2656  return false;
2657  }
2658  }
2659  catch (std::exception& e) {
2660  std::cout << "Exception accessing SOR information: " << e.what() <<
2661  std::endl;
2662  return false;
2663  }
2664  // end of run information
2665  try {
2666  cool::IFolderPtr folder=tdaqdb->getFolder(eorfolder);
2667  // channel number is arbitrary - have to loop
2668  cool::IObjectIteratorPtr itr=folder->browseObjects(((m_runemax >> 32) << 32),((m_runemax >> 32) << 32),
2670  int nobj=0;
2671  while (itr->goToNext()) {
2672  const cool::IRecord& payload=itr->currentRef().payload();
2673  m_timemax=payload["EORTime"].data<unsigned long long>();
2674  ++nobj;
2675  }
2676  itr->close();
2677  if (nobj!=1) {
2678  std::cout << "ERROR: Found " << nobj << " EOR records" << std::endl;
2679  return false;
2680  }
2681  }
2682  catch (std::exception& e) {
2683  std::cout << "Exception accessing SOR information: " << e.what() <<
2684  std::endl;
2685  return false;
2686  }
2687  tdaqdb->closeDatabase();
2688  std::cout << "Timestamp range set to " << m_timemin << " " <<
2689  timeString(m_timemin) << "to " << m_timemax << " " <<
2690  timeString(m_timemax) << std::endl;
2691  return true;
2692 }

◆ getUpdateMode()

int AtlCoolCopy::getUpdateMode ( std::string_view  desc,
std::string_view  tag 
)
staticprivate

Definition at line 2904 of file AtlCoolCopy.cxx.

2905  {
2906  // analyse the folder description and tag name for updateMode flags
2907  // return 1 for online mode, 0 otherwise
2908  std::string_view modestr="";
2909  int mode=0;
2910  std::string::size_type iofs1=desc.find("<updateMode>");
2911  std::string::size_type iofs2=desc.find("</updateMode>");
2912  if (iofs1!=std::string::npos && iofs2!=std::string::npos && iofs2>iofs1)
2913  modestr=desc.substr(iofs1+12,iofs2-iofs1-12);
2914  if (modestr=="UPD1" || tag.find("UPD1")!=std::string::npos) mode=1;
2915  if (modestr=="UPD2" || tag.find("UPD2")!=std::string::npos) mode=2;
2916  if (modestr=="UPD3" || tag.find("UPD3")!=std::string::npos) mode=3;
2917  if (modestr=="UPD4" || tag.find("UPD4")!=std::string::npos) mode=4;
2918  return mode;
2919 }

◆ isNumeric()

bool AtlCoolCopy::isNumeric ( const char *  input)
staticprivate

Definition at line 2499 of file AtlCoolCopy.cxx.

2499  {
2500  // determine if input string is numeric or string
2501  bool isnum=true;
2502  const char* cptr=input;
2503  while (*cptr!='\0') {
2504  if (!isdigit(*cptr)) { isnum=false; break;}
2505  ++cptr;
2506  }
2507  return isnum;
2508 }

◆ isOpen()

bool AtlCoolCopy::isOpen ( ) const
inline

Definition at line 297 of file AtlCoolCopy.cxx.

297 { return m_open; }

◆ listPoolRefs()

int AtlCoolCopy::listPoolRefs ( )
private

Definition at line 3109 of file AtlCoolCopy.cxx.

3109  {
3110  std::cout << "Total of " << m_poolrefs.size() << " POOL files referenced"
3111  << std::endl;
3112  for (PoolMap::const_iterator ipool=m_poolrefs.begin();
3113  ipool!=m_poolrefs.end();++ipool) {
3114  std::cout << "Ref " << ipool->first << " (" << ipool->second.count()
3115  << ")" << std::endl;
3116  }
3117  return 0;
3118 }

◆ 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 1322 of file AtlCoolCopy.cxx.

1325  {
1326 
1327  std::cout << "Reading tag " << sourcetag << " of folder " << folder <<
1328  " (no copy)" << std::endl;
1329  cool::FolderVersioning::Mode vermode=sourcefl->versioningMode();
1330  int nobj=0;
1331  cool::IObjectIteratorPtr sourceitr;
1332  if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1333  sourceitr=sourcefl->browseObjects(since,until,m_chansel);
1334  } else {
1335  sourceitr=sourcefl->browseObjects(since,until,m_chansel,sourcetag);
1336  }
1337  try {
1338  while (sourceitr->goToNext()) {
1339  const cool::IObject& obj=sourceitr->currentRef();
1340  if (checkrefs) checkRef(obj.payload(),folder,sourcetag);
1341  ++nobj;
1342  }
1343  std::cout << "Folder scanned with " << nobj << " objects" << std::endl;
1344  }
1345  // exceptions thrown from read loop
1346  catch (cool::Exception& e) {
1347  std::cout << "Exception thrown from read loop: " << e.what() <<
1348  std::endl;
1349  return 33;
1350  }
1351  // finished with the iterator
1352  sourceitr->close();
1353  return 0;
1354 }

◆ openConnections()

bool AtlCoolCopy::openConnections ( const std::string &  sourcedb,
const std::string &  destdb,
bool  allowcreate 
)
private

Definition at line 340 of file AtlCoolCopy.cxx.

341  {
342  // check connections not already open
343  if (m_open) return true;
344  // initialise replica sorter if it was requested
345  if (m_readoracle) {
346  m_repsort=new ReplicaSorter();
347  coral::IConnectionServiceConfiguration& csconfig=m_coralsvc.configuration();
348  csconfig.setReplicaSortingAlgorithm(*m_repsort);
349  }
350  // cool::IDatabaseSvc& dbSvc=cool::DatabaseSvcFactory::databaseService();
351  // open source database
352  std::cout << "Open source database: " << sourcedb << std::endl;
353  if (!m_sourceread) std::cout << "... in UPDATE mode" << std::endl;
354  try {
355  m_sourceDbPtr=m_dbSvc->openDatabase(transConn(sourcedb),m_sourceread);
356  }
357  catch (std::exception& e) {
358  std::cout << "Cool exception caught: " << e.what() << std::endl;
359  return false;
360  }
361  // open destination database
362  if (m_nocopy) {
363  m_open=true;
364  return true;
365  } else if (m_root || m_analyse) {
366  std::cout << "Open destination ROOT file: " << destdb << std::endl;
367  p_rootfile=new TFile(destdb.c_str(),"RECREATE");
368  if (p_rootfile==nullptr) std::cout << "ERROR: Could not open ROOT file" <<
369  std::endl;
370  m_open=(p_rootfile!=nullptr);
371  return m_open;
372  }
373  std::string tdestdb=transConn(destdb);
374  std::cout << "Open destination database: " << tdestdb << std::endl;
375  try {
376  m_destDbPtr=m_dbSvc->openDatabase(tdestdb,m_verify);
377  // if the open succeeds and we are using recreate mode, drop/delete
378  // the existing database first
379  if (m_recreate) {
380  std::cout <<
381  "Forcing recreation of destination database - deleting existing data!"
382  << std::endl;
383  m_destDbPtr.reset();
384  m_dbSvc->dropDatabase(tdestdb);
385  // go into catch to recrete database
386  throw cool::DatabaseDoesNotExist("old database deleted");
387  }
388  }
389  catch (std::exception& e) {
390  std::cout << "COOL exception caught: " << e.what() << std::endl;
391  // try to recover by creating new DB if possible and requested
392  if (allowcreate || m_recreate) {
393  std::cout << "Try to create new conditions DB" << std::endl;
394  try {
395  m_destDbPtr=m_dbSvc->createDatabase(tdestdb);
396  std::cout << "Creation succeeded" << std::endl;
397  }
398  catch (cool::Exception& e) {
399  std::cout << "Creation failed" << std::endl;
400  return false;
401  }
402  } else {
403  return false;
404  }
405  }
406  m_open=true;
407  return true;
408 }

◆ openCoraCool()

bool AtlCoolCopy::openCoraCool ( )
private

Definition at line 410 of file AtlCoolCopy.cxx.

410  {
411  if (m_sourceCoraPtr.get()==nullptr) {
412  std::cout << "Attempt to open source CoraCool DB " << m_sourcedb <<
413  std::endl;
416  std::cout << "Opened CoraCool source DB" << std::endl;
417  }
418  // skip destination DB if not copying
419  if (m_nocopy) return true;
420  if (m_destCoraPtr.get()==nullptr) {
421  std::cout << "Attempt to open destination CoraCool DB " << m_destdb <<
422  std::endl;
425  std::cout << "Opened CoraCool dest DB" << std::endl;
426  }
427  return true;
428 }

◆ procOptVector()

bool AtlCoolCopy::procOptVector ( const int  argc,
const char *  argv[],
std::vector< std::string > &  folders 
)
private

Definition at line 2132 of file AtlCoolCopy.cxx.

2133  {
2134  // process an array of options, return True if OK, False if not
2135  int ic=0;
2136  bool error=false;
2137  while (ic<argc) {
2138  int ir=argc-ic;
2139  std::string_view par0=argv[ic];
2140  // strip double "--" to achieve compatability with python-style options
2141  if (par0.compare(0,2,"--")==0) par0=par0.substr(1);
2142  if ((par0=="-f" || par0=="-folder") && ir>1) {
2143  folders.emplace_back(argv[ic+1]);
2144  ++ic;
2145  } else if ((par0=="-e" || par0=="-exclude") && ir>1) {
2146  addExclude(argv[ic+1]);
2147  ++ic;
2148  } else if ((par0=="-t" || par0=="-tag") && ir>1) {
2149  m_tags.emplace_back(argv[ic+1]);
2150  ++ic;
2151  } else if ((par0=="-mt" || par0=="-magic") && ir>1) {
2152  m_magic.push_back("_"+std::string(argv[ic+1]));
2153  ++ic;
2154  } else if ((par0=="-of" || par0=="-outfolder") && ir>1) {
2155  m_outfolder=argv[ic+1];
2156  ++ic;
2157  } else if ((par0=="-ot" || par0=="-outtag") && ir>1) {
2158  m_outtag=argv[ic+1];
2159  ++ic;
2160  } else if ((par0=="-bs" || par0=="-buffersize") && ir>1) {
2161  m_bufsize=atoi(argv[ic+1]);
2162  ++ic;
2163  } else if ((par0=="-sl" || par0=="-seal") && ir>1) {
2164  m_sealmsg=atoi(argv[ic+1]);
2165  ++ic;
2166  } else if ((par0=="-rls" || par0=="-runlumisince") && ir>2) {
2167  m_runemin=runLBVal(argv[ic+1],argv[ic+2]);
2168  ic+=2;
2169  } else if ((par0=="-rlu" || par0=="-runlumiuntil") && ir>2) {
2170  m_runemax=runLBVal(argv[ic+1],argv[ic+2]);
2171  ic+=2;
2172  } else if ((par0=="-nrls" || par0=="-newrunlumisince") && ir>2) {
2174  ic+=2;
2175  } else if ((par0=="-nrlu" || par0=="-newrunlumiuntil") && ir>2) {
2177  ic+=2;
2178  } else if ((par0=="-srls" || par0=="-skiprunlumisince") && ir>2) {
2179  m_srunemin=runLBVal(argv[ic+1],argv[ic+2]);
2180  m_skipout=true;
2181  ic+=2;
2182  } else if ((par0=="-srlu" || par0=="-skiprunlumiuntil") && ir>2) {
2183  m_srunemax=runLBVal(argv[ic+1],argv[ic+2]);
2184  m_skipout=true;
2185  ic+=2;
2186  } else if (par0=="-ro" || par0=="-root") {
2187  m_root=true;
2188  } else if (par0=="-zn" || par0=="-zeronull") {
2189  m_zeronull=true;
2190  } else if (par0=="-ana" || par0=="-analyse") {
2191  m_analyse=true;
2192  float ttime=atof(argv[ic+1])*1.E9;
2193  m_anadelt=static_cast<long long>(ttime);
2194  ++ic;
2195  } else if ((par0=="-rs" || par0=="-runsince") && ir>1) {
2196  m_runemin=(static_cast<long long>(atol(argv[ic+1])) << 32);
2197  ++ic;
2198  } else if ((par0=="-ru" || par0=="-rununtil") && ir>1) {
2199  m_runemax=(static_cast<long long>(1+atol(argv[ic+1])) << 32)-1;
2200  ++ic;
2201  } else if ((par0=="-r" || par0=="-run") && ir>1) {
2202  m_runemin=(static_cast<long long>(atol(argv[ic+1])) << 32);
2203  m_runemax=(static_cast<long long>(1+atol(argv[ic+1])) << 32)-1;
2204  ++ic;
2205  } else if ((par0=="-ts" || par0=="-timesince") && ir>1) {
2206  m_timemin=timeVal(argv[ic+1]);
2207  ++ic;
2208  } else if ((par0=="-tu" || par0=="-timeuntil") && ir>1) {
2209  m_timemax=timeVal(argv[ic+1]);
2210  ++ic;
2211  } else if ((par0=="-nts" || par0=="-newtimesince") && ir>1) {
2213  ++ic;
2214  } else if ((par0=="-ntu" || par0=="-newtimeuntil") && ir>1) {
2216  ++ic;
2217  } else if (par0=="-c" || par0=="-create") {
2218  m_allowcreate=true;
2219  } else if ((par0=="-ch" || par0=="-channel") && ir>1) {
2220  m_channelRange.emplace_back(argv[ic+1]);
2221  ++ic;
2222  } else if ((par0=="-ch1" || par0=="-channel1") && ir>1) {
2223  m_channel1=argv[ic+1];
2224  ++ic;
2225  } else if ((par0=="-ch2" || par0=="-channel2") && ir>1) {
2226  m_channel2=argv[ic+1];
2227  ++ic;
2228  } else if (par0=="-chd" || par0=="-channeldesc") {
2229  m_chdesc=true;
2230  // no abbreviaton for this one - dangerous option
2231  } else if (par0=="-forcerecreate") {
2232  m_recreate=true;
2233  } else if (par0=="-d" || par0=="-debug") {
2234  m_debug=true;
2235  } else if (par0=="-a" || par0=="-alliov") {
2236  m_alliov=true;
2237  } else if (par0=="-ih" || par0=="-includehead") {
2238  m_includehead=true;
2239  } else if (par0=="-eh" || par0=="-excludehead") {
2240  m_excludehead=true;
2241  } else if (par0=="-ht" || par0=="-headtag") {
2242  m_usertags=false;
2243  } else if (par0=="-uht" || par0=="-userheadtag") {
2244  m_userupdatehead=true;
2245  } else if (par0=="-v" || par0=="-verify") {
2246  m_verify=true;
2247  } else if (par0=="-nc" || par0=="-nocopy") {
2248  m_nocopy=true;
2249  } else if (par0=="-noc" || par0=="-nocoracool") {
2250  m_coracool=false;
2251  } else if (par0=="-nch" || par0=="-nochannel") {
2252  m_nochannel=true;
2253  } else if (par0=="-ncr" || par0=="-noclobroot") {
2254  m_noclobroot=true;
2255  } else if (par0=="-nd" || par0=="-nodata") {
2256  m_nodata=true;
2257  } else if (par0=="-nh" || par0=="-nohitag") {
2258  m_nohitag=true;
2259  } else if (par0=="-hi" || par0=="-hitag") {
2260  m_hitag=true;
2261  } else if ((par0=="-ec" || par0=="-excludechannel") && ir>1) {
2262  m_excludechans.push_back(strtoul(argv[ic+1],nullptr,10));
2263  ++ic;
2264  } else if (par0=="-fs" || par0=="-forcesingle") {
2265  m_forcesingle=true;
2266  } else if (par0=="-fm" || par0=="-forcemulti") {
2267  m_forcemulti=true;
2268  } else if (par0=="-frl" || par0=="-forcerunlumi") {
2269  m_forcerune=true;
2270  } else if (par0=="-ftm" || par0=="-forcetime") {
2271  m_forcetime=true;
2272  } else if (par0=="-fp" || par0=="-forcepayload") {
2273  m_forcepay=true;
2274  } else if (par0=="-fnp" || par0=="-forcenopayload") {
2275  m_forcenopay=true;
2276  } else if (par0=="-cr" || par0=="-checkrefs") {
2277  m_checkrefs=true;
2278  } else if (par0=="-lp" || par0=="-listpfn") {
2279  m_listpfn=true;
2280  m_checkrefs=true;
2281  } else if (par0=="-cf" || par0=="-checkfiles") {
2282  m_poolopen=true;
2283  m_checkrefs=true;
2284  } else if (par0=="-pa" || par0=="-poolall") {
2285  m_poolall=true;
2286  } else if ((par0=="-co" || par0=="-checkoutput") && ir>1) {
2288  ++ic;
2289  } else if ((par0=="-pc" || par0=="-poolcat") && ir>1) {
2290  m_poolcat.emplace_back(argv[ic+1]);
2291  ++ic;
2292  } else if ((par0=="-mc" || par0=="-mergecat") && ir>1) {
2293  m_mergecat.emplace_back(argv[ic+1]);
2294  ++ic;
2295  } else if ((par0=="-ds" || par0=="-dataset") && ir>1) {
2296  m_newdataset=argv[ic+1];
2297  ++ic;
2298  } else if (par0=="-us" || par0=="-updatesource") {
2299  m_sourceread=false;
2300  } else if (par0=="-cd" || par0=="-checkdest") {
2301  m_checkdesttag=true;
2302  } else if (par0=="-tr" || par0=="-truncate") {
2303  m_truncate=true;
2304  } else if (par0=="-al" || par0=="-appendlocked") {
2305  m_applock=true;
2306  } else if (par0=="-alsv" || par0=="-appendlockedsv") {
2307  m_applock=true;
2308  m_applocksv=true;
2309  } else if (par0=="-rdo" || par0=="-readoracle") {
2310  m_readoracle=true;
2311  } else if (par0=="-skiprep" || par0=="-sr") {
2312  m_skiprep=true;
2313  } else if (par0=="-go" || par0=="-getonline") {
2314  m_getonline=true;
2315  } else if (par0=="-onr" || par0=="-onlinerun") {
2316  m_onlinerun=true;
2317  } else if (par0=="-gb" || par0=="-getbulk") {
2318  m_getbulk=true;
2319  } else if (par0=="-gt" || par0=="-gettime") {
2320  m_gettime=true;
2321  } else if ((par0=="-tdb" || par0=="-timedb") && ir>1) {
2322  m_timedb=argv[ic+1];
2323  ++ic;
2324  } else if (par0=="-ignoremode" && ir>1) {
2325  std::cout << "Ignoremode password is " << argv[ic+1] << ":end" << std::endl;
2326  if (strcmp(argv[ic+1],"BackDoor")==0) {
2327  m_ignoremode=true;
2328  } else {
2329  std::cout << "ERROR: Incorrect password for -ignoremode" << std::endl;
2330  error=true;
2331  }
2332  ++ic;
2333  } else if (par0=="-is" || par0=="-ignorespec") {
2334  m_ignorespec=true;
2335  } else if (par0=="-pt" || par0=="-prunetags") {
2336  m_prunetags=true;
2337  m_excludehead=true;
2338  } else if (par0=="-lo" || par0=="-lockedonly") {
2339  m_lockedonly=true;
2340  m_prunetags=true;
2341  m_excludehead=true;
2342  } else if (par0=="-cti" || par0=="-copytaginfo") {
2343  m_copytaginfo=true;
2344  } else if (par0=="-ctl" || par0=="-copytaglock") {
2345  m_copytaginfo=true;
2346  m_copytaglock=true;
2347  } else if ((par0=="-tl" || par0=="-taglabel") && ir>1) {
2348  m_taglabel=argv[ic+1];
2349  ++ic;
2350  m_copytaginfo=true;
2351  } else if ((par0=="-ag" || par0=="-addguid") && ir>1) {
2352  m_addguid.emplace_back(argv[ic+1]);
2353  ++ic;
2354  } else if ((par0=="-alf" || par0=="-addlfn") && ir>1) {
2355  m_addlfn.emplace_back(argv[ic+1]);
2356  ++ic;
2357  } else if ((par0=="-pf" || par0=="-parfile") && ir>1) {
2358  m_parfile.emplace_back(argv[ic+1]);
2359  ++ic;
2360  } else if ((par0=="-rf" || par0=="-runfile") && ir>1) {
2361  m_runfile.emplace_back(argv[ic+1]);
2362  ++ic;
2363  } else if ((par0=="-ws" || par0=="-runinfohost") && ir>1) {
2364  m_runinfohost=argv[ic+1];
2365  ++ic;
2366  } else if (par0=="-h" || par0=="-help") {
2367  // help printout triggered by -999 return code
2368  return 999;
2369  } else {
2370  std::cout << "Parameter error for argument: " << par0 << std::endl;
2371  error=true;
2372  }
2373  ++ic;
2374  }
2375  return !error;
2376 }

◆ rootAllocate()

bool AtlCoolCopy::rootAllocate ( const cool::IFieldSpecification &  spec,
void *&  sptr,
char &  rootID 
) const
private

Definition at line 1716 of file AtlCoolCopy.cxx.

1717  {
1718  const cool::StorageType& stype=spec.storageType();
1719  rootID=' ';
1720  sptr=nullptr;
1721  if (stype==cool::StorageType::Bool) {
1722  // map bool to uint32 for now
1723  sptr=static_cast<void*>(new unsigned int(0));
1724  rootID='i';
1725  } else if (stype==cool::StorageType::UChar) {
1726  sptr=static_cast<void*>(new unsigned char(' '));
1727  rootID='C';
1728  } else if (stype==cool::StorageType::Int16) {
1729  sptr=static_cast<void*>(new short(0));
1730  rootID='S';
1731  } else if (stype==cool::StorageType::UInt16) {
1732  sptr=static_cast<void*>(new unsigned short(0));
1733  rootID='s';
1734  } else if (stype==cool::StorageType::Int32) {
1735  sptr=static_cast<void*>(new int(0));
1736  rootID='I';
1737  } else if (stype==cool::StorageType::UInt32) {
1738  sptr=static_cast<void*>(new unsigned int(0));
1739  rootID='i';
1740  } else if (stype==cool::StorageType::Int64) {
1741  sptr=static_cast<void*>(new long long int(0));
1742  rootID='L';
1743  } else if (stype==cool::StorageType::UInt63) {
1744  sptr=static_cast<void*>(new unsigned long long int(0));
1745  rootID='l';
1746  } else if (stype==cool::StorageType::Float) {
1747  sptr=static_cast<void*>(new float(0.));
1748  rootID='F';
1749  } else if (stype==cool::StorageType::Double) {
1750  sptr=static_cast<void*>(new double(0.));
1751  rootID='D';
1752  } else if (stype==cool::StorageType::String4k ||
1753  stype==cool::StorageType::String255) {
1754  sptr=static_cast<void*>(new char[4100]);
1755  rootID='C';
1756  } else if (stype==cool::StorageType::String64k && !m_noclobroot) {
1757  sptr=static_cast<void*>(new char[65536]);
1758  rootID='C';
1759  } else if (stype==cool::StorageType::String16M && !m_noclobroot) {
1760  sptr=static_cast<void*>(new char[67108864]);
1761  rootID='C';
1762  } else if (stype==cool::StorageType::Blob64k && !m_noclobroot) {
1763  sptr=static_cast<void*>(new char[65536]);
1764  rootID='C';
1765  } else {
1766  std::cout << "rootAllocate: Unsupported storage type for attribute: " <<
1767  spec.name() << std::endl;
1768  }
1769  return (sptr!=nullptr);
1770 }

◆ rootDirs()

std::string AtlCoolCopy::rootDirs ( const std::string &  folder,
const std::string &  toproot 
)
private

Definition at line 1682 of file AtlCoolCopy.cxx.

1683  {
1684  // create a ROOT directory structure start with toproot (=COOL or COOLANA)
1685  // and cd to the directory where a tree should be created
1686  // return the tree name (=leaf of the COOL foldername)
1687  p_rootfile->cd();
1688  if (p_rootfile->FindObject(toproot.c_str())==nullptr) {
1689  p_rootfile->mkdir(toproot.c_str());
1690  std::cout << "Made top directory " << toproot << std::endl;
1691  }
1692  gDirectory->cd(toproot.c_str());
1693  // now parse the COOL folder name to create intermediate directories
1694  // assume folder names begin with '/', to be skipped
1695  std::string::size_type iofs1=1;
1696  std::string::size_type iofs2=1;
1697  std::string treename;
1698  while (iofs2!=std::string::npos) {
1699  iofs2=folder.find('/',iofs1);
1700  if (iofs2==std::string::npos) {
1701  // no more /, so current part of string is leaf tree name
1702  treename=folder.substr(iofs1);
1703  } else {
1704  std::string dirname=folder.substr(iofs1,iofs2-iofs1);
1705  iofs1=iofs2+1;
1706  if (gDirectory->FindObject(dirname.c_str())==nullptr) {
1707  std::cout << "Make directory " << dirname << std::endl;
1708  gDirectory->mkdir(dirname.c_str());
1709  }
1710  gDirectory->cd(dirname.c_str());
1711  }
1712  }
1713  return treename;
1714 }

◆ 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 1551 of file AtlCoolCopy.cxx.

1554  {
1555  // copy this selection to ROOT
1556  std::cout << "Write tag " << sourcetag << " of folder " << folder <<
1557  " to ROOT file" << std::endl;
1558  // create the directory structure - top directory COOL
1559  std::string treename=rootDirs(folder,"COOL");
1560  bool timestamp2=timestamp;
1561  if (m_forcetime) timestamp2=true;
1562  if (m_forcerune) timestamp2=false;
1563  cool::FolderVersioning::Mode vermode=sourcefl->versioningMode();
1564  // create TTree with appropriate structure - only if it does not exist
1565  // could have been created from a previous tag in the same folder
1566  TTree* tree=static_cast<TTree*>(gDirectory->FindObject(treename.c_str()));
1567  if (tree==nullptr) {
1568  std::cout << "Book TTree " << treename << std::endl;
1569  tree=new TTree(treename.c_str(),"COOL datadump");
1570  if (timestamp2) {
1571  tree->Branch("IOVSince",&m_nt_since,"IOVSince/l");
1572  tree->Branch("IOVUntil",&m_nt_until,"IOVUntil/l");
1573  } else {
1574  tree->Branch("RunSince",&m_nt_runsince,"RunSince/i");
1575  tree->Branch("RunUntil",&m_nt_rununtil,"RunUntil/i");
1576  tree->Branch("LBSince",&m_nt_lbsince,"LBSince/i");
1577  tree->Branch("LBUntil",&m_nt_lbuntil,"LBUntil/i");
1578  }
1579  tree->Branch("ChannelID",&m_nt_channel,"ChannelID/i");
1580  if (vermode==cool::FolderVersioning::MULTI_VERSION)
1581  tree->Branch("TagID",m_nt_tagid,"TagID/C");
1582  // now loop through specification, creating payload buffer and tree
1583  const cool::IRecordSpecification& spec=
1584  (sourcefl->folderSpecification()).payloadSpecification();
1585  unsigned int ncolumns=spec.size();
1586  // clear the buffer of pointers - note this leaks the memory of the
1587  // previous buffers, but to do this properly would have to remember
1588  // the type of each object and delete appropriately
1590  m_nt_bufferptr.clear();
1591  for (unsigned int icol=0;icol<ncolumns;++icol) {
1592  const cool::IFieldSpecification& fieldspec=spec[icol];
1593  void* ptr=nullptr;
1594  char rootID;
1595  if (rootAllocate(fieldspec,ptr,rootID)) {
1596  tree->Branch(fieldspec.name().c_str(),ptr,
1597  (fieldspec.name()+"/"+rootID).c_str());
1598  if (m_debug) std::cout << "Defining column for " << spec[icol].name()
1599  << " of type " << spec[icol].storageType().name() << std::endl;
1600  } else {
1601  std::cout << "Attribute " << spec[icol].name() << " of type " <<
1602  spec[icol].storageType().name() << " will be skipped" << std::endl;
1603  }
1604  m_nt_bufferptr.push_back(ptr);
1605  }
1606  } else {
1607  std::cout << "TTree " << treename << " already exists" << std::endl;
1608  // check we have seen and defined this tree
1609  unsigned int size=
1610  (sourcefl->folderSpecification()).payloadSpecification().size();
1611  if (treename!=m_nt_treename || size!=m_nt_bufferptr.size()) {
1612  std::cout << "ERROR in tree buffer definition: expect " << treename <<
1613  " size " << size << " but buffer has " << m_nt_treename << " size "
1614  << m_nt_bufferptr.size() << std::endl;
1615  return 123;
1616  }
1617  }
1618 
1619  int nobj=0;
1620  int nex=0;
1621  cool::IObjectIteratorPtr sourceitr;
1622  try {
1623  if (vermode==cool::FolderVersioning::SINGLE_VERSION) {
1624  sourceitr=sourcefl->browseObjects(since,until,m_chansel);
1625  } else {
1626  sourceitr=sourcefl->browseObjects(since,until,m_chansel,sourcetag);
1627  }
1628  }
1629  catch (cool::Exception& e) {
1630  std::cout << "Exception thrown from ROOT copy iterator setup: " <<
1631  e.what() << std::endl;
1632  return 125;
1633  }
1634  // now loop over all IOVs to copy them
1635  try {
1636  while (sourceitr->goToNext()) {
1637  const cool::IObject& sobj=sourceitr->currentRef();
1638  if (timestamp2) {
1639  m_nt_since=sobj.since();
1640  m_nt_until=sobj.until();
1641  } else {
1642  m_nt_runsince=(sobj.since() >> 32);
1643  m_nt_rununtil=(sobj.until() >> 32);
1644  m_nt_lbsince=(sobj.since() & 0xFFFFFFFF);
1645  m_nt_lbuntil=(sobj.until() & 0xFFFFFFFF);
1646  }
1647  m_nt_channel=sobj.channelId();
1648  if (vermode==cool::FolderVersioning::MULTI_VERSION) {
1649  // truncate the string first to avoid coverity complaining about
1650  // potential buffer overruns
1651  std::string sourcetag2=sourcetag.substr(0,255);
1652  strncpy(m_nt_tagid,sourcetag2.c_str(),sizeof(m_nt_tagid)-1);
1653  }
1654  // loop over the payload elements and fill the ones for which buffers
1655  // are defined
1656  try {
1657  const cool::IRecord& record=sobj.payload();
1658  for (unsigned int icol=0;icol<record.size();++icol) {
1659  if (m_nt_bufferptr[icol]!=nullptr) rootWrite(m_nt_bufferptr[icol],record[icol]);
1660  }
1661  tree->Fill();
1662  ++nobj;
1663  }
1664  catch (cool::Exception& e) {
1665  // can get exceptions due to NULL values
1666  // catch them and continue...
1667  ++nex;
1668  }
1669  }
1670  sourceitr->close();
1671  std::cout << "Written " << nobj << " objects to ROOT TTree with " << nex
1672  << " nulls/exceptions" << std::endl;
1673  }
1674  catch (cool::Exception& e) {
1675  std::cout << "Exception thrown from ROOT file writing loop: " <<
1676  e.what() << std::endl;
1677  return 124;
1678  }
1679  return 0;
1680 }

◆ rootWrite()

void AtlCoolCopy::rootWrite ( void *  sptr,
const cool::IField &  field 
) const
private

Definition at line 1772 of file AtlCoolCopy.cxx.

1772  {
1773  // check for NULL value
1774  bool recnull=(field.isNull() && m_zeronull);
1775  const cool::StorageType& stype=field.storageType();
1776  if (stype==cool::StorageType::Bool) {
1777  if (recnull) {
1778  *(static_cast<int*>(sptr))=0;
1779  } else {
1780  *(static_cast<int*>(sptr))=(field.data<bool>() ? 1 : 0);
1781  }
1782  } else if (stype==cool::StorageType::UChar) {
1783  if (recnull) {
1784  *(static_cast<unsigned char*>(sptr))=0;
1785  } else {
1786  *(static_cast<unsigned char*>(sptr))=field.data<unsigned char>();
1787  }
1788  } else if (stype==cool::StorageType::Int16) {
1789  if (recnull) {
1790  *(static_cast<short*>(sptr))=0;
1791  } else {
1792  *(static_cast<short*>(sptr))=field.data<short>();
1793  }
1794  } else if (stype==cool::StorageType::UInt16) {
1795  if (recnull) {
1796  *(static_cast<unsigned short*>(sptr))=0;
1797  } else {
1798  *(static_cast<unsigned short*>(sptr))=field.data<unsigned short>();
1799  }
1800  } else if (stype==cool::StorageType::Int32) {
1801  if (recnull) {
1802  *(static_cast<int*>(sptr))=0;
1803  } else {
1804  *(static_cast<int*>(sptr))=field.data<int>();
1805  }
1806  } else if (stype==cool::StorageType::UInt32) {
1807  if (recnull) {
1808  *(static_cast<unsigned int*>(sptr))=0;
1809  } else {
1810  *(static_cast<unsigned int*>(sptr))=field.data<unsigned int>();
1811  }
1812  } else if (stype==cool::StorageType::Int64) {
1813  if (recnull) {
1814  *(static_cast<long long*>(sptr))=0;
1815  } else {
1816  *(static_cast<long long*>(sptr))=field.data<long long>();
1817  }
1818  } else if (stype==cool::StorageType::UInt63) {
1819  if (recnull) {
1820  *(static_cast<unsigned long long*>(sptr))=0;
1821  } else {
1822  *(static_cast<unsigned long long*>(sptr))=field.data<unsigned long long>();
1823  }
1824  } else if (stype==cool::StorageType::Float) {
1825  if (recnull) {
1826  *(static_cast<float*>(sptr))=0.;
1827  } else {
1828  *(static_cast<float*>(sptr))=field.data<float>();
1829  }
1830  } else if (stype==cool::StorageType::Double) {
1831  if (recnull) {
1832  *(static_cast<double*>(sptr))=0.;
1833  } else {
1834  *(static_cast<double*>(sptr))=field.data<double>();
1835  }
1836  } else if (stype==cool::StorageType::String255 ||
1837  stype==cool::StorageType::String4k ||
1838  stype==cool::StorageType::String64k ||
1839  stype==cool::StorageType::String16M) {
1840  if (recnull) {
1841  strcpy(static_cast<char*>(sptr),"NULL");
1842  } else {
1843  strcpy(static_cast<char*>(sptr),field.data<std::string>().c_str());
1844  }
1845  } else if (stype==cool::StorageType::Blob64k && !m_noclobroot) {
1846  if (recnull) {
1847  strcpy(static_cast<char*>(sptr),"NULL");
1848  } else {
1849  auto blob = field.data<coral::Blob>();
1850  std::string blobStr((char*)blob.startingAddress(), blob.size());
1851  strcpy(static_cast<char*>(sptr), blobStr.c_str());
1852  }
1853  } else {
1854  std::cout << "ERROR: Unknown storage type in rootWrite!" << std::endl;
1855  }
1856 }

◆ runLBVal()

cool::ValidityKey AtlCoolCopy::runLBVal ( const char *  input1,
const char *  input2 
)
staticprivate

Definition at line 2586 of file AtlCoolCopy.cxx.

2586  {
2587  // parse the inputs as run/LB numbers to generate a validitykey
2588  // used in processing -rls-type options
2589  cool::ValidityKey val;
2590  if (input1[0]=='M' || input1[0]=='m') {
2591  val=((1LL << 31)-1) << 32;
2592  } else {
2593  val=static_cast<long long>(atol(input1)) << 32;
2594  }
2595  if (input2[0]=='M' || input2[0]=='m') {
2596  val+=(1LL << 32);
2597  } else {
2598  val+=atoll(input2);
2599  }
2600  if (val>cool::ValidityKeyMax) val=cool::ValidityKeyMax;
2601  return val;
2602 }

◆ setChannelRange()

void AtlCoolCopy::setChannelRange ( const cool::IFolderPtr &  sourcefl)
private

Definition at line 821 of file AtlCoolCopy.cxx.

821  {
822  // add range specified via -ch1 -ch2 if given
823  if (!m_channel1.empty() && !m_channel2.empty()) {
824  m_channelRange.clear();
825  m_channelRange.push_back(m_channel1+":"+m_channel2);
826  }
828  const size_t nChanRange=m_channelRange.size();
829  for (size_t i=0;i<nChanRange;i++) {
830  size_t cpos=m_channelRange[i].find(':');
831  if (cpos==std::string::npos || cpos > m_channelRange[i].size()-1) {
832  // single channel
833  std::cout << "Adding channel " << m_channelRange[i] <<
834  " to channel selection" << std::endl;
835  if (m_chansel.allChannels())
836  m_chansel=cool::ChannelSelection(channelID(sourcefl,
837  m_channelRange[i]));
838  else
839  m_chansel.addChannel(channelID(sourcefl,m_channelRange[i]));
840  }
841  else {
842  // Channel Range
843  std::string c1=m_channelRange[i].substr(0,cpos);
844  std::string c2=m_channelRange[i].substr(1+cpos);
845  std::cout << "Adding channel range " << c1 << " to " << c2 <<
846  " to channel selection" << std::endl;
847  if (m_chansel.allChannels())
848  m_chansel=cool::ChannelSelection(channelID(sourcefl,c1),
849  channelID(sourcefl,c2));
850  else
851  m_chansel.addRange(channelID(sourcefl,c1),channelID(sourcefl,c2));
852  }
853  }//end loop over channel ranges
854 }

◆ setOpts()

int AtlCoolCopy::setOpts ( int  argc,
const char *  argv[] 
)

Definition at line 2379 of file AtlCoolCopy.cxx.

2379  {
2380  // accumulate raw folder list
2381  std::vector<std::string> folders;
2382  // process options given on command-line
2383  if (!procOptVector(argc,argv,folders)) return 2;
2384 
2385  // parse any parameters in files via parfile option
2386  for (std::vector<std::string>::const_iterator ifile=m_parfile.begin();
2387  ifile!=m_parfile.end();++ifile) {
2388  std::cout << "Reading parameters from file " << *ifile << std::endl;
2389  FILE* p_inp=fopen(ifile->c_str(),"r");
2390  if (p_inp==nullptr) {
2391  std::cout << "File not found" << std::endl;
2392  return 3;
2393  }
2394  char* p_buf=new char[999];
2395  while (!feof(p_inp)) {
2396  char* p_line=fgets(p_buf,999,p_inp);
2397  if (p_line!=nullptr) {
2398  int fargc=0;
2399  const char* fargv[99];
2400  // split this line into tokens
2401  char* p_start=nullptr;
2402  while (*p_line!='\0') {
2403  if (*p_line==' ' || *p_line=='\n') {
2404  // pointing at a space/newline, marking the end of a parameter
2405  if (p_start!=nullptr) {
2406  // if we have a parameter, mark the end and store it
2407  *p_line='\0';
2408  fargv[fargc]=p_start;
2409  fargc++;
2410  p_start=nullptr;
2411  }
2412  } else {
2413  // mark the start of a parameter
2414  if (p_start==nullptr) p_start=p_line;
2415  }
2416  ++p_line;
2417  }
2418  if (fargc>0) {
2419  if (!procOptVector(fargc,&fargv[0],folders)) {
2420  fclose(p_inp);
2421  return 3;
2422  }
2423  }
2424  }
2425  }
2426  std::cout << "Close file" << std::endl;
2427  fclose(p_inp);
2428  delete[] p_buf;
2429  }
2430 
2431  // now open the database so folder lookup will work
2433  std::cout << "Problem opening connections" << std::endl;
2434  return 10;
2435  } else {
2436  // having assembled the raw list of folders and exclude list, construct
2437  // real list of folders (allows exclude to be specified after folders on
2438  // command line), if none given, add '/'
2439  if (m_lockedonly) {
2440  if (getLockedTags()==0) return 11;
2441  }
2442  if (folders.empty()) {
2443  // no folders specified, take all with tags
2444  addFolder("/",false);
2445  } else {
2446  // explicit list of folders
2447  for (std::vector<std::string>::const_iterator ifold=folders.begin();
2448  ifold!=folders.end();++ifold) addFolder(*ifold,false);
2449  // need to process only tags in root folder, if inclusive hiearchicals
2450  if (m_hitag) addFolder("/",true);
2451  }
2452  }
2453  if (m_getonline) {
2454  if (!getOnlineRun()) return 6;
2455  }
2456  if (m_getbulk) {
2457  if (!getBulkRun()) return 6;
2458  }
2459  if (m_gettime) {
2460  if (!getTimeFromRun()) return 5;
2461  }
2462  if (!m_runfile.empty()) {
2463  if (!getRunList()) return 7;
2464  }
2465  // list out parameter changes
2466  if (m_runemin!=cool::ValidityKeyMin || m_runemax!=cool::ValidityKeyMax)
2467  std::cout << "Source run/LB range [" << (m_runemin >> 32) << "," <<
2468  (m_runemin & 0xFFFFFFFF) << "] to [" << (m_runemax >> 32) << "," <<
2469  (m_runemax & 0xFFFFFFFF) << "]" << std::endl;
2470  if (m_timemin!=cool::ValidityKeyMin || m_timemax!=cool::ValidityKeyMax)
2471  std::cout << "Source timestamp range " << m_timemin << " " <<
2472  timeString(m_timemin) << "to " << m_timemax << " " <<
2473  timeString(m_timemax) << std::endl;
2474  if (m_alliov)
2475  std::cout << "Change o/p run/LB range [" << (m_newrunemin >> 32) << "," <<
2476  (m_newrunemin & 0xFFFFFFFF) << "] to [" << (m_newrunemax >> 32) << "," <<
2477  (m_newrunemax & 0xFFFFFFFF) << "]" << std::endl;
2478  if (m_alliov)
2479  std::cout << "Change o/p timestamp range " << m_newtimemin << " " <<
2480  timeString(m_newtimemin) << "to " << m_newtimemax << " " <<
2481  timeString(m_newtimemax) << std::endl;
2482  if (m_skipout) {
2483  std::cout << "Skip IOVs extending outside run/LB range [" <<
2484  (m_srunemin >> 32) << "," << (m_srunemin & 0xFFFFFFFF) << "] to [" <<
2485  (m_srunemax >> 32) << "," << (m_srunemax & 0xFFFFFFFF) << "]" <<
2486  std::endl;
2487  }
2488  if (!m_excludechans.empty()) {
2489  for (std::vector<cool::ChannelId>::const_iterator itr=
2490  m_excludechans.begin();itr!=m_excludechans.end();++itr)
2491  std::cout << "Channel " << *itr << " will be excluded" << std::endl;
2492  }
2493  if (m_hitag) std::cout << "All hierachical tags connecting to referenced tags will be copied" << std::endl;
2494  if (m_nohitag) std::cout << "Hierarchical tag relations will not be copied"
2495  << std::endl;
2496  return 0;
2497 }

◆ setupCatalog()

pool::IFileCatalog * AtlCoolCopy::setupCatalog ( const std::vector< std::string > &  catvec)
staticprivate

Definition at line 3320 of file AtlCoolCopy.cxx.

3321  {
3323  try {
3324  catalog->setWriteCatalog("file:PoolFileCatalog.xml");
3325  for (std::vector<std::string>::const_iterator icat=catvec.begin();
3326  icat!=catvec.end();++icat) {
3327  std::cout << "Add catalogue: " << *icat << std::endl;
3328  // if catalogue contains no ":" specifier, assume plain file
3329  if (icat->find(':')==std::string::npos) {
3330  catalog->addReadCatalog("file:"+(*icat));
3331  } else {
3332  catalog->addReadCatalog(*icat);
3333  }
3334  }
3335  catalog->connect();
3336  catalog->start();
3337  return catalog;
3338  }
3339  catch (std::exception& e) {
3340  std::cout << "Could not setup POOL catalogues, exception:" << e.what()
3341  << std::endl;
3342  return nullptr;
3343  }
3344 }

◆ tagParents()

int AtlCoolCopy::tagParents ( )
private

Definition at line 3036 of file AtlCoolCopy.cxx.

3036  {
3037  std::cout << "Copying additional hierarchical tags of parent folders"
3038  << std::endl;
3039  while (!m_hiparent.empty()) {
3040  // take first element and erase it
3041  std::string folderset=*m_hiparent.begin();
3042  m_hiparent.erase(m_hiparent.begin());
3043  // process any tags defined for this folderset
3044  if (m_sourceDbPtr->existsFolderSet(folderset)) {
3045  cool::IFolderSetPtr sourcefl=m_sourceDbPtr->getFolderSet(folderset);
3046  cool::IFolderSetPtr destfl=m_destDbPtr->getFolderSet(folderset);
3047  std::cout << "Processing folderset " << folderset << std::endl;
3048  for (HiTagMap::const_iterator imap=m_hitagmap.begin();
3049  imap!=m_hitagmap.end();++imap) {
3050  try {
3051  // will throw exception if this tag is not pointing to the folder
3052  std::string sourcetag=sourcefl->findTagRelation(imap->first);
3053  std::cout << "Create hierarchical tag between " << sourcetag <<
3054  " and " << imap->first << " in folder " << imap->second <<
3055  std::endl;
3056  try {
3057  // first check this relation has not already been created
3058  std::string etag=destfl->resolveTag(imap->first);
3059  if (etag==sourcetag) {
3060  std::cout << "This relation has already been created" << std::endl;
3061  } else {
3062  std::cout << "ERROR: Tag in parent already related to " <<
3063  etag << std::endl;
3064  return 34;
3065  }
3066  }
3067  catch (cool::Exception& e ) {
3068  // only do creation if does not already exist - via exception
3069  try {
3070  destfl->createTagRelation(imap->first,sourcetag);
3071  // check if this implicates yet another parent folder to be checked
3072  if (find(m_hiparent.begin(),m_hiparent.end(),imap->second)==
3073  m_hiparent.end()) m_hiparent.push_back(imap->second);
3074  if (m_copytaginfo &&
3075  m_cooltagmap.find(imap->first)==m_cooltagmap.end())
3076  m_cooltagmap.insert(CoolTagMap::value_type(imap->first,
3077  CoolTagInfo(m_sourceDbPtr,imap->second,imap->second,
3078  imap->first,imap->first)));
3079  }
3080  catch (cool::Exception& e) {
3081  std::cout << "Cool exception " << e.what() <<
3082  "thrown in hierarchical tag creation" << std::endl;
3083  return 34;
3084  }
3085  }
3086  }
3087  // exceptions from findTag - do nothing
3088  catch (cool::Exception& e) { }
3089  }
3090  } else {
3091  std::cout << "ERROR Folderset " << folderset << " not found" <<
3092  std::endl;
3093  }
3094  }
3095  return 0;
3096 }

◆ timeString()

std::string AtlCoolCopy::timeString ( const cool::ValidityKey  iovtime)
staticprivate

Definition at line 2573 of file AtlCoolCopy.cxx.

2573  {
2574  if (iovtime==cool::ValidityKeyMin) {
2575  return "ValidityKeyMin ";
2576  } else if (iovtime==cool::ValidityKeyMax) {
2577  return "ValidityKeyMax ";
2578  } else {
2579  time_t time=static_cast<time_t>(iovtime/1E9);
2580  struct tm result;
2581  char buf[32];
2582  return "UTC "+std::string(asctime_r(gmtime_r(&time, &result), buf));
2583  }
2584 }

◆ timeVal()

cool::ValidityKey AtlCoolCopy::timeVal ( const char *  input)
staticprivate

Definition at line 2542 of file AtlCoolCopy.cxx.

2542  {
2543  // convert input char* string to 64bit COOL validityKey
2544  // input either represents a string in seconds, or a date in the form
2545  // yyyy/mm/dd:hh:mm:ss
2546  // first determine if input is a number
2547  if (isNumeric(input)) {
2548  return static_cast<long long>(atol(input))*
2549  static_cast<long long>(1.E9);
2550  } else {
2551  struct tm mytm{},mytm2{};
2552  char* result=strptime(input,"%Y-%m-%d:%T",&mytm);
2553  if (result!=nullptr) {
2554  // make the DST field zero, so the time is interpreted without daylight
2555  // savings time
2556  mytm.tm_isdst=0;
2557  // now have to correct for the local time zone - do this by also
2558  // calculating the time since epoch for 2/1/1970 midnight (no DST)
2559  cool::ValidityKey itime=static_cast<cool::ValidityKey>(mktime(&mytm));
2560  strptime("1970-01-02:00:00:00","%Y-%m-%d:%T",&mytm2);
2561  cool::ValidityKey caltime=static_cast<cool::ValidityKey>(mktime(&mytm2));
2562  itime+=24*60*60-caltime;
2563  return itime*static_cast<cool::ValidityKey>(1.E9);
2564  } else {
2565  std::cout <<
2566  "ERROR in format of time value, use e.g. 2007-05-25:14:01:00" <<
2567  std::endl;
2568  return 0;
2569  }
2570  }
2571 }

◆ transConn()

std::string AtlCoolCopy::transConn ( const std::string &  inconn)
staticprivate

Definition at line 450 of file AtlCoolCopy.cxx.

450  {
451  // translate simple connection string (no slash) to mycool.db with given
452  // instance name, all others are left alone
453  if (inconn.find('/')==std::string::npos) {
454  return "sqlite://X;schema=mycool.db;dbname="+inconn;
455  } else {
456  return inconn;
457  }
458 }

◆ 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 1356 of file AtlCoolCopy.cxx.

1362  {
1363 
1364  std::cout << "Verifying tag " << sourcetag << " of folder " << folder <<
1365  std::endl;
1366  destfl->setPrefetchAll(false);
1367  cool::FolderVersioning::Mode vermode=sourcefl->versioningMode();
1368  int nobj=0;
1369  cool::IObjectIteratorPtr sourceitr,destitr;
1370  CoraCoolObjectIterPtr csourceitr,cdestitr;
1371  std::string tag=sourcetag;
1372  if (vermode==cool::FolderVersioning::SINGLE_VERSION || sourcetag=="HEAD")
1373  tag="";
1374  try {
1375  if (iscora) {
1376  sourceflc->setPrefetchAll(false);
1377  csourceitr=sourceflc->browseObjects(since,until,m_chansel,tag);
1378  cdestitr=destflc->browseObjects(since,until,m_chansel,tag);
1379  } else {
1380  sourceitr=sourcefl->browseObjects(since,until,m_chansel,tag);
1381  destitr=destfl->browseObjects(since,until,m_chansel,tag);
1382  }
1383  }
1384  catch (std::exception& e) {
1385  std::cout << "Exception thrown from verify iterator setup: " << e.what() <<
1386  std::endl;
1387  return 105;
1388  }
1389  try {
1390  // the check algorithm assumes the two databases will give back the
1391  // results of the query in the same order, which is currently the
1392  // case in COOL 1.3. If this changes, the verification will be more complex
1393  if (iscora) {
1394  const std::string& cfkey=sourceflc->coralFKey();
1395  const std::string& cpkey=sourceflc->coralPKey();
1396  while (csourceitr->hasNext()) {
1397  CoraCoolObjectPtr sobj=csourceitr->next();
1398  // check object should not be skipped as excluded channel
1399  if (!m_excludechans.empty()) {
1400  if (find(m_excludechans.begin(),m_excludechans.end(),
1401  sobj->channelId())!=m_excludechans.end()) {
1402  continue;
1403  }
1404  }
1405  if (cdestitr->hasNext()) {
1406  CoraCoolObjectPtr dobj=cdestitr->next();
1407  // check objects are the same
1408  int iret=0;
1409  // check IOV equality
1410  if (sobj->since()!=dobj->since() || sobj->until()!=dobj->until())
1411  iret=100;
1412  // check channel equality
1413  if (sobj->channelId()!=dobj->channelId())
1414  iret=101;
1415  // check size of payloads
1416  if (sobj->size()!=dobj->size()) {
1417  std::cout << "ERROR CoraCool object " << nobj <<
1418  " sizes do not match: " << sobj->size() << " " << dobj->size()
1419  << std::endl;
1420  iret=102;
1421  }
1422  // check payload equality (does not check attribute names)
1423  CoraCoolObject::const_iterator ditr=dobj->begin();
1424  for (CoraCoolObject::const_iterator sitr=sobj->begin();
1425  sitr!=sobj->end();++sitr,++ditr) {
1426  // loop over all the attributes, in order to skip PK and FK
1427  for (coral::AttributeList::const_iterator aitr=sitr->begin();
1428  aitr!=sitr->end();++aitr) {
1429  const std::string& aname=aitr->specification().name();
1430  if (aname!=cfkey && aname!=cpkey) {
1431  try {
1432  if (*aitr!=(*ditr)[aname]) {
1433  std::cout << "ERROR Values of attriute " << aname <<
1434  " differ" << std::endl;
1435  iret=102;
1436  }
1437  }
1438  catch (coral::AttributeListException& e) {
1439  std::cout << "ERROR: CoraCool attribute " << aname <<
1440  " not found in destination!" << std::endl;
1441  iret=102;
1442  }
1443  }
1444  }
1445  }
1446  if (iret!=0) {
1447  std::cout << "ERROR database entries do not match: since: " <<
1448  sobj->since() << "," << dobj->since() << " until: " <<
1449  sobj->until() << "," << dobj->until() << " channel: " <<
1450  sobj->channelId() << "," << dobj->channelId() << std::endl;
1451  return iret;
1452  }
1453  } else {
1454  std::cout <<
1455  "ERROR destination folder no matching CoraCool iterator for object "
1456  << nobj << std::endl;
1457  return 103;
1458  }
1459  ++ nobj;
1460  }
1461  } else {
1462  while (sourceitr->goToNext()) {
1463  const cool::IObject& sobj=sourceitr->currentRef();
1464  // check object should not be skipped as excluded channel
1465  if (!m_excludechans.empty()) {
1466  if (find(m_excludechans.begin(),m_excludechans.end(),
1467  sobj.channelId())!=m_excludechans.end()) {
1468  continue;
1469  }
1470  }
1471  if (checkrefs) checkRef(sobj.payload(),folder,sourcetag);
1472  if (destitr->goToNext()) {
1473  const cool::IObject& dobj=destitr->currentRef();
1474  // check objects are the same
1475  int iret=0;
1476  // check IOV equality
1477  if (sobj.since()!=dobj.since() || sobj.until()!=dobj.until())
1478  iret=100;
1479  // check channel equality
1480  if (sobj.channelId()!=dobj.channelId())
1481  iret=101;
1482  // check payload equality (does not check attribute names)
1483  // do not use cool::IRecord equality operator as does not correctly
1484  // handle null values
1485  if (paymode==cool::PayloadMode::VECTORPAYLOAD) {
1486  cool::IRecordIterator& spitr=sobj.payloadIterator();
1487  const cool::IRecordVectorPtr svptr=spitr.fetchAllAsVector();
1488  cool::IRecordIterator& dpitr=dobj.payloadIterator();
1489  const cool::IRecordVectorPtr dvptr=dpitr.fetchAllAsVector();
1490  if (svptr->size()!=dvptr->size()) {
1491  iret=102;
1492  } else {
1493  // loop through the payloads, checking equality - assumes
1494  // order is significant and same in source and destination DBs
1495  cool::IRecordVector::const_iterator svitr=svptr->begin();
1496  cool::IRecordVector::const_iterator svend=svptr->end();
1497  cool::IRecordVector::const_iterator dvitr=dvptr->begin();
1498  for (;svitr!=svend;++svitr,++dvitr) {
1499  if (!equalRecord(**svitr,**dvitr)) iret=102;
1500  }
1501  }
1502  if (iret!=0) {
1503  std::cout << "ERROR vector payloads do not match (size " << svptr->size() << "," << dvptr->size() << ")" << std::endl;
1504  }
1505 
1506  } else {
1507  // standard COOL folder - simple check of payloads
1508  if (!equalRecord(sobj.payload(),dobj.payload())) iret=102;
1509  }
1510 
1511  if (iret!=0) {
1512  std::cout << "ERROR database entries do not match: since: " <<
1513  sobj.since() << "," << dobj.since() << " until: " <<
1514  sobj.until() << "," << dobj.until() << " channel: " <<
1515  sobj.channelId() << "," << dobj.channelId() << std::endl;
1516  std::cout << "Source payload:" << std::endl;
1517  sobj.payload().attributeList().toOutputStream(std::cout);
1518  std::cout << std::endl << "Destination payload:" << std::endl;
1519  dobj.payload().attributeList().toOutputStream(std::cout);
1520  std::cout << std::endl;
1521  return iret;
1522  }
1523  } else {
1524  std::cout <<
1525  "ERROR destination folder no matching iterator for object "
1526  << nobj << std::endl;
1527  return 103;
1528  }
1529  ++nobj;
1530  }
1531  }
1532  }
1533  catch (cool::Exception& e) {
1534  std::cout << "Exception thrown from verify loop: " << e.what() <<
1535  std::endl;
1536  return 104;
1537  }
1538  // finished with the iterators
1539  if (iscora) {
1540  } else {
1541  sourceitr->close();
1542  destitr->close();
1543  }
1544  std::cout << "Verification of folder " << folder << " tag " <<
1545  sourcetag << " OK (" << nobj << " objects)" << std::endl;
1546  return 0;
1547 }

◆ writeTagInfo()

int AtlCoolCopy::writeTagInfo ( )
private

Definition at line 3098 of file AtlCoolCopy.cxx.

3098  {
3099  std::cout << "Write tag description ";
3100  if (m_copytaglock) std::cout << "and lock info ";
3101  std::cout << "for " << m_cooltagmap.size() << " tags" << std::endl;
3102  for (CoolTagMap::const_iterator itr=m_cooltagmap.begin();
3103  itr!=m_cooltagmap.end();++itr) {
3104  itr->second.write(m_destDbPtr,m_copytaglock);
3105  }
3106  return 0;
3107 }

Member Data Documentation

◆ m_addguid

std::vector<std::string> AtlCoolCopy::m_addguid
private

Definition at line 245 of file AtlCoolCopy.cxx.

◆ m_addlfn

std::vector<std::string> AtlCoolCopy::m_addlfn
private

Definition at line 246 of file AtlCoolCopy.cxx.

◆ m_alliov

bool AtlCoolCopy::m_alliov
private

Definition at line 181 of file AtlCoolCopy.cxx.

◆ m_allowcreate

bool AtlCoolCopy::m_allowcreate
private

Definition at line 174 of file AtlCoolCopy.cxx.

◆ m_anadelt

long long AtlCoolCopy::m_anadelt
private

Definition at line 237 of file AtlCoolCopy.cxx.

◆ m_analyse

bool AtlCoolCopy::m_analyse
private

Definition at line 185 of file AtlCoolCopy.cxx.

◆ m_applock

bool AtlCoolCopy::m_applock
private

Definition at line 206 of file AtlCoolCopy.cxx.

◆ m_applocksv

bool AtlCoolCopy::m_applocksv
private

Definition at line 207 of file AtlCoolCopy.cxx.

◆ m_bufsize

int AtlCoolCopy::m_bufsize
private

Definition at line 235 of file AtlCoolCopy.cxx.

◆ m_channel1

std::string AtlCoolCopy::m_channel1
private

Definition at line 233 of file AtlCoolCopy.cxx.

◆ m_channel2

std::string AtlCoolCopy::m_channel2
private

Definition at line 234 of file AtlCoolCopy.cxx.

◆ m_channelRange

std::vector<std::string> AtlCoolCopy::m_channelRange
private

Definition at line 232 of file AtlCoolCopy.cxx.

◆ m_chansel

cool::ChannelSelection AtlCoolCopy::m_chansel
private

Definition at line 268 of file AtlCoolCopy.cxx.

◆ m_chdesc

bool AtlCoolCopy::m_chdesc
private

Definition at line 193 of file AtlCoolCopy.cxx.

◆ m_checkdesttag

bool AtlCoolCopy::m_checkdesttag
private

Definition at line 220 of file AtlCoolCopy.cxx.

◆ m_checkoutputfile

std::string AtlCoolCopy::m_checkoutputfile
private

Definition at line 241 of file AtlCoolCopy.cxx.

◆ m_checkrefs

bool AtlCoolCopy::m_checkrefs
private

Definition at line 186 of file AtlCoolCopy.cxx.

◆ m_coolapp

cool::Application AtlCoolCopy::m_coolapp
private

Definition at line 254 of file AtlCoolCopy.cxx.

◆ m_cooltagmap

CoolTagMap AtlCoolCopy::m_cooltagmap
private

Definition at line 280 of file AtlCoolCopy.cxx.

◆ m_copytaginfo

bool AtlCoolCopy::m_copytaginfo
private

Definition at line 215 of file AtlCoolCopy.cxx.

◆ m_copytaglock

bool AtlCoolCopy::m_copytaglock
private

Definition at line 216 of file AtlCoolCopy.cxx.

◆ m_coracool

bool AtlCoolCopy::m_coracool
private

Definition at line 217 of file AtlCoolCopy.cxx.

◆ m_coralsvc

coral::ConnectionService AtlCoolCopy::m_coralsvc
private

Definition at line 253 of file AtlCoolCopy.cxx.

◆ m_dbSvc

cool::IDatabaseSvc* AtlCoolCopy::m_dbSvc
private

Definition at line 255 of file AtlCoolCopy.cxx.

◆ m_debug

bool AtlCoolCopy::m_debug
private

Definition at line 180 of file AtlCoolCopy.cxx.

◆ m_destCoraPtr

CoraCoolDatabasePtr AtlCoolCopy::m_destCoraPtr
private

Definition at line 260 of file AtlCoolCopy.cxx.

◆ m_destdb

std::string AtlCoolCopy::m_destdb
private

Definition at line 173 of file AtlCoolCopy.cxx.

◆ m_destDbPtr

cool::IDatabasePtr AtlCoolCopy::m_destDbPtr
private

Definition at line 258 of file AtlCoolCopy.cxx.

◆ m_excludechans

std::vector<cool::ChannelId> AtlCoolCopy::m_excludechans
private

Definition at line 248 of file AtlCoolCopy.cxx.

◆ m_excludehead

bool AtlCoolCopy::m_excludehead
private

Definition at line 177 of file AtlCoolCopy.cxx.

◆ m_folderexcl

std::vector<std::string> AtlCoolCopy::m_folderexcl
private

Definition at line 262 of file AtlCoolCopy.cxx.

◆ m_folderlist

std::vector<std::string> AtlCoolCopy::m_folderlist
private

Definition at line 261 of file AtlCoolCopy.cxx.

◆ m_forcemulti

bool AtlCoolCopy::m_forcemulti
private

Definition at line 197 of file AtlCoolCopy.cxx.

◆ m_forcenopay

bool AtlCoolCopy::m_forcenopay
private

Definition at line 201 of file AtlCoolCopy.cxx.

◆ m_forcepay

bool AtlCoolCopy::m_forcepay
private

Definition at line 200 of file AtlCoolCopy.cxx.

◆ m_forcerune

bool AtlCoolCopy::m_forcerune
private

Definition at line 198 of file AtlCoolCopy.cxx.

◆ m_forcesingle

bool AtlCoolCopy::m_forcesingle
private

Definition at line 196 of file AtlCoolCopy.cxx.

◆ m_forcetime

bool AtlCoolCopy::m_forcetime
private

Definition at line 199 of file AtlCoolCopy.cxx.

◆ m_getbulk

bool AtlCoolCopy::m_getbulk
private

Definition at line 212 of file AtlCoolCopy.cxx.

◆ m_getonline

bool AtlCoolCopy::m_getonline
private

Definition at line 210 of file AtlCoolCopy.cxx.

◆ m_gettime

bool AtlCoolCopy::m_gettime
private

Definition at line 209 of file AtlCoolCopy.cxx.

◆ m_hiparent

std::vector<std::string> AtlCoolCopy::m_hiparent
private

Definition at line 276 of file AtlCoolCopy.cxx.

◆ m_hitag

bool AtlCoolCopy::m_hitag
private

Definition at line 194 of file AtlCoolCopy.cxx.

◆ m_hitagmap

HiTagMap AtlCoolCopy::m_hitagmap
private

Definition at line 274 of file AtlCoolCopy.cxx.

◆ m_ignoremode

bool AtlCoolCopy::m_ignoremode
private

Definition at line 218 of file AtlCoolCopy.cxx.

◆ m_ignorespec

bool AtlCoolCopy::m_ignorespec
private

Definition at line 219 of file AtlCoolCopy.cxx.

◆ m_includehead

bool AtlCoolCopy::m_includehead
private

Definition at line 176 of file AtlCoolCopy.cxx.

◆ m_listpfn

bool AtlCoolCopy::m_listpfn
private

Definition at line 187 of file AtlCoolCopy.cxx.

◆ m_lockedonly

bool AtlCoolCopy::m_lockedonly
private

Definition at line 214 of file AtlCoolCopy.cxx.

◆ m_magic

std::vector<std::string> AtlCoolCopy::m_magic
private

Definition at line 264 of file AtlCoolCopy.cxx.

◆ m_mergecat

std::vector<std::string> AtlCoolCopy::m_mergecat
private

Definition at line 266 of file AtlCoolCopy.cxx.

◆ m_newdataset

std::string AtlCoolCopy::m_newdataset
private

Definition at line 240 of file AtlCoolCopy.cxx.

◆ m_newrunemax

cool::ValidityKey AtlCoolCopy::m_newrunemax
private

Definition at line 227 of file AtlCoolCopy.cxx.

◆ m_newrunemin

cool::ValidityKey AtlCoolCopy::m_newrunemin
private

Definition at line 226 of file AtlCoolCopy.cxx.

◆ m_newtimemax

cool::ValidityKey AtlCoolCopy::m_newtimemax
private

Definition at line 229 of file AtlCoolCopy.cxx.

◆ m_newtimemin

cool::ValidityKey AtlCoolCopy::m_newtimemin
private

Definition at line 228 of file AtlCoolCopy.cxx.

◆ m_nochannel

bool AtlCoolCopy::m_nochannel
private

Definition at line 192 of file AtlCoolCopy.cxx.

◆ m_noclobroot

bool AtlCoolCopy::m_noclobroot
private

Definition at line 221 of file AtlCoolCopy.cxx.

◆ m_nocopy

bool AtlCoolCopy::m_nocopy
private

Definition at line 190 of file AtlCoolCopy.cxx.

◆ m_nodata

bool AtlCoolCopy::m_nodata
private

Definition at line 191 of file AtlCoolCopy.cxx.

◆ m_nohitag

bool AtlCoolCopy::m_nohitag
private

Definition at line 195 of file AtlCoolCopy.cxx.

◆ m_nt_bufferptr

std::vector<void*> AtlCoolCopy::m_nt_bufferptr
private

Definition at line 294 of file AtlCoolCopy.cxx.

◆ m_nt_channel

UInt_t AtlCoolCopy::m_nt_channel = 0
private

Definition at line 291 of file AtlCoolCopy.cxx.

◆ m_nt_lbsince

UInt_t AtlCoolCopy::m_nt_lbsince = 0
private

Definition at line 289 of file AtlCoolCopy.cxx.

◆ m_nt_lbuntil

UInt_t AtlCoolCopy::m_nt_lbuntil = 0
private

Definition at line 290 of file AtlCoolCopy.cxx.

◆ m_nt_runsince

UInt_t AtlCoolCopy::m_nt_runsince = 0
private

Definition at line 287 of file AtlCoolCopy.cxx.

◆ m_nt_rununtil

UInt_t AtlCoolCopy::m_nt_rununtil = 0
private

Definition at line 288 of file AtlCoolCopy.cxx.

◆ m_nt_since

ULong64_t AtlCoolCopy::m_nt_since = 0
private

Definition at line 285 of file AtlCoolCopy.cxx.

◆ m_nt_tagid

char AtlCoolCopy::m_nt_tagid[256] = {0}
private

Definition at line 292 of file AtlCoolCopy.cxx.

◆ m_nt_treename

std::string AtlCoolCopy::m_nt_treename
private

Definition at line 293 of file AtlCoolCopy.cxx.

◆ m_nt_until

ULong64_t AtlCoolCopy::m_nt_until = 0
private

Definition at line 286 of file AtlCoolCopy.cxx.

◆ m_onlinerun

bool AtlCoolCopy::m_onlinerun
private

Definition at line 211 of file AtlCoolCopy.cxx.

◆ m_open

bool AtlCoolCopy::m_open
private

Definition at line 267 of file AtlCoolCopy.cxx.

◆ m_outfolder

std::string AtlCoolCopy::m_outfolder
private

Definition at line 238 of file AtlCoolCopy.cxx.

◆ m_outtag

std::string AtlCoolCopy::m_outtag
private

Definition at line 239 of file AtlCoolCopy.cxx.

◆ m_parfile

std::vector<std::string> AtlCoolCopy::m_parfile
private

Definition at line 247 of file AtlCoolCopy.cxx.

◆ m_poolall

bool AtlCoolCopy::m_poolall
private

Definition at line 189 of file AtlCoolCopy.cxx.

◆ m_poolcat

std::vector<std::string> AtlCoolCopy::m_poolcat
private

Definition at line 265 of file AtlCoolCopy.cxx.

◆ m_poollast

PoolMap::iterator AtlCoolCopy::m_poollast
private

Definition at line 270 of file AtlCoolCopy.cxx.

◆ m_poolopen

bool AtlCoolCopy::m_poolopen
private

Definition at line 188 of file AtlCoolCopy.cxx.

◆ m_poolrefs

PoolMap AtlCoolCopy::m_poolrefs
private

Definition at line 271 of file AtlCoolCopy.cxx.

◆ m_prunetags

bool AtlCoolCopy::m_prunetags
private

Definition at line 213 of file AtlCoolCopy.cxx.

◆ m_readoracle

bool AtlCoolCopy::m_readoracle
private

Definition at line 208 of file AtlCoolCopy.cxx.

◆ m_recreate

bool AtlCoolCopy::m_recreate
private

Definition at line 175 of file AtlCoolCopy.cxx.

◆ m_repsort

ReplicaSorter* AtlCoolCopy::m_repsort
private

Definition at line 256 of file AtlCoolCopy.cxx.

◆ m_root

bool AtlCoolCopy::m_root
private

Definition at line 183 of file AtlCoolCopy.cxx.

◆ m_runemax

cool::ValidityKey AtlCoolCopy::m_runemax
private

Definition at line 223 of file AtlCoolCopy.cxx.

◆ m_runemin

cool::ValidityKey AtlCoolCopy::m_runemin
private

Definition at line 222 of file AtlCoolCopy.cxx.

◆ m_runfile

std::vector<std::string> AtlCoolCopy::m_runfile
private

Definition at line 249 of file AtlCoolCopy.cxx.

◆ m_runinfohost

std::string AtlCoolCopy::m_runinfohost
private

Definition at line 244 of file AtlCoolCopy.cxx.

◆ m_runlist

std::vector<unsigned int> AtlCoolCopy::m_runlist
private

Definition at line 250 of file AtlCoolCopy.cxx.

◆ m_sealmsg

int AtlCoolCopy::m_sealmsg
private

Definition at line 236 of file AtlCoolCopy.cxx.

◆ m_skipout

bool AtlCoolCopy::m_skipout
private

Definition at line 204 of file AtlCoolCopy.cxx.

◆ m_skiprep

bool AtlCoolCopy::m_skiprep
private

Definition at line 205 of file AtlCoolCopy.cxx.

◆ m_sourceCoraPtr

CoraCoolDatabasePtr AtlCoolCopy::m_sourceCoraPtr
private

Definition at line 259 of file AtlCoolCopy.cxx.

◆ m_sourcedb

std::string AtlCoolCopy::m_sourcedb
private

Definition at line 172 of file AtlCoolCopy.cxx.

◆ m_sourceDbPtr

cool::IDatabasePtr AtlCoolCopy::m_sourceDbPtr
private

Definition at line 257 of file AtlCoolCopy.cxx.

◆ m_sourceread

bool AtlCoolCopy::m_sourceread
private

Definition at line 202 of file AtlCoolCopy.cxx.

◆ m_srunemax

cool::ValidityKey AtlCoolCopy::m_srunemax
private

Definition at line 231 of file AtlCoolCopy.cxx.

◆ m_srunemin

cool::ValidityKey AtlCoolCopy::m_srunemin
private

Definition at line 230 of file AtlCoolCopy.cxx.

◆ m_taglabel

std::string AtlCoolCopy::m_taglabel
private

Definition at line 243 of file AtlCoolCopy.cxx.

◆ m_tags

std::vector<std::string> AtlCoolCopy::m_tags
private

Definition at line 263 of file AtlCoolCopy.cxx.

◆ m_timedb

std::string AtlCoolCopy::m_timedb
private

Definition at line 242 of file AtlCoolCopy.cxx.

◆ m_timemax

cool::ValidityKey AtlCoolCopy::m_timemax
private

Definition at line 225 of file AtlCoolCopy.cxx.

◆ m_timemin

cool::ValidityKey AtlCoolCopy::m_timemin
private

Definition at line 224 of file AtlCoolCopy.cxx.

◆ m_truncate

bool AtlCoolCopy::m_truncate
private

Definition at line 203 of file AtlCoolCopy.cxx.

◆ m_usertags

bool AtlCoolCopy::m_usertags
private

Definition at line 178 of file AtlCoolCopy.cxx.

◆ m_userupdatehead

bool AtlCoolCopy::m_userupdatehead
private

Definition at line 179 of file AtlCoolCopy.cxx.

◆ m_verify

bool AtlCoolCopy::m_verify
private

Definition at line 182 of file AtlCoolCopy.cxx.

◆ m_zeronull

bool AtlCoolCopy::m_zeronull
private

Definition at line 184 of file AtlCoolCopy.cxx.

◆ p_rootfile

TFile* AtlCoolCopy::p_rootfile
private

Definition at line 282 of file AtlCoolCopy.cxx.


The documentation for this class was generated from the following file:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
AtlCoolCopy::runLBVal
static cool::ValidityKey runLBVal(const char *input1, const char *input2)
Definition: AtlCoolCopy.cxx:2586
AtlCoolCopy::channelID
static cool::ChannelId channelID(const cool::IFolderPtr &folder, const std::string &chanstring)
Definition: AtlCoolCopy.cxx:856
AtlCoolCopy::m_skipout
bool m_skipout
Definition: AtlCoolCopy.cxx:204
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
AtlCoolCopy::rootWrite
void rootWrite(void *sptr, const cool::IField &field) const
Definition: AtlCoolCopy.cxx:1772
AtlCoolCopy::m_magic
std::vector< std::string > m_magic
Definition: AtlCoolCopy.cxx:264
AtlCoolCopy::m_getbulk
bool m_getbulk
Definition: AtlCoolCopy.cxx:212
AtlCoolCopy::m_nt_rununtil
UInt_t m_nt_rununtil
Definition: AtlCoolCopy.cxx:288
checkFileSG.line
line
Definition: checkFileSG.py:75
xAOD::short
short
Definition: Vertex_v1.cxx:165
AtlCoolCopy::m_outtag
std::string m_outtag
Definition: AtlCoolCopy.cxx:239
get_generator_info.result
result
Definition: get_generator_info.py:21
AtlCoolCopy::m_channel1
std::string m_channel1
Definition: AtlCoolCopy.cxx:233
python.rtime.rtime
def rtime(fn, *args, **kw)
Definition: rtime.py:15
AtlCoolCopy::m_verify
bool m_verify
Definition: AtlCoolCopy.cxx:182
AtlCoolCopy::m_nt_lbuntil
UInt_t m_nt_lbuntil
Definition: AtlCoolCopy.cxx:290
AtlCoolCopy::m_srunemax
cool::ValidityKey m_srunemax
Definition: AtlCoolCopy.cxx:231
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CoraCoolDatabase
Definition: CoraCoolDatabase.h:24
AtlCoolCopy::m_coralsvc
coral::ConnectionService m_coralsvc
Definition: AtlCoolCopy.cxx:253
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
json
nlohmann::json json
Definition: HistogramDef.cxx:9
AtlCoolCopy::m_copytaglock
bool m_copytaglock
Definition: AtlCoolCopy.cxx:216
AtlCoolCopy::getTimeFromRun
bool getTimeFromRun()
Definition: AtlCoolCopy.cxx:2605
response
MDT_Response response
Definition: MDT_ResponseTest.cxx:28
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
AtlCoolCopy::m_readoracle
bool m_readoracle
Definition: AtlCoolCopy.cxx:208
AtlCoolCopy::m_destdb
std::string m_destdb
Definition: AtlCoolCopy.cxx:173
AtlCoolCopy::m_repsort
ReplicaSorter * m_repsort
Definition: AtlCoolCopy.cxx:256
AtlCoolCopy::m_getonline
bool m_getonline
Definition: AtlCoolCopy.cxx:210
mergePhysValFiles.newfolder
newfolder
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:83
AtlCoolCopy::m_checkoutputfile
std::string m_checkoutputfile
Definition: AtlCoolCopy.cxx:241
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
parse
std::map< std::string, std::string > parse(const std::string &list)
Definition: egammaLayerRecalibTool.cxx:1054
extractSporadic.c1
c1
Definition: extractSporadic.py:134
tree
TChain * tree
Definition: tile_monitor.h:30
AtlCoolCopy::m_excludehead
bool m_excludehead
Definition: AtlCoolCopy.cxx:177
dirname
std::string dirname(std::string name)
Definition: utils.cxx:200
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
AtlCoolCopy::rootDirs
std::string rootDirs(const std::string &folder, const std::string &toproot)
Definition: AtlCoolCopy.cxx:1682
AtlCoolCopy::m_truncate
bool m_truncate
Definition: AtlCoolCopy.cxx:203
AtlCoolCopy::m_timemax
cool::ValidityKey m_timemax
Definition: AtlCoolCopy.cxx:225
bin
Definition: BinsDiffFromStripMedian.h:43
AtlCoolCopy::m_hitag
bool m_hitag
Definition: AtlCoolCopy.cxx:194
AtlCoolCopy::m_chansel
cool::ChannelSelection m_chansel
Definition: AtlCoolCopy.cxx:268
PlotCalibFromCool.nchan
nchan
Definition: PlotCalibFromCool.py:564
AtlCoolCopy::openConnections
bool openConnections(const std::string &sourcedb, const std::string &destdb, bool allowcreate)
Definition: AtlCoolCopy.cxx:340
AtlCoolCopy::m_userupdatehead
bool m_userupdatehead
Definition: AtlCoolCopy.cxx:179
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
AtlCoolCopy::m_parfile
std::vector< std::string > m_parfile
Definition: AtlCoolCopy.cxx:247
AtlCoolCopy::m_hitagmap
HiTagMap m_hitagmap
Definition: AtlCoolCopy.cxx:274
AtlCoolCopy::m_dbSvc
cool::IDatabaseSvc * m_dbSvc
Definition: AtlCoolCopy.cxx:255
exclude
std::set< std::string > exclude
list of directories to be excluded
Definition: hcg.cxx:95
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
AtlCoolCopy::m_newrunemin
cool::ValidityKey m_newrunemin
Definition: AtlCoolCopy.cxx:226
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
AtlCoolCopy::m_usertags
bool m_usertags
Definition: AtlCoolCopy.cxx:178
AtlCoolCopy::m_srunemin
cool::ValidityKey m_srunemin
Definition: AtlCoolCopy.cxx:230
AtlCoolCopy::m_sourcedb
std::string m_sourcedb
Definition: AtlCoolCopy.cxx:172
CaloSwCorrections.gap
def gap(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:212
AtlCoolCopy::m_forcemulti
bool m_forcemulti
Definition: AtlCoolCopy.cxx:197
physics_parameters.url
string url
Definition: physics_parameters.py:27
AtlCoolCopy::equalRecord
static bool equalRecord(const cool::IRecord &lhs, const cool::IRecord &rhs)
Definition: AtlCoolCopy.cxx:2510
AtlCoolCopy::m_ignoremode
bool m_ignoremode
Definition: AtlCoolCopy.cxx:218
atlasStyleMacro.icol
int icol
Definition: atlasStyleMacro.py:13
AtlCoolCopy::m_newtimemax
cool::ValidityKey m_newtimemax
Definition: AtlCoolCopy.cxx:229
dq_defect_copy_defect_database.channels
def channels
Definition: dq_defect_copy_defect_database.py:56
AtlCoolCopy::timeVal
static cool::ValidityKey timeVal(const char *input)
Definition: AtlCoolCopy.cxx:2542
AtlCoolCopy::m_coracool
bool m_coracool
Definition: AtlCoolCopy.cxx:217
AtlCoolCopy::m_applocksv
bool m_applocksv
Definition: AtlCoolCopy.cxx:207
python.Dumpers.aname
string aname
Definition: Dumpers.py:5546
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
AtlCoolCopy::m_forcesingle
bool m_forcesingle
Definition: AtlCoolCopy.cxx:196
AtlCoolCopy::m_gettime
bool m_gettime
Definition: AtlCoolCopy.cxx:209
AtlCoolCopy::checkRef
void checkRef(const cool::IRecord &payload, const std::string &folder, const std::string &tag)
Definition: AtlCoolCopy.cxx:2999
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
AtlCoolCopy::m_checkrefs
bool m_checkrefs
Definition: AtlCoolCopy.cxx:186
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AtlCoolCopy::m_poolrefs
PoolMap m_poolrefs
Definition: AtlCoolCopy.cxx:271
skel.input1
tuple input1
Definition: skel.GENtoEVGEN.py:750
AtlCoolCopy::m_nt_lbsince
UInt_t m_nt_lbsince
Definition: AtlCoolCopy.cxx:289
AtlCoolCopy::m_newrunemax
cool::ValidityKey m_newrunemax
Definition: AtlCoolCopy.cxx:227
CoraCoolObject::const_iterator
AttrListVec::const_iterator const_iterator
Definition: CoraCoolObject.h:23
AtlCoolCopy::m_nt_since
ULong64_t m_nt_since
Definition: AtlCoolCopy.cxx:285
AtlCoolCopy::m_nohitag
bool m_nohitag
Definition: AtlCoolCopy.cxx:195
pool::IFileCatalog
Definition: IFileCatalog.h:23
AtlCoolCopy::m_open
bool m_open
Definition: AtlCoolCopy.cxx:267
CaloCondBlobAlgs_fillNoiseFromASCII.desc
desc
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:54
AtlCoolCopy::m_poolall
bool m_poolall
Definition: AtlCoolCopy.cxx:189
AtlCoolCopy::m_nt_runsince
UInt_t m_nt_runsince
Definition: AtlCoolCopy.cxx:287
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
AtlCoolCopy::m_skiprep
bool m_skiprep
Definition: AtlCoolCopy.cxx:205
lumiFormat.i
int i
Definition: lumiFormat.py:85
python.DecayParser.buf
buf
print ("=> [%s]"cmd)
Definition: DecayParser.py:27
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
python.LArBadChannelDBAlg.xFFFFFFFF
xFFFFFFFF
Definition: LArBadChannelDBAlg.py:73
AtlCoolCopy::m_alliov
bool m_alliov
Definition: AtlCoolCopy.cxx:181
AtlCoolCopy::m_nt_until
ULong64_t m_nt_until
Definition: AtlCoolCopy.cxx:286
AtlCoolCopy::m_channelRange
std::vector< std::string > m_channelRange
Definition: AtlCoolCopy.cxx:232
AtlCoolCopy::m_channel2
std::string m_channel2
Definition: AtlCoolCopy.cxx:234
AtlCoolCopy::m_ignorespec
bool m_ignorespec
Definition: AtlCoolCopy.cxx:219
AtlCoolCopy::m_checkdesttag
bool m_checkdesttag
Definition: AtlCoolCopy.cxx:220
AtlCoolCopy::m_poolcat
std::vector< std::string > m_poolcat
Definition: AtlCoolCopy.cxx:265
pool::IFileCatalog::start
void start()
redirect to init() for Gaudi FC
Definition: IFileCatalog.h:45
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
calibdata.exception
exception
Definition: calibdata.py:496
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
AtlCoolCopy::m_sourceread
bool m_sourceread
Definition: AtlCoolCopy.cxx:202
AtlCoolCopy::m_debug
bool m_debug
Definition: AtlCoolCopy.cxx:180
file
TFile * file
Definition: tile_monitor.h:29
AtlCoolCopy::m_excludechans
std::vector< cool::ChannelId > m_excludechans
Definition: AtlCoolCopy.cxx:248
AtlCoolCopy::m_outfolder
std::string m_outfolder
Definition: AtlCoolCopy.cxx:238
Preparation.mode
mode
Definition: Preparation.py:94
pool::IFileCatalog::setWriteCatalog
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
run
Definition: run.py:1
AtlCoolCopy::m_lockedonly
bool m_lockedonly
Definition: AtlCoolCopy.cxx:214
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
AtlCoolCopy::m_coolapp
cool::Application m_coolapp
Definition: AtlCoolCopy.cxx:254
AtlCoolCopy::m_listpfn
bool m_listpfn
Definition: AtlCoolCopy.cxx:187
AtlCoolCopy::procOptVector
bool procOptVector(const int argc, const char *argv[], std::vector< std::string > &folders)
Definition: AtlCoolCopy.cxx:2132
AtlCoolCopy::m_forcerune
bool m_forcerune
Definition: AtlCoolCopy.cxx:198
AtlCoolCopy::m_sourceDbPtr
cool::IDatabasePtr m_sourceDbPtr
Definition: AtlCoolCopy.cxx:257
pool::IFileCatalog::connect
void connect()
Definition: IFileCatalog.h:39
AtlCoolCopy::m_runemax
cool::ValidityKey m_runemax
Definition: AtlCoolCopy.cxx:223
AtlCoolCopy::m_folderlist
std::vector< std::string > m_folderlist
Definition: AtlCoolCopy.cxx:261
AtlCoolCopy::m_poolopen
bool m_poolopen
Definition: AtlCoolCopy.cxx:188
AtlCoolCopy::m_runlist
std::vector< unsigned int > m_runlist
Definition: AtlCoolCopy.cxx:250
CxxUtils::atof
double atof(std::string_view str)
Converts a string into a double / float.
Definition: Control/CxxUtils/Root/StringUtils.cxx:91
grepfile.ic
int ic
Definition: grepfile.py:33
AtlCoolCopy::m_onlinerun
bool m_onlinerun
Definition: AtlCoolCopy.cxx:211
CoraCoolDatabasePtr
boost::shared_ptr< CoraCoolDatabase > CoraCoolDatabasePtr
Definition: CoraCoolTypes.h:12
AtlCoolCopy::m_sealmsg
int m_sealmsg
Definition: AtlCoolCopy.cxx:236
AtlCoolCopy::m_sourceCoraPtr
CoraCoolDatabasePtr m_sourceCoraPtr
Definition: AtlCoolCopy.cxx:259
AtlCoolCopy::m_applock
bool m_applock
Definition: AtlCoolCopy.cxx:206
AtlCoolCopy::m_taglabel
std::string m_taglabel
Definition: AtlCoolCopy.cxx:243
AtlCoolCopy::m_timemin
cool::ValidityKey m_timemin
Definition: AtlCoolCopy.cxx:224
defineDB.ichan
int ichan
Definition: JetTagCalibration/share/defineDB.py:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolCopy::m_destDbPtr
cool::IDatabasePtr m_destDbPtr
Definition: AtlCoolCopy.cxx:258
AtlCoolCopy::m_nt_bufferptr
std::vector< void * > m_nt_bufferptr
Definition: AtlCoolCopy.cxx:294
AtlCoolCopy::getBulkRun
bool getBulkRun()
Definition: AtlCoolCopy.cxx:2782
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
AtlCoolCopy::m_runemin
cool::ValidityKey m_runemin
Definition: AtlCoolCopy.cxx:222
AtlCoolCopy::m_prunetags
bool m_prunetags
Definition: AtlCoolCopy.cxx:213
AtlCoolCopy::p_rootfile
TFile * p_rootfile
Definition: AtlCoolCopy.cxx:282
AtlCoolCopy::m_bufsize
int m_bufsize
Definition: AtlCoolCopy.cxx:235
AtlCoolCopy::m_timedb
std::string m_timedb
Definition: AtlCoolCopy.cxx:242
AtlCoolCopy::m_analyse
bool m_analyse
Definition: AtlCoolCopy.cxx:185
AtlCoolCopy::m_poollast
PoolMap::iterator m_poollast
Definition: AtlCoolCopy.cxx:270
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
AtlCoolCopy::m_tags
std::vector< std::string > m_tags
Definition: AtlCoolCopy.cxx:263
AtlCoolCopy::m_nochannel
bool m_nochannel
Definition: AtlCoolCopy.cxx:192
AtlCoolCopy::m_mergecat
std::vector< std::string > m_mergecat
Definition: AtlCoolCopy.cxx:266
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
AtlCoolCopy::m_runinfohost
std::string m_runinfohost
Definition: AtlCoolCopy.cxx:244
CoolTagInfo
Definition: CoolTagInfo.h:16
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
AtlCoolCopy::m_nt_tagid
char m_nt_tagid[256]
Definition: AtlCoolCopy.cxx:292
AtlCoolCopy::m_forcepay
bool m_forcepay
Definition: AtlCoolCopy.cxx:200
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
AtlCoolCopy::m_nodata
bool m_nodata
Definition: AtlCoolCopy.cxx:191
AtlCoolCopy::bookOrFindTH1F
static TH1F * bookOrFindTH1F(const std::string &hID, const std::string &htitle, const int chan, const float xlow, const float xhigh)
Definition: AtlCoolCopy.cxx:2079
AtlCoolCopy::m_runfile
std::vector< std::string > m_runfile
Definition: AtlCoolCopy.cxx:249
Athena::Status
Status
Athena specific StatusCode values.
Definition: AthStatusCode.h:22
CoraCoolObjectIterPtr
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
Definition: CoraCoolTypes.h:21
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CaloCellTimeCorrFiller.foldertag
string foldertag
Definition: CaloCellTimeCorrFiller.py:21
makeDTCalibBlob_pickPhase.folders
folders
Definition: makeDTCalibBlob_pickPhase.py:346
std::sort
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.
Definition: DVL_algorithms.h:623
AtlCoolCopy::addFolder
bool addFolder(const std::string &folder, const bool onlyTags)
Definition: AtlCoolCopy.cxx:461
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
AtlCoolCopy::m_cooltagmap
CoolTagMap m_cooltagmap
Definition: AtlCoolCopy.cxx:280
AtlCoolCopy::m_copytaginfo
bool m_copytaginfo
Definition: AtlCoolCopy.cxx:215
AtlCoolCopy::transConn
static std::string transConn(const std::string &inconn)
Definition: AtlCoolCopy.cxx:450
AtlCoolCopy::m_includehead
bool m_includehead
Definition: AtlCoolCopy.cxx:176
AtlCoolCopy::getRunList
bool getRunList()
Definition: AtlCoolCopy.cxx:2874
CoraCoolObjectPtr
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
Definition: CoraCoolTypes.h:18
AtlCoolCopy::m_newdataset
std::string m_newdataset
Definition: AtlCoolCopy.cxx:240
AtlCoolCopy::m_nt_treename
std::string m_nt_treename
Definition: AtlCoolCopy.cxx:293
AtlCoolCopy::m_root
bool m_root
Definition: AtlCoolCopy.cxx:183
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
AtlCoolCopy::m_recreate
bool m_recreate
Definition: AtlCoolCopy.cxx:175
AtlCoolCopy::rootAllocate
bool rootAllocate(const cool::IFieldSpecification &spec, void *&sptr, char &rootID) const
Definition: AtlCoolCopy.cxx:1716
AtlCoolCopy::m_destCoraPtr
CoraCoolDatabasePtr m_destCoraPtr
Definition: AtlCoolCopy.cxx:260
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
WriteCallback
size_t WriteCallback(void *contents, size_t size, size_t nmemb, std::string *s)
Definition: AtlCoolCopy.cxx:65
AtlCoolCopy::m_nocopy
bool m_nocopy
Definition: AtlCoolCopy.cxx:190
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
LArCellNtuple.ifile
string ifile
Definition: LArCellNtuple.py:133
AtlCoolCopy::getLockedTags
bool getLockedTags()
Definition: AtlCoolCopy.cxx:430
AtlCoolCopy::m_nt_channel
UInt_t m_nt_channel
Definition: AtlCoolCopy.cxx:291
AtlCoolCopy::m_zeronull
bool m_zeronull
Definition: AtlCoolCopy.cxx:184
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
AtlCoolCopy::m_noclobroot
bool m_noclobroot
Definition: AtlCoolCopy.cxx:221
AtlCoolCopy::m_addlfn
std::vector< std::string > m_addlfn
Definition: AtlCoolCopy.cxx:246
get_generator_info.error
error
Definition: get_generator_info.py:40
AtlCoolCopy::addExclude
bool addExclude(const std::string &folder)
Definition: AtlCoolCopy.cxx:529
AtlCoolCopy::m_anadelt
long long m_anadelt
Definition: AtlCoolCopy.cxx:237
python.PyAthena.obj
obj
Definition: PyAthena.py:132
python.diffTAGTree.treename
treename
Definition: diffTAGTree.py:140
error
Definition: IImpactPoint3dEstimator.h:70
AtlCoolCopy::m_hiparent
std::vector< std::string > m_hiparent
Definition: AtlCoolCopy.cxx:276
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
AtlCoolCopy::m_chdesc
bool m_chdesc
Definition: AtlCoolCopy.cxx:193
AtlCoolCopy::timeString
static std::string timeString(const cool::ValidityKey iovtime)
Definition: AtlCoolCopy.cxx:2573
pool::IFileCatalog::addReadCatalog
void addReadCatalog(const std::string &connect)
Add new catalog identified by name to the existing ones.
Definition: IFileCatalog.h:116
ReplicaSorter
Definition: Database/CoolConvUtilities/src/ReplicaSorter.h:12
readCCLHist.float
float
Definition: readCCLHist.py:83
AtlCoolCopy::m_folderexcl
std::vector< std::string > m_folderexcl
Definition: AtlCoolCopy.cxx:262
AtlCoolCopy::m_allowcreate
bool m_allowcreate
Definition: AtlCoolCopy.cxx:174
AtlCoolCopy::m_forcetime
bool m_forcetime
Definition: AtlCoolCopy.cxx:199
CaloCondBlobAlgs_fillNoiseFromASCII.blob
blob
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:96
AtlCoolCopy::getOnlineRun
bool getOnlineRun()
Definition: AtlCoolCopy.cxx:2694
AtlCoolCopy::m_forcenopay
bool m_forcenopay
Definition: AtlCoolCopy.cxx:201
AtlCoolCopy::isNumeric
static bool isNumeric(const char *input)
Definition: AtlCoolCopy.cxx:2499
AtlCoolCopy::m_addguid
std::vector< std::string > m_addguid
Definition: AtlCoolCopy.cxx:245
AtlCoolCopy::m_newtimemin
cool::ValidityKey m_newtimemin
Definition: AtlCoolCopy.cxx:228
PoolMapElement
Definition: PoolMapElement.h:14