38 descriptions.
add(
"triggerJSONMonitoring", desc);
53 if (!HLTR.isValid()) {
60 for (
unsigned int i=0;
i<
n;
i++) {
66 const int index(static_cast<int>(HLTR->index(
i)));
67 if (HLTR->accept(
i)) {
77 std::vector<bool> acceptedByDS(
hltIndex_.size(),
false);
78 for (
unsigned int ds=0; ds <
hltIndex_.size(); ds++) {
80 if (acceptedByDS[ds]>0 || HLTR->accept(
hltIndex_[ds][
p]) ) {
81 acceptedByDS[ds] =
true;
114 for (
unsigned int ds = 0; ds < d; ds++) {
117 for (
unsigned int p = 0;
p <
size;
p++) {
127 for (
unsigned int i = 0;
i <
n; ++
i) {
131 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
133 if (label ==
"HLTLevel1GTSeed")
135 else if (label ==
"HLTPrescaler")
172 if (not boost::filesystem::is_directory(monPath)) boost::filesystem::create_directories(monPath);
178 LogDebug(
"TriggerJSONMonitoring") <<
"HLTConfigProvider initialization failed!" << std::endl;
182 unsigned int nRun = iRun.
run();
185 std::stringstream sjsdr;
186 sjsdr <<
baseRunDir_ +
"/mon/run" << nRun <<
"_ls0000";
187 sjsdr <<
"_HLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsd";
193 std::stringstream sjsdl;
194 sjsdl <<
baseRunDir_ <<
"/mon/run" << nRun <<
"_ls0000";
195 sjsdl <<
"_HLTRatesLegend_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsd";
204 std::shared_ptr<hltJson::lumiVars>
209 unsigned int MAXPATHS = 500;
279 gethostname(hostname,32);
286 unsigned int iRun = iLumi.
run();
304 std::stringstream sjsnr;
305 sjsnr << monPath <<
"/run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
306 sjsnr <<
"_HLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
308 std::ofstream outJsnFileR( sjsnr.str() );
319 result = writer.
write(hltNames);
321 std::stringstream sjsnl;
322 sjsnl << monPath <<
"/run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
323 sjsnl <<
"_HLTRatesLegend_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
325 std::ofstream outJsnFileL( sjsnl.str() );
354 outfile <<
"{" << std::endl;
355 outfile <<
" \"data\" : [" << std::endl;
357 outfile <<
" \"name\" : \"Processed\"," ;
358 outfile <<
" type = \"integer\"," ;
359 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
362 outfile <<
" \"name\" : \"Path-WasRun\"," ;
363 outfile <<
" type = \"integer\"," ;
364 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
367 outfile <<
" \"name\" : \"Path-AfterL1Seed\"," ;
368 outfile <<
" type = \"integer\"," ;
369 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
372 outfile <<
" \"name\" : \"Path-AfterPrescale\"," ;
373 outfile <<
" type = \"integer\"," ;
374 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
377 outfile <<
" \"name\" : \"Path-Accepted\"," ;
378 outfile <<
" type = \"integer\"," ;
379 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
382 outfile <<
" \"name\" : \"Path-Rejected\"," ;
383 outfile <<
" type = \"integer\"," ;
384 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
387 outfile <<
" \"name\" : \"Path-Errors\"," ;
388 outfile <<
" type = \"integer\"," ;
389 outfile <<
" \"operation\" : \"sum\"}," << std::endl;
392 outfile <<
" \"name\" : \"Dataset-Accepted\"," ;
393 outfile <<
" type = \"integer\"," ;
394 outfile <<
" \"operation\" : \"sum\"}" << std::endl;
396 outfile <<
" ]" << std::endl;
397 outfile <<
"}" << std::endl;
405 std::ofstream legfile(path);
406 legfile <<
"{" << std::endl;
407 legfile <<
" \"data\" : [" << std::endl;
409 legfile <<
" \"name\" : \"Path-Names\"," ;
410 legfile <<
" type = \"string\"," ;
411 legfile <<
" \"operation\" : \"cat\"}," << std::endl;
414 legfile <<
" \"name\" : \"Dataset-Names\"," ;
415 legfile <<
" type = \"string\"," ;
416 legfile <<
" \"operation\" : \"cat\"}" << std::endl;
417 legfile <<
" ]" << std::endl;
418 legfile <<
"}" << std::endl;
HistoJ< std::string > * datasetNames
TriggerJSONMonitoring(const edm::ParameterSet &)
void resetRun(bool changed)
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HistoJ< unsigned int > * hltReject
std::vector< unsigned int > hltDatasets_
static std::shared_ptr< hltJson::lumiVars > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool exists(std::string const ¶meterName) const
checks if a parameter exists
HistoJ< unsigned int > * hltErrors
Value & append(const Value &value)
Append value to array at the end.
std::vector< unsigned int > hltErrors_
static void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, hltJson::lumiVars *)
void beginRun(edm::Run const &, edm::EventSetup const &)
HistoJ< unsigned int > * processed
std::vector< unsigned int > hltL1s_
std::string jsonLegendDefFile_
std::string jsonRateDefFile_
std::vector< std::vector< unsigned int > > hltIndex_
std::vector< T > & value()
HistoJ< unsigned int > * hltAccept
std::vector< unsigned int > hltAccept_
LuminosityBlockNumber_t luminosityBlock() const
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
tuple path
else: Piece not in the list, fine.
void endLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, hltJson::lumiVars *) const
std::vector< std::string > hltNames_
HLTConfigProvider hltConfig_
std::vector< std::string > datasetNames_
std::vector< unsigned int > hltReject_
HistoJ< unsigned int > * hltPre
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual std::string write(const Value &root)
Serialize a Value in JSON format.
std::vector< int > posL1s_
std::string jsonRateDefFile
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
HistoJ< unsigned int > * hltDatasets
virtual std::string toString() const
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
void add(std::string const &label, ParameterSetDescription const &psetDescription)
HistoJ< std::string > * hltNames
void writeDefJson(std::string path)
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
std::vector< unsigned int > hltWasRun_
std::vector< std::vector< std::string > > datasetContents_
std::vector< int > posPre_
HistoJ< unsigned int > * hltL1s
edm::InputTag triggerResults_
std::string jsonLegendDefFile
void analyze(edm::Event const &, edm::EventSetup const &)
Writes a Value in JSON format in a human friendly way.
HistoJ< unsigned int > * hltWasRun
tuple size
Write out results.
void writeDefLegJson(std::string path)
const std::vector< std::string > & datasetNames() const
std::vector< unsigned int > hltPre_