ATLAS Offline Software
Classes | Namespaces | Typedefs | Functions
openCoraCool.cxx File Reference
#include <vector>
#include <string>
#include <array>
#include <iostream>
#include "CoolKernel/DatabaseId.h"
#include "CoolKernel/Exception.h"
#include "CoolKernel/IDatabaseSvc.h"
#include "CoolKernel/IDatabase.h"
#include "CoolApplication/Application.h"
#include "CoolKernel/IFolder.h"
#include "CoolKernel/FolderSpecification.h"
#include "CoolKernel/RecordSpecification.h"
#include "CoolKernel/Record.h"
#include "CoolKernel/FieldSpecification.h"
#include "CoolKernel/IObject.h"
#include "CoolKernel/IObjectIterator.h"
#include "CoolKernel/IRecordIterator.h"
#include "CoolKernel/StorageType.h"
#include "CoraCool/CoraCoolDatabase.h"
#include "CoraCool/CoraCoolFolder.h"
#include "CoraCool/CoraCoolObjectIter.h"
#include "CoraCool/CoraCoolObject.h"
#include "RelationalAccess/ConnectionService.h"

Go to the source code of this file.

Classes

struct  MyKey
 
class  DbConnection
 
struct  FolderSpec
 
class  Folder
 
struct  SelectionCriterion
 

Namespaces

 Run1
 USAGE: openCoraCool.exe "COOLONL_SCT/COMP200".
 
 Run1::Chip
 
 Run1::Geog
 
 Run1::MUR
 
 Run1::Module
 
 Run1::PowerMUR
 
 Run1::Channel
 
 Run1::ROD
 
 Run1::RODMUR
 
 Run1::Slave
 
 Run1::TIM
 
 Run2
 
 Run2::Chip
 
 Run2::Geog
 
 Run2::MUR
 
 Run2::Module
 
 Run2::PowerMUR
 
 Run2::Channel
 
 Run2::ROD
 
 Run2::RODMUR
 
 Run2::Slave
 
 Run2::TIM
 

Typedefs

typedef MyKey IovKey_t
 
typedef std::map< IovKey_t, CoraCoolObject::AttrListVecCCIovVectorMap_t
 
typedef cool::Int16 Run1::Chip::chip_t
 
typedef cool::Int16 Run1::Chip::active_t
 
typedef cool::Int16 Run1::Chip::address_t
 
typedef cool::Int16 Run1::Chip::config_t
 
typedef cool::Int32 Run1::Chip::mask_t
 
typedef cool::Int16 Run1::Chip::settings_t
 
typedef cool::Int16 Run1::Chip::rc_t
 
typedef cool::String255 Run1::Chip::rcArgs_t
 
typedef cool::Float Run1::Chip::c_t
 
typedef cool::Float Run1::Chip::target_t
 
typedef cool::String255 Run1::Chip::trim_t
 
typedef cool::Int32 Run1::Geog::super_t
 
typedef cool::Int32 Run1::Geog::medium_t
 
typedef cool::Int32 Run1::Geog::position_t
 
typedef cool::Int32 Run1::Geog::MUR_t
 
typedef cool::Int32 Run1::MUR::MUR_t
 
typedef cool::Int32 Run1::MUR::module_t
 
typedef cool::Int64 Run1::MUR::moduleId_t
 
typedef cool::Int32 Run1::MUR::xxFibre_t
 
typedef cool::Int64 Run1::Module::id_t
 
typedef cool::Int16 Run1::Module::group_t
 
typedef cool::Int16 Run1::Module::active_t
 
typedef cool::Int16 Run1::Module::select_t
 
typedef cool::Int32 Run1::PowerMUR::MUR_t
 
typedef cool::Int16 Run1::PowerMUR::module_t
 
typedef cool::Int16 Run1::PowerMUR::crate_t
 
typedef cool::Int16 Run1::PowerMUR::channel_t
 
typedef cool::Int32 Run1::Channel::crate_t
 
typedef cool::Int32 Run1::Channel::rod_t
 
typedef cool::Int32 Run1::Channel::channel_t
 
typedef cool::Int16 Run1::Channel::opCurrent_t
 
typedef cool::Int16 Run1::Channel::opDelay_t
 
typedef cool::Int16 Run1::Channel::opMarkSpace_t
 
typedef cool::Int16 Run1::Channel::threshold_t
 
typedef cool::Int16 Run1::Channel::delay_t
 
typedef cool::Int32 Run1::Channel::errMask_t
 
typedef cool::Int32 Run1::ROD::crate_t
 
typedef cool::Int16 Run1::ROD::slot_t
 
typedef cool::Int32 Run1::ROD::ROB_t
 
typedef cool::Int32 Run1::ROD::SRC_t
 
typedef cool::Int16 Run1::ROD::bcid_t
 
typedef cool::Int32 Run1::ROD::slave_t
 
typedef cool::Int32 Run1::RODMUR::crate_t
 
typedef cool::Int32 Run1::RODMUR::rod_t
 
typedef cool::Int32 Run1::RODMUR::position_t
 
typedef cool::Int32 Run1::RODMUR::MUR_t
 
typedef cool::Int32 Run1::Slave::id_t
 
typedef cool::String255 Run1::Slave::file_t
 
typedef cool::Int32 Run1::TIM::crate_t
 
typedef cool::Float Run1::TIM::freq_t
 
typedef cool::Int32 Run1::TIM::trigType_t
 
typedef cool::Int32 Run1::TIM::bcidOffset_t
 
typedef cool::Int32 Run1::TIM::trigEnable_t
 
typedef cool::Int16 Run1::TIM::runMode_t
 
typedef cool::Int16 Run1::TIM::delay_t
 
typedef cool::UChar Run2::Chip::chip_t
 
typedef cool::Bool Run2::Chip::active_t
 
typedef cool::UChar Run2::Chip::address_t
 
typedef cool::UInt16 Run2::Chip::config_t
 
typedef cool::UInt32 Run2::Chip::mask_t
 
typedef cool::UChar Run2::Chip::settings_t
 
typedef cool::UChar Run2::Chip::rc_t
 
typedef cool::String255 Run2::Chip::rcArgs_t
 
typedef cool::Float Run2::Chip::c_t
 
typedef cool::Float Run2::Chip::target_t
 
typedef cool::String255 Run2::Chip::trim_t
 
typedef cool::UInt32 Run2::Geog::MUR_t
 
typedef cool::Int16 Run2::Geog::super_t
 
typedef cool::UChar Run2::Geog::medium_t
 
typedef cool::Int16 Run2::Geog::position_t
 
typedef cool::UInt32 Run2::MUR::MUR_t
 
typedef cool::UChar Run2::MUR::module_t
 
typedef cool::Int64 Run2::MUR::moduleId_t
 
typedef cool::UChar Run2::MUR::xxFibre_t
 
typedef cool::Int64 Run2::Module::id_t
 
typedef cool::Int16 Run2::Module::group_t
 
typedef cool::Bool Run2::Module::active_t
 
typedef cool::Bool Run2::Module::select_t
 
typedef cool::UInt16 Run2::Module::chipStatus_t
 
typedef cool::UInt32 Run2::PowerMUR::MUR_t
 
typedef cool::UChar Run2::PowerMUR::module_t
 
typedef cool::UChar Run2::PowerMUR::crate_t
 
typedef cool::UChar Run2::PowerMUR::channel_t
 
typedef cool::UChar Run2::Channel::crate_t
 
typedef cool::UChar Run2::Channel::rod_t
 
typedef cool::UChar Run2::Channel::channel_t
 
typedef cool::UChar Run2::Channel::opCurrent_t
 
typedef cool::UInt16 Run2::Channel::opDelay_t
 
typedef cool::UChar Run2::Channel::opMarkSpace_t
 
typedef cool::UChar Run2::Channel::threshold_t
 
typedef cool::UChar Run2::Channel::delay_t
 
typedef cool::UInt32 Run2::Channel::errMask_t
 
typedef cool::UChar Run2::ROD::crate_t
 
typedef cool::UChar Run2::ROD::slot_t
 
typedef cool::Int32 Run2::ROD::ROB_t
 
typedef cool::Int32 Run2::ROD::SRC_t
 
typedef cool::Int16 Run2::ROD::bcid_t
 
typedef cool::Int32 Run2::ROD::slave_t
 
typedef cool::UChar Run2::RODMUR::crate_t
 
typedef cool::UChar Run2::RODMUR::rod_t
 
typedef cool::UChar Run2::RODMUR::position_t
 
typedef cool::UInt32 Run2::RODMUR::MUR_t
 
typedef cool::Int32 Run2::Slave::id_t
 
typedef cool::String255 Run2::Slave::file_t
 
typedef cool::UChar Run2::TIM::crate_t
 
typedef cool::Float Run2::TIM::freq_t
 
typedef cool::UInt32 Run2::TIM::trigType_t
 
typedef cool::UInt16 Run2::TIM::bcidOffset_t
 
typedef cool::UInt32 Run2::TIM::trigEnable_t
 
typedef cool::UChar Run2::TIM::runMode_t
 
typedef cool::UInt16 Run2::TIM::delay_t
 
typedef std::pair< cool::ValidityKey, cool::ValidityKey > IovPeriod_t
 https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConditionsRun1RunNumbers 152777:1270866809, ##2010 7 TeV p-p for period A (very low mu) 154471:1272831478, ##2010 900 GeV p-p 155697:1274722685, ##2010 7 TeV p-p for period C (mu~0.2) 162623:1282673387, ##2010 7 TeV p-p for period F (36 single bunches, mu~2) 167576:1287909620, ##2010 7 TeV p-p (150ns bunch trains) 170002:1291063245, ##2010 Heavy Ion run 178211:1301070988, ##2011 2.76 TeV 180164:1303554669, ##2011 7 TeV p-p (B-D) 183003:1306973316, ##2011 7 TeV p-p (E-H) 186169:1311379706, ##2011 7 TeV p-p (I-K) 189751:1316868299, ##2011 7 TeV p-p (L-M) 193662:1322075751, ##2011 Heavy Ion run 195847:1328040250, ##Upgrade samples from MC12 210184:1347470747, ##2012 Heavy Ion - proton run 212272:1349603811, ##2012 8 TeV p-p 219114:1360457560, ##2013 Heavy Ion - proton run 219305:1360689056, ##2013 2.76 TeV p-p 222222:1376009561, ##DC14 (mu=30) 25ns, old R1 geo tag 222250:1376075781, ##DC14 (mu=30) 50ns, old R1 geo tag 222500:1376646281, #MC15 50ns, new R2 geo tag (mu=0) 222510:1376669101, #MC15 50ns, new R2 geo tag (nominal mu) 222525:1376703331 #MC15 25ns, new R2 geo tag (nominal mu) More...
 
typedef std::map< IovKey_t, cool::IRecordVector > IovVectorMap_t
 

Functions

IovKey_t makeRunInterval (const cool::ValidityKey runstart, const cool::ValidityKey runend, const cool::ChannelId channelId)
 
bool inInterval (const cool::ValidityKey n, const cool::ValidityKey from, const cool::ValidityKey to)
 
cool::ValidityKey convertUntil (const cool::ValidityKey &until)
 
cool::ValidityKey convertSince (const cool::ValidityKey &since)
 
IovKey_t time2RunLumi (const IovKey_t &iov)
 
bool argumentsOK (const int numArgs, const char **)
 
std::string transConn (const std::string &inconn)
 
bool isCoraCoolDescriptor (const std::string &descriptor)
 
std::string convertTagToRun2 (const std::string &run1Tag)
 
CoraCoolObject::AttrListVec readOneDatum (const CoraCoolObjectPtr &ccPtr)
 
CCIovVectorMap_t readCC (const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
 
IovVectorMap_t read (const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
 
template<class R2 , class R1 >
void setRecord (cool::Record &r, const coral::AttributeList &a, const std::string &itemName, const std::string &targetName)
 IovKey_t runLumiFromTimeStamp(const IovKey_t & timeStamp){ return timeStamp; }. More...
 
template<class R2 , class R1 >
void setRecord (cool::Record &r, const coral::AttributeList &a, const std::string &itemName)
 
void writeChip (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeGeog (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeMUR (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeModule (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeChannel (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeRod (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void writeRodmur (const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
 
void printRecordSpec (const cool::RecordSpecification &spec)
 
const coral::AttributeList & getAttributes (const coral::AttributeList &vectorEntry)
 
const coral::AttributeList & getAttributes (const cool::IRecordPtr &vectorEntry)
 
template<class T >
void showResult (const T &theResult, const unsigned int maxShown=5)
 
std::string defaultFolderPath (const bool itsCoraCool)
 cool::StorageType::TypeId coral2CoolType(const std::string & coralTypeName){ std::vector<std::string> vec ={ "Bool", "UChar", "Int16", "UInt16", "Int32", "UInt32", "UInt63", "Int64", "Float", "Double", "String255", "String4k", "String64k", "String16M", "Blob64k", "Blob16M" }; std::vector<std::string>::iterator it=std::find(vec.begin(),vec.end(),coralTypeName); return static_cast<cool::StorageType::TypeId>(std::distance(vec.begin(), it)); } More...
 
bool replaceTimestamp (std::string &metadata)
 
cool::IFolderPtr createLocalCopyStructure (const Folder &sourceFolder, const DbConnection &writeDb, const bool forceTimestamp=false)
 
std::vector< std::string > & split (const std::string &s, char delim, std::vector< std::string > &elems)
 
std::vector< std::string > split (const std::string &s, char delim)
 
int main (int argc, const char *argv[])
 

Typedef Documentation

◆ CCIovVectorMap_t

Definition at line 51 of file openCoraCool.cxx.

◆ IovKey_t

typedef MyKey IovKey_t

Definition at line 49 of file openCoraCool.cxx.

◆ IovPeriod_t

typedef std::pair<cool::ValidityKey, cool::ValidityKey> IovPeriod_t

https://twiki.cern.ch/twiki/bin/viewauth/AtlasComputing/ConditionsRun1RunNumbers 152777:1270866809, ##2010 7 TeV p-p for period A (very low mu) 154471:1272831478, ##2010 900 GeV p-p 155697:1274722685, ##2010 7 TeV p-p for period C (mu~0.2) 162623:1282673387, ##2010 7 TeV p-p for period F (36 single bunches, mu~2) 167576:1287909620, ##2010 7 TeV p-p (150ns bunch trains) 170002:1291063245, ##2010 Heavy Ion run 178211:1301070988, ##2011 2.76 TeV 180164:1303554669, ##2011 7 TeV p-p (B-D) 183003:1306973316, ##2011 7 TeV p-p (E-H) 186169:1311379706, ##2011 7 TeV p-p (I-K) 189751:1316868299, ##2011 7 TeV p-p (L-M) 193662:1322075751, ##2011 Heavy Ion run 195847:1328040250, ##Upgrade samples from MC12 210184:1347470747, ##2012 Heavy Ion - proton run 212272:1349603811, ##2012 8 TeV p-p 219114:1360457560, ##2013 Heavy Ion - proton run 219305:1360689056, ##2013 2.76 TeV p-p 222222:1376009561, ##DC14 (mu=30) 25ns, old R1 geo tag 222250:1376075781, ##DC14 (mu=30) 50ns, old R1 geo tag 222500:1376646281, #MC15 50ns, new R2 geo tag (mu=0) 222510:1376669101, #MC15 50ns, new R2 geo tag (nominal mu) 222525:1376703331 #MC15 25ns, new R2 geo tag (nominal mu)

From this, looking at the tags in -MC-06: 0-1230768000000000000 : 0-142308; ->Thu, 01 Jan 2009 00:00:00 GMT 1230768000000000000-1262304000000000000 : ->Fri, 01 Jan 2010 00:00:00 GMT 142308 - 152166
1262304000000000000-1288569600000000000 : ->Mon, 01 Nov 2010 00:00:00 GMT 152777,154471,155697,162623,167576; 152166 - 153599 1288569600000000000-1290686400000000000 : ->Thu, 25 Nov 2010 12:00:00 GMT ? not attributed 170000 1290686400000000000-1293840000000000000 : ->Sat, 01 Jan 2011 00:00:00 GMT 170002 1293840000000000000-1333588404000000000 : ->Thu, 05 Apr 2012 01:13:24 GMT 178211,180164,183003,186169,189751,193662,195847-200805;178163 - 178264 1333588404000000000-1333612447000000000 : ->Thu, 05 Apr 2012 07:54:07 GMT 200805-216432 1333612447000000000-1356998400000000000 : ->Tue, 01 Jan 2013 00:00:00 GMT 210184,212272 1356998400000000000-9223372036854775807 : 219114,219305

Definition at line 258 of file openCoraCool.cxx.

◆ IovVectorMap_t

typedef std::map<IovKey_t, cool::IRecordVector> IovVectorMap_t

Definition at line 566 of file openCoraCool.cxx.

Function Documentation

◆ argumentsOK()

bool argumentsOK ( const int  numArgs,
const char **   
)

Definition at line 313 of file openCoraCool.cxx.

313  {
314  bool result(true);
315  result = (numArgs>1) and (numArgs<4);
316  return result;
317 }

◆ convertSince()

cool::ValidityKey convertSince ( const cool::ValidityKey &  since)

Definition at line 287 of file openCoraCool.cxx.

287  {
288  if (since==0) return 0;
289  if (since==1230768000000000000) return 140000;
290  if (since==1262304000000000000) return 150000;
291  if (since==1288569600000000000) return 168000;
292  if (since==1290686400000000000) return 169800;
293  if (since==1293840000000000000) return 171000;
294 
295  if (since==1333588404000000000) return 200805;
296 
297  if (since==1333612447000000000) return 200806;
298  return 217000;
299 }

◆ convertTagToRun2()

std::string convertTagToRun2 ( const std::string &  run1Tag)

Definition at line 411 of file openCoraCool.cxx.

411  {
412  std::string tag=run1Tag;
413  tag.erase(12,7);
414  return tag;
415 }

◆ convertUntil()

cool::ValidityKey convertUntil ( const cool::ValidityKey &  until)

Definition at line 271 of file openCoraCool.cxx.

271  {
272  if (until ==0) return 140000;
273  if (until==1230768000000000000) return 139999;
274  if (until==1262304000000000000) return 149999;
275  if (until==1288569600000000000) return 167999;
276  if (until==1290686400000000000) return 169799;
277  if (until==1293840000000000000) return 170999;
278 
279  if (until==1333588404000000000) return 200804;
280  if (until==1333612447000000000) return 200805;
281 
282  if (until==1356998400000000000) return 216999;
283  return cool::ValidityKeyMax;
284 }

◆ createLocalCopyStructure()

cool::IFolderPtr createLocalCopyStructure ( const Folder sourceFolder,
const DbConnection writeDb,
const bool  forceTimestamp = false 
)

Definition at line 920 of file openCoraCool.cxx.

920  {
921  std::string description=sourceFolder.description();
922 
923  bool replacementMade(false);
924  if (forceTimestamp){
925  replacementMade=replaceTimestamp(description);
926  }
927  if (replacementMade) std::cout<<"timestamp replacement made\n"<<description<<std::endl;
928 
929  const std::string destFolder=sourceFolder.folderSpec().name;
930  cool::IFolderPtr pSourceFolder=sourceFolder.ptr();
931  const cool::FolderVersioning::Mode dvermode=cool::FolderVersioning::MULTI_VERSION;
932  const cool::PayloadMode::Mode payMode=pSourceFolder->folderSpecification().payloadMode();
933  const cool::FolderSpecification coolFolderSpec(dvermode,pSourceFolder->payloadSpecification(),payMode);
934  cool::IFolderPtr destfl=writeDb.dbPtr()->createFolder(destFolder,coolFolderSpec,description,true);
935  std::cout<<"Folder "<<destFolder<<" created."<<std::endl;
936  //copy channels
937  const std::map<cool::ChannelId,std::string> & chanmap=pSourceFolder->listChannelsWithNames();
938  for (const auto & chan:chanmap){
939  std::cout<<".";
940  const std::string & sourcedesc=pSourceFolder->channelDescription(chan.first);
941  const std::string& sourcename=chan.second;
942  destfl->createChannel(chan.first,sourcename,sourcedesc);
943  }
944  std::cout<<std::endl;
945  return destfl;
946 }

◆ defaultFolderPath()

std::string defaultFolderPath ( const bool  itsCoraCool)

cool::StorageType::TypeId coral2CoolType(const std::string & coralTypeName){ std::vector<std::string> vec ={ "Bool", "UChar", "Int16", "UInt16", "Int32", "UInt32", "UInt63", "Int64", "Float", "Double", "String255", "String4k", "String64k", "String16M", "Blob64k", "Blob16M" }; std::vector<std::string>::iterator it=std::find(vec.begin(),vec.end(),coralTypeName); return static_cast<cool::StorageType::TypeId>(std::distance(vec.begin(), it)); }

Definition at line 904 of file openCoraCool.cxx.

904  {
905  const std::string result = itsCoraCool?("/SCT/DAQ/Configuration/"):("/SCT/DAQ/Config/");
906  return result;
907 }

◆ getAttributes() [1/2]

const coral::AttributeList& getAttributes ( const cool::IRecordPtr &  vectorEntry)

Definition at line 853 of file openCoraCool.cxx.

853  {
854  return vectorEntry->attributeList();
855 }

◆ getAttributes() [2/2]

const coral::AttributeList& getAttributes ( const coral::AttributeList &  vectorEntry)

Definition at line 849 of file openCoraCool.cxx.

849  {
850  return vectorEntry;
851 }

◆ inInterval()

bool inInterval ( const cool::ValidityKey  n,
const cool::ValidityKey  from,
const cool::ValidityKey  to 
)

Definition at line 267 of file openCoraCool.cxx.

267  {
268  return ((n>from) and (n<=to));
269 }

◆ isCoraCoolDescriptor()

bool isCoraCoolDescriptor ( const std::string &  descriptor)

Definition at line 351 of file openCoraCool.cxx.

351  {
352  return (descriptor.find("<coracool") != std::string::npos);
353 }

◆ main()

int main ( int  argc,
const char *  argv[] 
)

xmllint –format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/Chip/tags' <?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/Chip" version="multi"> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:48:26 GMT">SctDaqConfigurationChip-001-01</tag> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:54:50 GMT">SctDaqConfigurationChip-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:23:33 GMT">SctDaqConfigurationChip-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:49:49 GMT">SctDaqConfigurationChip-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 15:08:24 GMT">SctDaqConfigurationChip-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:31:49 GMT">SctDaqConfigurationChip-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:27:49 GMT">SctDaqConfigurationChip-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:56:21 GMT">SctDaqConfigurationChip-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:35:01 GMT">SctDaqConfigurationChip-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:55:47 GMT">SctDaqConfigurationChip-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:13:55 GMT">SctDaqConfigurationChip-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:54:21 GMT">SctDaqConfigurationChip-MC-06</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:46:51 GMT">SctDaqConfigurationChip-NOMINAL</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:43:34 GMT">SctDaqConfigurationChip-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:41:56 GMT">SctDaqConfigurationChip-NOMINAL-Jan09</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 12:44:54 GMT">SctDaqConfigurationChip-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:47:13 GMT">SctDaqConfigurationChip-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:45:10 GMT">SctDaqConfigurationChip-Nov10-02</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:45:11 GMT">SctDaqConfigurationChip-PERFECT</tag> <tag lock="locked" insertionTime="Mon, 30 Aug 2010 13:03:13 GMT">SctDaqConfigurationChip-PERFECT-Aug10-01</tag> </tagList>

<?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/Geog" version="multi"> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:29:27 GMT">SctDaqConfigurationGeog-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:18:58 GMT">SctDaqConfigurationGeog-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:42:07 GMT">SctDaqConfigurationGeog-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 10:57:58 GMT">SctDaqConfigurationGeog-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:24:46 GMT">SctDaqConfigurationGeog-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:23:01 GMT">SctDaqConfigurationGeog-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:52:06 GMT">SctDaqConfigurationGeog-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:30:24 GMT">SctDaqConfigurationGeog-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:45:04 GMT">SctDaqConfigurationGeog-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:08:40 GMT">SctDaqConfigurationGeog-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:41:15 GMT">SctDaqConfigurationGeog-MC-06</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:58:20 GMT">SctDaqConfigurationGeog-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:58:20 GMT">SctDaqConfigurationGeog-NOMINAL-Jan09</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:58:20 GMT">SctDaqConfigurationGeog-NOMINAL-Sept08</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 10:12:06 GMT">SctDaqConfigurationGeog-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:41:46 GMT">SctDaqConfigurationGeog-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:38:02 GMT">SctDaqConfigurationGeog-Nov10-02</tag> <tag lock="locked" insertionTime="Mon, 30 Aug 2010 13:04:12 GMT">SctDaqConfigurationGeog-PERFECT-Aug10-01</tag> </tagList>

<?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/MUR" version="multi"> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:32:24 GMT">SctDaqConfigurationMur-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:20:34 GMT">SctDaqConfigurationMur-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:44:03 GMT">SctDaqConfigurationMur-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 10:59:06 GMT">SctDaqConfigurationMur-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:27:33 GMT">SctDaqConfigurationMur-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:24:33 GMT">SctDaqConfigurationMur-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:53:46 GMT">SctDaqConfigurationMur-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:31:43 GMT">SctDaqConfigurationMur-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:50:58 GMT">SctDaqConfigurationMur-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:10:28 GMT">SctDaqConfigurationMur-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:43:17 GMT">SctDaqConfigurationMur-MC-06</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:58:27 GMT">SctDaqConfigurationMur-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:58:26 GMT">SctDaqConfigurationMur-NOMINAL-Jan09</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 09:58:26 GMT">SctDaqConfigurationMur-NOMINAL-Sept08</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 10:19:32 GMT">SctDaqConfigurationMur-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:43:36 GMT">SctDaqConfigurationMur-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:38:55 GMT">SctDaqConfigurationMur-Nov10-02</tag> <tag lock="locked" insertionTime="Mon, 30 Aug 2010 13:04:12 GMT">SctDaqConfigurationMur-PERFECT-Aug10-01</tag> </tagList>

<tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/Module" version="multi"> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 10:04:53 GMT">SctDaqConfigurationModule-001-01</tag> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:33:35 GMT">SctDaqConfigurationModule-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:21:34 GMT">SctDaqConfigurationModule-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:45:17 GMT">SctDaqConfigurationModule-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 10:59:56 GMT">SctDaqConfigurationModule-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:28:45 GMT">SctDaqConfigurationModule-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:25:25 GMT">SctDaqConfigurationModule-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:54:35 GMT">SctDaqConfigurationModule-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:32:38 GMT">SctDaqConfigurationModule-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:52:52 GMT">SctDaqConfigurationModule-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:11:30 GMT">SctDaqConfigurationModule-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:45:49 GMT">SctDaqConfigurationModule-MC-06</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 10:03:30 GMT">SctDaqConfigurationModule-NOMINAL</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:00:41 GMT">SctDaqConfigurationModule-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:59:18 GMT">SctDaqConfigurationModule-NOMINAL-Jan09</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 10:23:22 GMT">SctDaqConfigurationModule-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:44:30 GMT">SctDaqConfigurationModule-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:40:57 GMT">SctDaqConfigurationModule-Nov10-02</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:02:07 GMT">SctDaqConfigurationModule-PERFECT</tag> <tag lock="locked" insertionTime="Tue, 31 Aug 2010 13:57:26 GMT">SctDaqConfigurationModule-PERFECT-Aug10-01</tag> </tagList>

xmllint --format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/Channel/tags' 

<?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/Channel" version="multi"> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:40:49 GMT">SctDaqConfigurationChannel-001-01</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 09:40:50 GMT">SctDaqConfigurationChannel-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 30 Aug 2010 13:02:39 GMT">SctDaqConfigurationChannel-PERFECT-Aug10-01</tag> </tagList>

xmllint –format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/ROD/tags'
<?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/ROD" version="multi"> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:30:59 GMT">SctDaqConfigurationRod-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:19:51 GMT">SctDaqConfigurationRod-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:43:26 GMT">SctDaqConfigurationRod-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 10:58:30 GMT">SctDaqConfigurationRod-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:26:05 GMT">SctDaqConfigurationRod-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:23:40 GMT">SctDaqConfigurationRod-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:52:54 GMT">SctDaqConfigurationRod-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:30:56 GMT">SctDaqConfigurationRod-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:48:21 GMT">SctDaqConfigurationRod-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:09:14 GMT">SctDaqConfigurationRod-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:42:07 GMT">SctDaqConfigurationRod-MC-06</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:06:26 GMT">SctDaqConfigurationRod-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 10:06:25 GMT">SctDaqConfigurationRod-NOMINAL-Jan09</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:06:25 GMT">SctDaqConfigurationRod-NOMINAL-Sept08</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 10:15:21 GMT">SctDaqConfigurationRod-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:42:51 GMT">SctDaqConfigurationRod-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:38:40 GMT">SctDaqConfigurationRod-Nov10-02</tag> <tag lock="locked" insertionTime="Tue, 31 Aug 2010 13:03:27 GMT">SctDaqConfigurationRod-PERFECT-Aug10-01</tag> </tagList>

xmllint –format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/RODMUR/tags' <?xml version="1.0" encoding="utf-8"?> <tagList server="ATLAS_COOLPROD" schema="ATLAS_COOLOFL_SCT" dbname="OFLP200" folder="SCT/DAQ/Configuration/RODMUR" version="multi"> <tag lock="locked" insertionTime="Fri, 09 Apr 2010 14:31:47 GMT">SctDaqConfigurationRodmur-Apr10-01</tag> <tag lock="locked" insertionTime="Thu, 05 Apr 2012 11:20:16 GMT">SctDaqConfigurationRodmur-Apr12-01</tag> <tag lock="locked" insertionTime="Mon, 20 Sep 2010 14:43:45 GMT">SctDaqConfigurationRodmur-Aug10-01</tag> <tag lock="locked" insertionTime="Tue, 15 Dec 2009 10:58:50 GMT">SctDaqConfigurationRodmur-Dec09</tag> <tag lock="locked" insertionTime="Tue, 06 Dec 2011 10:27:01 GMT">SctDaqConfigurationRodmur-Dec11-01</tag> <tag lock="unlocked" insertionTime="Thu, 09 Feb 2012 14:24:09 GMT">SctDaqConfigurationRodmur-MC-01</tag> <tag lock="locked" insertionTime="Thu, 09 Feb 2012 15:53:21 GMT">SctDaqConfigurationRodmur-MC-02</tag> <tag lock="locked" insertionTime="Thu, 28 Feb 2013 10:31:19 GMT">SctDaqConfigurationRodmur-MC-03</tag> <tag lock="locked" insertionTime="Mon, 01 Jul 2013 14:49:50 GMT">SctDaqConfigurationRodmur-MC-04</tag> <tag lock="locked" insertionTime="Tue, 30 Jul 2013 10:09:32 GMT">SctDaqConfigurationRodmur-MC-05</tag> <tag lock="locked" insertionTime="Tue, 05 Aug 2014 10:42:44 GMT">SctDaqConfigurationRodmur-MC-06</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:06:31 GMT">SctDaqConfigurationRodmur-NOMINAL-Feb09</tag> <tag lock="unlocked" insertionTime="Mon, 13 Jul 2009 10:06:31 GMT">SctDaqConfigurationRodmur-NOMINAL-Jan09</tag> <tag lock="locked" insertionTime="Mon, 13 Jul 2009 10:06:31 GMT">SctDaqConfigurationRodmur-NOMINAL-Sept08</tag> <tag lock="unlocked" insertionTime="Mon, 09 Nov 2009 10:16:48 GMT">SctDaqConfigurationRodmur-Nov09</tag> <tag lock="locked" insertionTime="Mon, 15 Nov 2010 11:43:17 GMT">SctDaqConfigurationRodmur-Nov10-01</tag> <tag lock="locked" insertionTime="Wed, 01 Dec 2010 15:39:09 GMT">SctDaqConfigurationRodmur-Nov10-02</tag> <tag lock="locked" insertionTime="Mon, 30 Aug 2010 13:04:13 GMT">SctDaqConfigurationRodmur-PERFECT-Aug10-01</tag> </tagList>

        0-1230768000000000000 : 0-142308; ->Thu, 01 Jan 2009 00:00:00 GMT

1230768000000000000-1262304000000000000 : ->Fri, 01 Jan 2010 00:00:00 GMT 142308 - 152166
1262304000000000000-1288569600000000000 : ->Mon, 01 Nov 2010 00:00:00 GMT 15277,154471,155697,162623,167576; 152166 - 153599 1288569600000000000-1290686400000000000 : ->Thu, 25 Nov 2010 12:00:00 GMT ? not attributed 170000 1290686400000000000-1293840000000000000 : ->Sat, 01 Jan 2011 00:00:00 GMT 170002 1293840000000000000-1333588404000000000 : ->Thu, 05 Apr 2012 01:13:24 GMT 178211,180164,183003,186169,189751,193662,195847-200805;178163 - 178264 1333588404000000000-1333612447000000000 : ->Thu, 05 Apr 2012 07:54:07 GMT 200805-216432 1333612447000000000-1356998400000000000 : ->Tue, 01 Jan 2013 00:00:00 GMT 210184,212272 1356998400000000000-9223372036854775807 : 219114,219305

Definition at line 964 of file openCoraCool.cxx.

964  {
965  int retcode=0;
966  //http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/Chip/tags
967  //http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Config/Chip/tags
994  std::array<std::string,2> chipTagNames={"SctDaqConfigChip-Run2-10July2015","SctDaqConfigurationChip-MC-06"};
995  //xmllint --format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/Geog/tags'
1019  std::array<std::string,2> geogTagNames={"SctDaqConfigGeog-Run2-10July2015","SctDaqConfigurationGeog-MC-06"};
1020  //xmllint --format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/MUR/tags'
1044  std::array<std::string,2> murTagNames={"SctDaqConfigMur-Run2-10July2015","SctDaqConfigurationMur-MC-06"};
1045  //xmllint --format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/Module/tags'
1070  std::array<std::string,2> moduleTagNames={"SctDaqConfigModule-Run2-10July2015","SctDaqConfigurationModule-MC-06"};
1071  //xmllint --format 'http://coolcherrypy.cern.ch:8080/cooldb/ATLAS_COOLPROD/ATLAS_COOLOFL_SCT/OFLP200/SCT/DAQ/Configuration/PowerMUR/tags'
1072  //std::array<std::string,2> powerMurTagNames={"SctDaqConfigPowermMur-Run2-10July2015","SctDaqConfigurationPowerMur-MC-06"};
1082  std::array<std::string,2> channelTagNames={"SctDaqConfigChannel-Run2-10July2015","SctDaqConfigurationChannel-MC-06"};
1107  std::array<std::string,2> rodTagNames={"SctDaqConfigRod-Run2-10July2015","SctDaqConfigurationRod-MC-06"};
1132  std::array<std::string,2> rodmurTagNames={"SctDaqConfigRodmur-Run2-10July2015","SctDaqConfigurationRodmur-MC-06"};
1133 
1134  //
1135  std::array<std::string,6> folderNames={"Chip","Geog","MUR","Module","ROD","RODMUR"};
1136  std::string dbName("");
1137  const std::string defaultDbName="COOLOFL_SCT/OFLP200";
1138  std::string iovString=argv[1];
1139  if (argc!=2){
1140  std::cout<<"No arguments? "<<std::endl;
1141  std::cout<<argc<<std::endl;
1142  iovString="1333588404000000000-1333588404000000001";
1143  std::cout<<"running with default argument "<<iovString<<std::endl;
1144  }
1145 
1146  std::vector<std::string> splitString=split(iovString,'-');
1147  if (splitString.size()!=2) exit(-1);
1148  std::cout<<"From "<<splitString[0]<<" to "<<splitString[1]<<std::endl;
1149  const cool::ValidityKey since = std::stoll(splitString[0]);
1150  cool::ValidityKey until = std::stoll(splitString[1]);
1151  dbName=defaultDbName;
1152 
1153  //bool itsCoraCool =(dbName.find("COMP200") != std::string::npos);
1154  //DbConnection connection(dbName, itsCoraCool);
1155  //const std::string folderPath = defaultFolderPath(itsCoraCool);
1156  std::array<std::string,2> folderPaths={"/SCT/DAQ/Config/","/SCT/DAQ/Configuration/"};
1157  const unsigned int nFolders=folderNames.size();
1158  DbConnection writeDb("LOCAL");
1159  if (!writeDb.isOpen()) {
1160  std::cout<<"problem"<<std::endl;
1161  return -1;
1162  }
1163  unsigned int index(0);
1164  for (const auto & folderPath:folderPaths){
1165  bool itsCoraCool =(folderPath.find("Configuration") != std::string::npos);
1166  const std::string chipTagName=chipTagNames[index];
1167  const std::string geogTagName=geogTagNames[index];
1168  const std::string murTagName=murTagNames[index];
1169  const std::string moduleTagName=moduleTagNames[index];
1170  const std::string channelTagName=channelTagNames[index];
1171  const std::string rodTagName=rodTagNames[index];
1172  const std::string rodmurTagName=rodmurTagNames[index++];
1173 
1174  DbConnection connection(dbName, itsCoraCool);
1175  const unsigned int nData(1000000);
1176  for (unsigned int i(0);i!=nFolders;++i){
1177  std::string tagName;
1178  if (folderNames[i]=="Chip") tagName=chipTagName;
1179  if (folderNames[i]=="Geog") tagName=geogTagName;
1180  if (folderNames[i]=="MUR") tagName=murTagName;
1181  if (folderNames[i]=="Module") tagName=moduleTagName;
1182  if (folderNames[i]=="Channel") tagName=channelTagName;
1183  if (folderNames[i]=="ROD") tagName=rodTagName;
1184  if (folderNames[i]=="RODMUR") tagName=rodmurTagName;
1185 
1186  std::string folderName=folderPath+folderNames[i];
1187  const FolderSpec theFolder(folderName,tagName);
1188  Folder folder(connection, theFolder);
1189  //std::cout<<folder.description()<<std::endl;
1190  std::cout<<"---++++"<<folderName<<std::endl;
1191  printRecordSpec(folder.payloadSpec());
1205 
1206  if (!itsCoraCool){
1207  createLocalCopyStructure(folder, writeDb);
1208  //showResult(result);
1209  } else {
1210  std::string run1Tag = folder.folderSpec().tag;
1211  const std::string destTag = convertTagToRun2(run1Tag);
1212  std::cout<<"Destination tag "<<destTag<<std::endl;
1213 
1214  if (folderNames[i]=="Chip"){
1215  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1216  const FolderSpec destFolder("/SCT/DAQ/Config/Chip",tagName);
1217  Folder target(writeDb,destFolder);
1218  writeChip(result,target,destTag);
1219  }
1220  if (folderNames[i]=="Geog"){
1221  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1222  const FolderSpec destFolder("/SCT/DAQ/Config/Geog",tagName);
1223  Folder target(writeDb,destFolder);
1224  writeGeog(result,target,destTag);
1225  }
1226  if (folderNames[i]=="MUR"){
1227  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1228  const FolderSpec destFolder("/SCT/DAQ/Config/MUR",tagName);
1229  Folder target(writeDb,destFolder);
1230  writeMUR(result,target,destTag);
1231  }
1232  if (folderNames[i]=="Module"){
1233  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1234  const FolderSpec destFolder("/SCT/DAQ/Config/Module",tagName);
1235  Folder target(writeDb,destFolder);
1236  writeModule(result,target,destTag);
1237  }
1238  if (folderNames[i]=="Channel"){
1239  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1240  const FolderSpec destFolder("/SCT/DAQ/Config/Channel",tagName);
1241  Folder target(writeDb,destFolder);
1242  writeChannel(result,target,destTag);
1243  }
1244  if (folderNames[i]=="ROD"){
1245  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1246  const FolderSpec destFolder("/SCT/DAQ/Config/ROD",tagName);
1247  Folder target(writeDb,destFolder);
1248  writeRod(result,target,destTag);
1249  }
1250  if (folderNames[i]=="RODMUR"){
1251  const CCIovVectorMap_t &result = readCC(folder,selection,nData);
1252  const FolderSpec destFolder("/SCT/DAQ/Config/RODMUR",tagName);
1253  Folder target(writeDb,destFolder);
1254  writeRodmur(result,target,destTag);
1255  }
1256  //const IovVectorMap_t &result = read(folder,selection,5);
1257  //showResult(result);
1258  }
1259  }
1260  }
1261 
1262 
1263 
1264  return retcode;
1265 }

◆ makeRunInterval()

IovKey_t makeRunInterval ( const cool::ValidityKey  runstart,
const cool::ValidityKey  runend,
const cool::ChannelId  channelId 
)

Definition at line 260 of file openCoraCool.cxx.

260  {
261  cool::ValidityKey s =runstart<<32LL;
262  if (runend==cool::ValidityKeyMax) return IovKey_t(s, cool::ValidityKeyMax,channelId);
263  cool::ValidityKey e =(runend+1LL)<<32LL;
264  return IovKey_t(s, e,channelId);
265 }

◆ printRecordSpec()

void printRecordSpec ( const cool::RecordSpecification &  spec)

Definition at line 838 of file openCoraCool.cxx.

838  {
839  const std::string s("|");//TWiki table separator
840  std::cout<<"|*Payload Name*|*COOL Type*|"<<std::endl;
841  for (unsigned int i(0);i!=spec.size();++i){
842  const cool::IFieldSpecification& f=spec[i];
843  std::cout<<s<<f.name()<<s<<f.storageType().name()<<s<<std::endl;
844  }
845 }

◆ read()

IovVectorMap_t read ( const Folder theFolder,
const SelectionCriterion choice,
const unsigned int  limit = 10 
)

Definition at line 569 of file openCoraCool.cxx.

569  {
570  theFolder.ptr()->setPrefetchAll(false);
571  cool::IObjectIteratorPtr sourceitr;
572  if (theFolder.isSingleVersion()) {
573  sourceitr=theFolder.ptr()->browseObjects(choice.since, choice.until, choice.channels);
574  } else {
575  sourceitr=theFolder.ptr()->browseObjects(choice.since, choice.until, choice.channels, theFolder.tag());
576  }
577  unsigned int counter(0);
578  std::map<IovKey_t, cool::IRecordVector> mapOfVectorsByIov;
579  while (sourceitr->goToNext() and counter<limit) {
580  const cool::IObject& sobj=sourceitr->currentRef();
581  cool::IRecordIterator& spitr=sobj.payloadIterator();
582  const cool::IRecordVectorPtr svptr=spitr.fetchAllAsVector();
583  cool::IRecordVector::const_iterator svitr=svptr->begin();
584  cool::IRecordVector::const_iterator svend=svptr->end();
585  IovKey_t iov(sobj.since(),sobj.until(),sobj.channelId());
586  mapOfVectorsByIov[iov]=*svptr;
587  ++counter;
588  }
589  return mapOfVectorsByIov;
590 }

◆ readCC()

CCIovVectorMap_t readCC ( const Folder theFolder,
const SelectionCriterion choice,
const unsigned int  limit = 10 
)

Definition at line 547 of file openCoraCool.cxx.

547  {
548  theFolder.ccPtr()->setPrefetchAll(true);
549  CoraCoolObjectIterPtr sourceitr;
550  if (theFolder.isSingleVersion()) {
551  sourceitr=theFolder.ccPtr()->browseObjects(choice.since, choice.until, choice.channels);
552  } else {
553  sourceitr=theFolder.ccPtr()->browseObjects(choice.since, choice.until, choice.channels, theFolder.tag());
554  }
555  unsigned int counter(0);
556  std::map<IovKey_t, CoraCoolObject::AttrListVec> mapOfVectorsByIov;
557  while (sourceitr->hasNext() and (counter<limit)) {
558  CoraCoolObjectPtr obj=sourceitr->next();
559  IovKey_t iov(obj->since(),obj->until(),obj->channelId());
560  mapOfVectorsByIov[iov]=readOneDatum(obj);
561  ++counter;
562  }
563  return mapOfVectorsByIov;
564 }

◆ readOneDatum()

Definition at line 532 of file openCoraCool.cxx.

532  {
533  if (ccPtr->size()>0){
534  CoraCoolObject::const_iterator i(ccPtr->begin());
535  CoraCoolObject::const_iterator end(ccPtr->end());
537  return result;
538  }
539  CoraCoolObject::AttrListVec emptyArray;
540  return emptyArray;
541 }

◆ replaceTimestamp()

bool replaceTimestamp ( std::string &  metadata)

Definition at line 910 of file openCoraCool.cxx.

910  {
911  std::string::size_type p1,p2;
912  p1=metadata.find("<timeStamp>")+11;
913  p2=metadata.find("</timeStamp>");
914  const bool valid= ((p1<p2) and (p2!=std::string::npos));
915  if (valid) metadata.replace(p1,p2-11,"time");
916  return valid;
917 }

◆ setRecord() [1/2]

template<class R2 , class R1 >
void setRecord ( cool::Record &  r,
const coral::AttributeList &  a,
const std::string &  itemName 
)

Definition at line 621 of file openCoraCool.cxx.

621  {
622  setRecord<R2,R1>(r,a,itemName,itemName);
623 }

◆ setRecord() [2/2]

template<class R2 , class R1 >
void setRecord ( cool::Record &  r,
const coral::AttributeList &  a,
const std::string &  itemName,
const std::string &  targetName 
)

IovKey_t runLumiFromTimeStamp(const IovKey_t & timeStamp){ return timeStamp; }.

Definition at line 602 of file openCoraCool.cxx.

602  {
603  static bool warning(true);
604  try{
605  if (not a[itemName].isNull()){
606  const R1 attribute =a[itemName].data<R1>();
607  const R2 field = static_cast<R2>(attribute);
608  if (attribute != static_cast<R1>(field)) std::cout<<"Cast value mismatch, attr.="<<attribute<<", field="<<field<<std::endl;
609  r[targetName].setValue<R2>(attribute);
610  } else {
611  r[targetName].setNull();
612  }
613  } catch (coral::AttributeException & e) {
614  if (warning) std::cout<<itemName<<" gives exception"<<std::endl;
615  warning=true;
616  }
617 }

◆ showResult()

template<class T >
void showResult ( const T &  theResult,
const unsigned int  maxShown = 5 
)

Definition at line 860 of file openCoraCool.cxx.

860  {
861  for (const auto & i:theResult){
862  const IovKey_t &iov=i.first;
863  typename T::mapped_type dataVector=i.second;
864  std::cout<<"IOV: "<<iov.first<<","<<iov.second<<std::endl;
865  std::cout<<"Data: "<<std::endl;
866  const unsigned int numEntries=dataVector.size();
867  const unsigned int numberToShow=std::min(numEntries,maxShown);
868  for(unsigned int j(0);j!=numberToShow;++j){
869  const coral::AttributeList & thisEntry=getAttributes(dataVector[j]);
870  thisEntry.toOutputStream(std::cout);
871  std::cout<<std::endl;
872  }
873  }
874 }

◆ split() [1/2]

std::vector<std::string> split ( const std::string &  s,
char  delim 
)

Definition at line 958 of file openCoraCool.cxx.

958  {
959  std::vector<std::string> elems;
960  split(s, delim, elems);
961  return elems;
962 }

◆ split() [2/2]

std::vector<std::string>& split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)

Definition at line 949 of file openCoraCool.cxx.

949  {
950  std::stringstream ss(s);
951  std::string item;
952  while (std::getline(ss, item, delim)) {
953  elems.push_back(item);
954  }
955  return elems;
956 }

◆ time2RunLumi()

IovKey_t time2RunLumi ( const IovKey_t iov)

Definition at line 303 of file openCoraCool.cxx.

303  {
304  const auto since=iov.first;
305  const auto until=iov.second;
306  const auto channelId = iov.channelId;
307 
309 }

◆ transConn()

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

Definition at line 323 of file openCoraCool.cxx.

323  {
324  std::string result(inconn);
325  if (inconn.find('/')==std::string::npos) {
326  result= "sqlite://X;schema=/tmp/sroe/mycool.db;dbname="+inconn;
327  }
328  return result;
329 }

◆ writeChannel()

void writeChannel ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 748 of file openCoraCool.cxx.

748  {
749  //assumed monte carlo, translate IOVs
750  std::cout<<"data size "<<data.size()<<std::endl;
751  for (const auto &iov: data){
752  const IovKey_t & runLumi = time2RunLumi(iov.first);
753  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
754  //its going to be a Cool Vector Payload
755  cool::RecordSpecification rSpec = destination.payloadSpec();
756  cool::IRecordVector cvp;
757  for (auto const & attrList:thisVectorPayload){
758  cool::Record r(rSpec);
759  setRecord<Run2::Channel::crate_t, Run1::Channel::crate_t>(r,attrList,"crate");
760  setRecord<Run2::Channel::rod_t, Run1::Channel::rod_t>(r,attrList,"rod");
761  setRecord<Run2::Channel::channel_t, Run1::Channel::channel_t>(r,attrList,"channel");
762  setRecord<Run2::Channel::opCurrent_t, Run1::Channel::opCurrent_t>(r,attrList,"outputCurrent");
763  setRecord<Run2::Channel::opDelay_t, Run1::Channel::opDelay_t>(r,attrList,"outputDelay");
764  setRecord<Run2::Channel::opMarkSpace_t, Run1::Channel::opMarkSpace_t>(r,attrList,"outputMarkSpace");
765  setRecord<Run2::Channel::threshold_t, Run1::Channel::threshold_t>(r,attrList,"stream0Threshold");
766  setRecord<Run2::Channel::delay_t, Run1::Channel::delay_t>(r,attrList,"stream0Delay");
767  setRecord<Run2::Channel::errMask_t, Run1::Channel::errMask_t>(r,attrList,"stream0ErrMask");
768  setRecord<Run2::Channel::threshold_t, Run1::Channel::threshold_t>(r,attrList,"stream1Threshold");
769  setRecord<Run2::Channel::delay_t, Run1::Channel::delay_t>(r,attrList,"stream1Delay");
770  setRecord<Run2::Channel::errMask_t, Run1::Channel::errMask_t>(r,attrList,"stream1ErrMask");
771  const auto pRec=std::make_shared<cool::Record>(r);
772  cvp.push_back(pRec);
773  }
774  //std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
775  // std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
776 
777  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,runLumi.channelId,tag );
778  }
779 }

◆ writeChip()

void writeChip ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 627 of file openCoraCool.cxx.

627  {
628  //assumed monte carlo, translate IOVs
629  std::cout<<"data size "<<data.size()<<std::endl;
630  for (const auto &iov: data){
631  const IovKey_t & runLumi = time2RunLumi(iov.first);
632  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
633  //its going to be a Cool Vector Payload
634  cool::RecordSpecification rSpec = destination.payloadSpec();
635  cool::IRecordVector cvp;
636  for (auto const & attrList:thisVectorPayload){
637  cool::Record r(rSpec);
638  setRecord<Run2::Chip::chip_t, Run1::Chip::chip_t>(r,attrList, "chip");
639  setRecord<Run2::Chip::active_t, Run1::Chip::active_t>(r,attrList, "active");
640  setRecord<Run2::Chip::address_t, Run1::Chip::address_t>(r,attrList, "address");
641  setRecord<Run2::Chip::config_t, Run1::Chip::config_t>(r,attrList, "config");
642  setRecord<Run2::Chip::mask_t, Run1::Chip::mask_t>(r,attrList, "mask0");
643  setRecord<Run2::Chip::mask_t, Run1::Chip::mask_t>(r,attrList, "mask1");
644  setRecord<Run2::Chip::mask_t, Run1::Chip::mask_t>(r,attrList, "mask2");
645  setRecord<Run2::Chip::mask_t, Run1::Chip::mask_t>(r,attrList, "mask3");
646  setRecord<Run2::Chip::settings_t, Run1::Chip::settings_t>(r,attrList, "vthr");
647  setRecord<Run2::Chip::settings_t, Run1::Chip::settings_t>(r,attrList, "vcal");
648  setRecord<Run2::Chip::settings_t, Run1::Chip::settings_t>(r,attrList, "delay");
649  setRecord<Run2::Chip::settings_t, Run1::Chip::settings_t>(r,attrList, "preamp");
650  setRecord<Run2::Chip::settings_t, Run1::Chip::settings_t>(r,attrList, "shaper");
651  setRecord<Run2::Chip::rc_t, Run1::Chip::rc_t>(r,attrList, "rc_function");
652  setRecord<Run2::Chip::rcArgs_t, Run1::Chip::rcArgs_t>(r, attrList,"rc_args");
653  setRecord<Run2::Chip::c_t, Run1::Chip::c_t>(r, attrList,"c_factor");
654  setRecord<Run2::Chip::target_t, Run1::Chip::target_t>(r,attrList,"target");
655  setRecord<Run2::Chip::trim_t, Run1::Chip::trim_t>(r,attrList,"trim");
656 
657  const auto pRec=std::make_shared<cool::Record>(r);
658  cvp.push_back(pRec);
659  }
660  //std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
661  // std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
662 
663  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,(runLumi.channelId-1),tag );
664  }
665 }

◆ writeGeog()

void writeGeog ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 667 of file openCoraCool.cxx.

667  {
668  //assumed monte carlo, translate IOVs
669  std::cout<<"data size "<<data.size()<<std::endl;
670  for (const auto &iov: data){
671  const IovKey_t & runLumi = time2RunLumi(iov.first);
672  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
673  //its going to be a Cool Vector Payload
674  cool::RecordSpecification rSpec = destination.payloadSpec();
675  cool::IRecordVector cvp;
676  for (auto const & attrList:thisVectorPayload){
677  cool::Record r(rSpec);
678  setRecord<Run2::Geog::MUR_t, Run1::Geog::MUR_t>(r,attrList,"MUR");
679  setRecord<Run2::Geog::super_t, Run1::Geog::super_t>(r,attrList,"super");
680  setRecord<Run2::Geog::medium_t, Run1::Geog::medium_t>(r,attrList,"medium");
681  setRecord<Run2::Geog::position_t, Run1::Geog::position_t>(r,attrList,"position");
682 
683  const auto pRec=std::make_shared<cool::Record>(r);
684  cvp.push_back(pRec);
685  }
686  std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
687  std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
688  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,runLumi.channelId,tag );
689  }
690 }

◆ writeModule()

void writeModule ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 720 of file openCoraCool.cxx.

720  {
721  //assumed monte carlo, translate IOVs
722  std::cout<<"data size "<<data.size()<<std::endl;
723  for (const auto &iov: data){
724  const IovKey_t & runLumi = time2RunLumi(iov.first);
725  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
726  //its going to be a Cool Vector Payload
727  cool::RecordSpecification rSpec = destination.payloadSpec();
728  cool::IRecordVector cvp;
729  for (auto const & attrList:thisVectorPayload){
730  cool::Record r(rSpec);
731  setRecord<Run2::Module::id_t, Run1::Module::id_t>(r,attrList,"id");
732  setRecord<Run2::Module::group_t, Run1::Module::group_t>(r,attrList,"group","slaveGroup");
733  setRecord<Run2::Module::active_t, Run1::Module::active_t>(r,attrList,"active");
734  setRecord<Run2::Module::select_t, Run1::Module::select_t>(r,attrList,"select","clockSelect");
735  //the chipStatus is only in run 2
736  r["chipStatus"].setValue<Run2::Module::chipStatus_t>(static_cast<Run2::Module::chipStatus_t>(0x0FFF));
737  const auto pRec=std::make_shared<cool::Record>(r);
738  cvp.push_back(pRec);
739  }
740  //std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
741  // std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
742 
743  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,(runLumi.channelId-1),tag );
744  }
745 }

◆ writeMUR()

void writeMUR ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 692 of file openCoraCool.cxx.

692  {
693  //assumed monte carlo, translate IOVs
694  std::cout<<"data size "<<data.size()<<std::endl;
695  for (const auto &iov: data){
696  const IovKey_t & runLumi = time2RunLumi(iov.first);
697  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
698  //its going to be a Cool Vector Payload
699  cool::RecordSpecification rSpec = destination.payloadSpec();
700  cool::IRecordVector cvp;
701  for (auto const & attrList:thisVectorPayload){
702  cool::Record r(rSpec);
703  setRecord<Run2::MUR::MUR_t, Run1::MUR::MUR_t>(r,attrList,"MUR");
704  setRecord<Run2::MUR::module_t, Run1::MUR::module_t>(r,attrList,"module");
705  setRecord<Run2::MUR::moduleId_t, Run1::MUR::moduleId_t>(r,attrList,"moduleID");
706  setRecord<Run2::MUR::moduleId_t, Run1::MUR::moduleId_t>(r,attrList,"rmoduleID");
707  setRecord<Run2::MUR::xxFibre_t, Run1::MUR::xxFibre_t>(r,attrList,"rx0Fibre");
708  setRecord<Run2::MUR::xxFibre_t, Run1::MUR::xxFibre_t>(r,attrList,"rx1Fibre");
709  setRecord<Run2::MUR::xxFibre_t, Run1::MUR::xxFibre_t>(r,attrList,"txFibre");
710  const auto pRec=std::make_shared<cool::Record>(r);
711  cvp.push_back(pRec);
712  }
713  std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
714  std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
715 
716  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,runLumi.channelId,tag );
717  }
718 }

◆ writeRod()

void writeRod ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 781 of file openCoraCool.cxx.

781  {
782  //assumed monte carlo, translate IOVs
783  std::cout<<"data size "<<data.size()<<std::endl;
784  for (const auto &iov: data){
785  const IovKey_t & runLumi = time2RunLumi(iov.first);
786  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
787  //its going to be a Cool Vector Payload
788  cool::RecordSpecification rSpec = destination.payloadSpec();
789  cool::IRecordVector cvp;
790  for (auto const & attrList:thisVectorPayload){
791  cool::Record r(rSpec);
792  setRecord<Run2::ROD::crate_t, Run1::ROD::crate_t>(r,attrList,"crate");
793  setRecord<Run2::ROD::slot_t, Run1::ROD::slot_t>(r,attrList,"slot");
794  setRecord<Run2::ROD::ROB_t, Run1::ROD::ROB_t>(r,attrList,"ROB");
795  setRecord<Run2::ROD::SRC_t, Run1::ROD::SRC_t>(r,attrList,"SRCid");
796  setRecord<Run2::ROD::bcid_t, Run1::ROD::bcid_t>(r,attrList,"BCIDOffset");
797  setRecord<Run2::ROD::slave_t, Run1::ROD::slave_t>(r,attrList,"slave0");
798  setRecord<Run2::ROD::slave_t, Run1::ROD::slave_t>(r,attrList,"slave1");
799  setRecord<Run2::ROD::slave_t, Run1::ROD::slave_t>(r,attrList,"slave2");
800  setRecord<Run2::ROD::slave_t, Run1::ROD::slave_t>(r,attrList,"slave3");
801  const auto pRec=std::make_shared<cool::Record>(r);
802  cvp.push_back(pRec);
803  }
804  std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
805  std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
806 
807  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,runLumi.channelId,tag );
808  }
809 }

◆ writeRodmur()

void writeRodmur ( const CCIovVectorMap_t data,
const Folder destination,
const std::string &  tag 
)

Definition at line 812 of file openCoraCool.cxx.

812  {
813  //assumed monte carlo, translate IOVs
814  std::cout<<"data size "<<data.size()<<std::endl;
815  for (const auto &iov: data){
816  const IovKey_t & runLumi = time2RunLumi(iov.first);
817  const CoraCoolObject::AttrListVec & thisVectorPayload = iov.second;
818  //its going to be a Cool Vector Payload
819  cool::RecordSpecification rSpec = destination.payloadSpec();
820  cool::IRecordVector cvp;
821  for (auto const & attrList:thisVectorPayload){
822  cool::Record r(rSpec);
823  setRecord<Run2::RODMUR::crate_t, Run1::RODMUR::crate_t>(r,attrList,"crate");
824  setRecord<Run2::RODMUR::rod_t, Run1::RODMUR::rod_t>(r,attrList,"rod");
825  setRecord<Run2::RODMUR::position_t, Run1::RODMUR::position_t>(r,attrList,"position");
826  setRecord<Run2::RODMUR::MUR_t, Run1::RODMUR::MUR_t>(r,attrList,"MUR");
827  const auto pRec=std::make_shared<cool::Record>(r);
828  cvp.push_back(pRec);
829  }
830  std::cout<<iov.first.first<<"-"<<iov.first.second<<" : "<<iov.first.channelId<<std::endl;
831  std::cout<<">"<<runLumi.first<<"-"<<runLumi.second<<" : "<<runLumi.channelId<<std::endl;
832 
833  destination.ptr()->storeObject(runLumi.first,runLumi.second,cvp,runLumi.channelId,tag );
834  }
835 }
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
beamspotman.r
def r
Definition: beamspotman.py:676
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
splitString
std::vector< std::string > splitString(const std::string &in, const std::string &delim)
Definition: LArQuickHistMerge.cxx:434
get_generator_info.result
result
Definition: get_generator_info.py:21
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
makeDTCalibBlob_pickPhase.theFolder
theFolder
Definition: makeDTCalibBlob_pickPhase.py:383
writeRod
void writeRod(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:781
Folder::description
std::string description() const
Definition: MakeReferenceFile.cxx:177
FolderSpec
Definition: MakeReferenceFile.cxx:109
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
convertTagToRun2
std::string convertTagToRun2(const std::string &run1Tag)
Definition: openCoraCool.cxx:411
readOneDatum
CoraCoolObject::AttrListVec readOneDatum(const CoraCoolObjectPtr &ccPtr)
Definition: openCoraCool.cxx:532
MyKey::first
cool::ValidityKey first
Definition: openCoraCool.cxx:34
CaloCondBlobAlgs_fillNoiseFromASCII.spec
spec
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:47
index
Definition: index.py:1
writeMUR
void writeMUR(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:692
MyKey::channelId
cool::ChannelId channelId
Definition: openCoraCool.cxx:36
MyKey
Definition: openCoraCool.cxx:33
DbConnection
Definition: MakeReferenceFile.cxx:42
TRTCalib_cfilter.p1
p1
Definition: TRTCalib_cfilter.py:130
Cut::all
@ all
Definition: SUSYToolsAlg.cxx:67
IovKey_t
MyKey IovKey_t
Definition: openCoraCool.cxx:49
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
writeChip
void writeChip(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:627
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
CaloCondBlobAlgs_fillNoiseFromASCII.folderPath
string folderPath
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:51
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
FolderSpec::name
const std::string name
Definition: MakeReferenceFile.cxx:110
dq_defect_copy_defect_database.since
def since
Definition: dq_defect_copy_defect_database.py:54
CCIovVectorMap_t
std::map< IovKey_t, CoraCoolObject::AttrListVec > CCIovVectorMap_t
Definition: openCoraCool.cxx:51
time2RunLumi
IovKey_t time2RunLumi(const IovKey_t &iov)
Definition: openCoraCool.cxx:303
python.checkMetadata.metadata
metadata
Definition: checkMetadata.py:175
dq_defect_copy_defect_database.until
def until
Definition: dq_defect_copy_defect_database.py:55
printRecordSpec
void printRecordSpec(const cool::RecordSpecification &spec)
Definition: openCoraCool.cxx:838
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
calibdata.valid
list valid
Definition: calibdata.py:45
TRTCalib_cfilter.p2
p2
Definition: TRTCalib_cfilter.py:131
CoraCoolObject::const_iterator
AttrListVec::const_iterator const_iterator
Definition: CoraCoolObject.h:23
getAttributes
const coral::AttributeList & getAttributes(const coral::AttributeList &vectorEntry)
Definition: openCoraCool.cxx:849
createLocalCopyStructure
cool::IFolderPtr createLocalCopyStructure(const Folder &sourceFolder, const DbConnection &writeDb, const bool forceTimestamp=false)
Definition: openCoraCool.cxx:920
Run2::Module::chipStatus_t
cool::UInt16 chipStatus_t
Definition: openCoraCool.cxx:170
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
beamspotman.n
n
Definition: beamspotman.py:731
PixelModuleFeMask_create_db.dbName
string dbName
Definition: PixelModuleFeMask_create_db.py:21
MyKey::second
cool::ValidityKey second
Definition: openCoraCool.cxx:35
readCC
CCIovVectorMap_t readCC(const Folder &theFolder, const SelectionCriterion &choice, const unsigned int limit=10)
Definition: openCoraCool.cxx:547
hist_file_dump.f
f
Definition: hist_file_dump.py:135
Folder::payloadSpec
cool::RecordSpecification payloadSpec() const
specification of the payload entries
Definition: MakeReferenceFile.cxx:183
split
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
Definition: openCoraCool.cxx:949
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
selection
std::string selection
Definition: fbtTestBasics.cxx:75
calibdata.exit
exit
Definition: calibdata.py:236
Folder
Definition: MakeReferenceFile.cxx:118
min
#define min(a, b)
Definition: cfImp.cxx:40
convertSince
cool::ValidityKey convertSince(const cool::ValidityKey &since)
Definition: openCoraCool.cxx:287
replaceTimestamp
bool replaceTimestamp(std::string &metadata)
Definition: openCoraCool.cxx:910
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
CoraCoolObject::AttrListVec
std::vector< coral::AttributeList > AttrListVec
Definition: CoraCoolObject.h:22
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
writeModule
void writeModule(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:720
Folder::ptr
const cool::IFolderPtr & ptr() const
Definition: MakeReferenceFile.cxx:159
item
Definition: ItemListSvc.h:43
Folder::folderSpec
const FolderSpec & folderSpec() const
Definition: MakeReferenceFile.cxx:153
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:39
writeRodmur
void writeRodmur(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:812
DeMoScan.index
string index
Definition: DeMoScan.py:364
a
TList * a
Definition: liststreamerinfos.cxx:10
CoraCoolObjectIterPtr
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
Definition: CoraCoolTypes.h:21
copySelective.target
string target
Definition: copySelective.py:37
CoraCoolObjectPtr
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
Definition: CoraCoolTypes.h:18
python.AtlRunQueryAMI.choice
int choice
Definition: AtlRunQueryAMI.py:210
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
convertUntil
cool::ValidityKey convertUntil(const cool::ValidityKey &until)
Definition: openCoraCool.cxx:271
writeChannel
void writeChannel(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:748
DbConnection::dbPtr
cool::IDatabasePtr dbPtr() const
Definition: MakeReferenceFile.cxx:97
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
test_pyathena.counter
counter
Definition: test_pyathena.py:15
python.PyAthena.obj
obj
Definition: PyAthena.py:132
writeGeog
void writeGeog(const CCIovVectorMap_t &data, const Folder &destination, const std::string &tag)
Definition: openCoraCool.cxx:667
updateCoolNtuple.limit
int limit
Definition: updateCoolNtuple.py:45
makeRunInterval
IovKey_t makeRunInterval(const cool::ValidityKey runstart, const cool::ValidityKey runend, const cool::ChannelId channelId)
Definition: openCoraCool.cxx:260
SelectionCriterion
Definition: openCoraCool.cxx:520
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88