12 #include "CoralBase/Attribute.h"
15 #include "CoolKernel/IDatabase.h"
16 #include "CoolKernel/IFolder.h"
17 #include "CoolKernel/IObjectIterator.h"
18 #include "CoolKernel/IObject.h"
19 #include "CoolKernel/Record.h"
20 #include "CoolKernel/Exception.h"
21 #include "CoolKernel/IDatabaseSvc.h"
22 #include "CoolKernel/StorageType.h"
23 #include "CoolKernel/ConstRecordAdapter.h"
32 std::cout <<
"Opening database '" << dbStr <<
"'...";
33 cool::IDatabaseSvc&
dbSvc = this->databaseService();
34 std::cout <<
"done." << std::endl;
35 return dbSvc.openDatabase(dbStr.c_str(), readOnly);
37 catch (cool::DatabaseDoesNotExist&) {
38 std::cout <<
"Error! Database does not exist!" << std::endl;
48 std::cout <<
"Browsing objects of '" << folderStr <<
"'" << std::endl;
52 catch (cool::FolderNotFound&) {
53 std::cout <<
"Error! Folder '" << folderStr <<
"' does not exist!" << std::endl;
72 setIOV(cool::Int64 runS, cool::Int64 lumiS, cool::Int64 runU, cool::Int64 lumiU) {
82 this->
setUntil(run, cool::UInt32Max);
89 cool::Int64 runS =
m_since >> 32;
90 cool::Int64 lumiS =
m_since - (runS << 32);
91 cool::Int64 runU =
m_until >> 32;
92 cool::Int64 lumiU =
m_until - (runU << 32);
93 std::cout <<
"Using IOVrange [(" << runS <<
"," << lumiS <<
"),(" << runU <<
"," << lumiU <<
")[ " <<
"[" <<
105 Initialize(
const std::string& dbStr,
const std::string& folderStr,
int runS,
int lumiS,
int runU,
int lumiU) {
108 this->
setIOV(runS, lumiS, runU, lumiU);
112 StatusFlagCOOLBase (
const std::string& dbStr,
const std::string& folderStr,
int runS,
int lumiS,
int runU,
114 Initialize(dbStr, folderStr, runS, lumiS, runU, lumiU);
119 Initialize(
"COOLOFL_GLOBAL/OFLP200",
"/GLOBAL/DETSTATUS/SHIFTOFL",
120 runS, lumiS, runU, lumiU);
125 Initialize(
"COOLOFL_GLOBAL/OFLP200",
"/GLOBAL/DETSTATUS/SHIFTOFL",
133 std::cout <<
"Cleared!" << std::endl;
138 dump(cool::ChannelSelection
selection, std::string tag_name) {
142 const cool::IObject& element =
objects->currentRef();
143 std::cout << element << std::endl;
146 catch (cool::Exception&
e) {
147 std::cout <<
"Unknown exception caught!" <<
e.what() << std::endl;
159 const cool::IObject& element =
objects->currentRef();
163 catch (cool::Exception&
e) {
164 std::cout <<
"Unknown exception caught!" <<
e.what() << std::endl;
171 dumpCode(
const std::string& channelName,
const std::string& tag_name) {
182 dumpall(
const std::string& tag_name) {
189 const std::string& tag_name) {
191 if (tag_name ==
"HEAD") {