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;
47 cool::IFolderPtr folder =
m_coolDb->getFolder(folderStr.c_str());
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) {
141 while (objects->goToNext()) {
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;
153 dumpField(cool::ChannelId channelId, std::string field, std::string tag_name) {
156 cool::ChannelSelection
selection = cool::ChannelSelection(channelId);
158 while (objects->goToNext()) {
159 const cool::IObject& element = objects->currentRef();
160 result = element.payloadValue(field);
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) {
176 return atoi(
result.c_str());
182 dumpall(
const std::string& tag_name) {
183 this->
dump(cool::ChannelSelection::all(), tag_name);
188 insert_helper(cool::ChannelId channelId, coral::AttributeList& payload,
189 const std::string& tag_name) {
190 cool::ConstRecordAdapter record(
m_coolFolder->payloadSpecification(), payload);
191 if (tag_name ==
"HEAD") {
196 m_coolFolder->payloadSpecification(), payload), channelId, tag_name,
true);