13 |
|
#ifndef MITANA_PHYSICSMOD_PUBLISHERMOD_H |
14 |
|
#define MITANA_PHYSICSMOD_PUBLISHERMOD_H |
15 |
|
|
16 |
+ |
#include "MitAna/DataCont/interface/Collection.h" |
17 |
+ |
#include "MitAna/DataCont/interface/ObjArray.h" |
18 |
|
#include "MitAna/TreeMod/interface/BaseMod.h" |
17 |
– |
#include "MitAna/DataTree/interface/Collections.h" |
19 |
|
|
20 |
|
namespace mithep |
21 |
|
{ |
25 |
|
public: |
26 |
|
PublisherMod(const char *name="PublisherMod", |
27 |
|
const char *title="Publisher module"); |
27 |
– |
~PublisherMod() {} |
28 |
|
|
29 |
|
const char *GetBranchName() const { return fBranchName; } |
30 |
|
const char *GetInputName() const { return GetBranchName(); } |
48 |
|
void SlaveBegin(); |
49 |
|
void SlaveTerminate(); |
50 |
|
|
51 |
< |
ClassDefT(PublisherMod, 1) // Publisher module |
51 |
> |
ClassDef(PublisherMod, 1) // Publisher module |
52 |
|
}; |
53 |
|
} |
54 |
|
|
72 |
|
// Load the branch, add pointers to the object array. Publish object array if needed. |
73 |
|
|
74 |
|
LoadBranch(GetBranchName()); |
75 |
+ |
|
76 |
+ |
const UInt_t entries = fColIn->GetEntries(); |
77 |
+ |
|
78 |
|
if (fPubPerEvent) |
79 |
< |
fColOut = new mithep::ObjArray<TOut>(0, GetPublicName()); |
79 |
> |
fColOut = new mithep::ObjArray<TOut>(entries, GetPublicName()); |
80 |
|
else |
81 |
|
fColOut->Reset(); |
82 |
|
|
80 |
– |
UInt_t entries = fColIn->GetEntries(); |
83 |
|
for(UInt_t i=0; i<entries; ++i) |
84 |
|
fColOut->Add(fColIn->At(i)); |
85 |
|
|
96 |
|
ReqBranch(GetBranchName(), fColIn); |
97 |
|
|
98 |
|
if (fPublicName.IsNull()) |
99 |
< |
fPublicName = fBranchName; |
99 |
> |
fPublicName = GetBranchName(); |
100 |
|
|
101 |
|
if (!GetPubPerEvent()) { |
102 |
|
fColOut = new mithep::ObjArray<TOut>(0, GetPublicName()); |