Skip to content

Commit 2315e8d

Browse files
author
Chris Sullivan
committed
Added argument to MPILooper to specify treename
1 parent e5b58e9 commit 2315e8d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

include/EventLoop.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class EventLoop : public MPILooper {
44
public:
5-
EventLoop(vector<string>);
5+
EventLoop(const char* treename, vector<string>);
66
~EventLoop();
77
virtual void Setup();
88

include/MPILooper.hh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using namespace std;
2020

2121
class MPILooper {
2222
public:
23-
MPILooper(vector<string>);
23+
MPILooper(const char* treename, vector<string>);
2424
virtual ~MPILooper();
2525

2626
void Run();

mpilooper.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main(int argc, char** argv) {
2626

2727
MPI_Init(&argc, &argv);
2828

29-
EventLoop analyzer(GetInputFiles("./inputfiles.dat"));
29+
EventLoop analyzer("simtree",GetInputFiles("./inputfiles.dat"));
3030
if (argc > 1) { analyzer.SetOutputPath(argv[1]); }
3131
analyzer.Run();
3232

src/EventLoop.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ void EventLoop::Process(const int& entry) {
77

88
}
99

10-
EventLoop::EventLoop(vector<string> inputs)
11-
: MPILooper(inputs) { Setup(); }
10+
EventLoop::EventLoop(const char* treename, vector<string> inputs)
11+
: MPILooper(treename, inputs) { Setup(); }
1212

1313
EventLoop::~EventLoop(){
1414

src/MPILooper.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
#include <TSelectorList.h>
2222

2323

24-
MPILooper::MPILooper(vector<string> inputlist)
24+
MPILooper::MPILooper(const char* treename, vector<string> inputlist)
2525
: m_selector(new TSelectorList()) {
2626

2727
MPI_Comm_size(MPI_COMM_WORLD, &m_size);
2828
MPI_Comm_rank(MPI_COMM_WORLD, &m_rank);
29-
m_chain = make_shared<TChain>("simtree");
29+
m_chain = make_shared<TChain>(treename);
3030

3131
// add all input files to the TChain
3232
for(auto fn : inputlist) {

0 commit comments

Comments
 (0)