32 gSystem->Load(
"libFWCoreFWLite");
39 parser.integerValue(
"maxEvents") = 1000;
40 parser.integerValue(
"outputEvery") = 10;
41 parser.stringValue(
"outputFile") =
"analyzeEdmTuple.root";
45 int maxEvents_ =
parser.integerValue(
"maxEvents");
46 unsigned int outputEvery_ =
parser.integerValue(
"outputEvery");
48 std::vector<std::string> inputFiles_ =
parser.stringVector(
"inputFiles");
53 TH1F* muonPt_ =
dir.make<TH1F>(
"muonPt",
"pt", 100, 0., 300.);
54 TH1F* muonEta_ =
dir.make<TH1F>(
"muonEta",
"eta", 100, -3., 3.);
55 TH1F* muonPhi_ =
dir.make<TH1F>(
"muonPhi",
"phi", 100, -5., 5.);
59 for (
unsigned int iFile = 0; iFile < inputFiles_.size(); ++iFile) {
61 TFile* inFile = TFile::Open(inputFiles_[iFile].c_str());
72 for (
ev.toBegin(); !
ev.atEnd(); ++
ev, ++ievt) {
75 if (maxEvents_ > 0 ? ievt + 1 > maxEvents_ :
false)
78 if (outputEvery_ != 0 ? (ievt > 0 && ievt % outputEvery_ == 0) :
false)
79 std::cout <<
" processing event: " << ievt << std::endl;
85 for (std::vector<float>::const_iterator mu1 =
muonPt->begin(); mu1 !=
muonPt->end(); ++mu1) {
91 for (std::vector<float>::const_iterator mu1 =
muonEta->begin(); mu1 !=
muonEta->end(); ++mu1) {
97 for (std::vector<float>::const_iterator mu1 =
muonPhi->begin(); mu1 !=
muonPhi->end(); ++mu1) {
106 if (maxEvents_ > 0 ? ievt + 1 > maxEvents_ :
false)