20#include <boost/program_options.hpp>
32 std::map<std::string, std::string> metadata;
34 std::cout <<
"number of bad channels = " << badChannels->size() << std::endl;
36 for (
const auto& badChannel : *badChannels) {
37 std::cout << badChannel <<
"\n";
44 std::vector<o2::mid::ColumnData> badChannels;
48 std::map<std::string, std::string> md;
49 std::cout <<
"storing default MID bad channels (valid from " << timestamp <<
") to " <<
BadChannelCCDBPath <<
"\n";
54int main(
int argc,
char** argv)
57 po::options_description
usage(
"Usage");
65 uint64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
69 (
"help,h",
"produce help message")
70 (
"ccdb,c",po::value<std::string>(&
ccdbUrl)->default_value(
"http://ccdb-test.cern.ch:8080"),
"ccdb url")
71 (
"timestamp,t",po::value<long>(×tamp)->default_value(now),
"timestamp for query or put")
72 (
"put,p",po::bool_switch(&put),
"upload bad channel default object")
73 (
"query,q",po::bool_switch(&query),
"dump bad channel object from CCDB")
74 (
"verbose,v",po::bool_switch(&verbose),
"verbose output")
78 po::options_description cmdline;
81 po::store(po::command_line_parser(argc, argv).options(cmdline).run(), vm);
83 if (vm.count(
"help")) {
84 std::cout <<
"Dump or upload MID bad channels CCDB object\n";
85 std::cout <<
usage <<
"\n";
91 }
catch (boost::program_options::error&
e) {
92 std::cout <<
"Error: " <<
e.what() <<
"\n";
Strip pattern (aka digits)
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
const std::string BadChannelCCDBPath
void queryBadChannels(const std::string ccdbUrl, long timestamp, bool verbose)
void uploadBadChannels(const std::string ccdbUrl, long timestamp)
int storeAsTFileAny(const T *obj, std::string const &path, std::map< std::string, std::string > const &metadata, long startValidityTimestamp=-1, long endValidityTimestamp=-1, std::vector< char >::size_type maxSize=0) const
void init(std::string const &hosts)
std::enable_if<!std::is_base_of< o2::conf::ConfigurableParam, T >::value, T * >::type retrieveFromTFileAny(std::string const &path, std::map< std::string, std::string > const &metadata, long timestamp=-1, std::map< std::string, std::string > *headers=nullptr, std::string const &etag="", const std::string &createdNotAfter="", const std::string &createdNotBefore="") const
static constexpr long INFINITE_TIMESTAMP
GLsizeiptr const void GLenum usage