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) {