#include <iostream>
#include <string>
#include <vector>
#include <map>
#include "Jeep/JParser.hh"
#include "TH1.h"
#include "TFile.h"
#include "TKey.h"
Go to the source code of this file.
◆ main()
Definition at line 15 of file JMergeNB.cc.
15 {
16
19
20 try {
21
23
26
28 }
29 catch(const exception &error) {
31 }
32
34 map_type zmap;
35
37 cout <<
" Now processing: " << *i <<
endl;
38 TFile in(i->c_str() ,
"read");
39
41
43
44 TH1* h =
dynamic_cast<TH1*
>(
key->ReadObj());
45
47
48 map_type::iterator p = zmap.find(h->GetName());
49
50 if (p == zmap.end()){
51
52 p = zmap.insert(
make_pair( h->GetName(), (
TH1*) h->Clone() )).first;
53
54 } else {
55
56 p->second->Add(h);
57 }
58 }
59 }
60
61 for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
62 i->second->SetDirectory(0);
63 }
64
65 in.Close();
66 }
67
69 for (map_type::iterator i = zmap.begin(); i != zmap.end(); ++i) {
70
73 }
74 output.Close();
75}
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Template definition of a multi-dimensional oscillation probability interpolation table.
std::map< int, buffer_type > map_type
identifier -> hits