Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 14 of file FWLiteLumiAccess.cc.
References dir2webdir::argc, GCPpyPlots::argv, gather_cfg::cout, FWLiteEnabler::enable(), makeMEIFBenchmarkPlots::ev, testHGCalDigi_cfg::inFile, eostools::ls(), writedatasetfile::parser, alignCSCRings::r, and edmLumisInFiles::summary.
16 gSystem->Load(
"libFWCoreFWLite");
24 std::vector<std::string> inputFiles_ =
parser.stringVector(
"inputFiles");
26 for (
unsigned int iFile = 0; iFile < inputFiles_.size(); ++iFile) {
28 TFile*
inFile = TFile::Open(inputFiles_[iFile].c_str());
33 std::cout <<
"----------- Accessing by event ----------------" << std::endl;
37 for (
ev.toBegin(); !
ev.atEnd(); ++
ev) {
39 std::cout <<
" Luminosity ID " <<
ev.getLuminosityBlock().id() << std::endl;
41 std::cout <<
" Run ID " <<
ev.getRun().id() << std::endl;
43 std::cout <<
"Run via lumi " <<
ev.getLuminosityBlock().getRun().id() << std::endl;
46 summary.getByLabel(
ev.getLuminosityBlock(),
"lumiProducer");
49 std::cout <<
"----------- Accessing by lumi block ----------------" << std::endl;
51 double lumi_tot = 0.0;
54 for (
ls.toBegin(); !
ls.atEnd(); ++
ls) {
56 std::cout <<
ls.id() <<
" Inst. Luminosity = " <<
summary->avgInsRecLumi() << std::endl;
58 std::cout <<
"Run from lumi " <<
ls.getRun().id() << std::endl;
60 lumi_tot +=
summary->avgInsRecLumi();
63 std::cout <<
"----------------------------------------------------" << std::endl;
64 std::cout <<
"Total luminosity from lumi sections = " << lumi_tot << std::endl;
65 std::cout <<
"----------------------------------------------------" << std::endl;
67 std::cout <<
"----------- Accessing by run ----------------" << std::endl;
71 for (
r.toBegin(); !
r.atEnd(); ++
r) {
static void enable()
enable automatic library loading