Skip to content

Commit 8649fa8

Browse files
author
Daniel Abercrombie
authored
Merge pull request #129 from dabercro/packed-tracker
Servers went down. My branch finished okay though.
2 parents 627e4c6 + beb8b57 commit 8649fa8

6 files changed

Lines changed: 135 additions & 84 deletions

File tree

Objects/interface/GenParticle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ namespace panda {
4444
*/
4545
Int_t* pdgid{0};
4646
Bool_t* finalState{0};
47+
Bool_t* miniaodPacked{0};
4748
UShort_t* statusFlags{0};
4849
ContainerBase const* parentContainer_{0};
4950
Short_t* parent_{0};
@@ -85,6 +86,7 @@ namespace panda {
8586
*/
8687
Int_t& pdgid;
8788
Bool_t& finalState;
89+
Bool_t& miniaodPacked;
8890
UShort_t& statusFlags;
8991
Ref<GenParticle> parent;
9092

Objects/interface/UnpackedGenParticle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace panda {
2626
*/
2727
Int_t* pdgid{0};
2828
Bool_t* finalState{0};
29+
Bool_t* miniaodPacked{0};
2930
UShort_t* statusFlags{0};
3031
ContainerBase const* parentContainer_{0};
3132
Short_t* parent_{0};
@@ -61,6 +62,7 @@ namespace panda {
6162

6263
Int_t& pdgid;
6364
Bool_t& finalState;
65+
Bool_t& miniaodPacked;
6466
UShort_t& statusFlags;
6567
Ref<UnpackedGenParticle> parent;
6668

Objects/src/GenParticle.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ panda::GenParticle::getListOfBranches()
2424
{
2525
utils::BranchList blist;
2626
blist += PackedParticle::getListOfBranches();
27-
blist += {"pdgid", "finalState", "statusFlags", "parent_"};
27+
blist += {"pdgid", "finalState", "miniaodPacked", "statusFlags", "parent_"};
2828
return blist;
2929
}
3030

@@ -35,6 +35,7 @@ panda::GenParticle::datastore::allocate(UInt_t _nmax)
3535

3636
pdgid = new Int_t[nmax_];
3737
finalState = new Bool_t[nmax_];
38+
miniaodPacked = new Bool_t[nmax_];
3839
statusFlags = new UShort_t[nmax_];
3940
parent_ = new Short_t[nmax_];
4041
}
@@ -48,6 +49,8 @@ panda::GenParticle::datastore::deallocate()
4849
pdgid = 0;
4950
delete [] finalState;
5051
finalState = 0;
52+
delete [] miniaodPacked;
53+
miniaodPacked = 0;
5154
delete [] statusFlags;
5255
statusFlags = 0;
5356
delete [] parent_;
@@ -61,6 +64,7 @@ panda::GenParticle::datastore::setStatus(TTree& _tree, TString const& _name, uti
6164

6265
utils::setStatus(_tree, _name, "pdgid", _branches);
6366
utils::setStatus(_tree, _name, "finalState", _branches);
67+
utils::setStatus(_tree, _name, "miniaodPacked", _branches);
6468
utils::setStatus(_tree, _name, "statusFlags", _branches);
6569
utils::setStatus(_tree, _name, "parent_", _branches);
6670
}
@@ -72,6 +76,7 @@ panda::GenParticle::datastore::getStatus(TTree& _tree, TString const& _name) con
7276

7377
blist.push_back(utils::getStatus(_tree, _name, "pdgid"));
7478
blist.push_back(utils::getStatus(_tree, _name, "finalState"));
79+
blist.push_back(utils::getStatus(_tree, _name, "miniaodPacked"));
7580
blist.push_back(utils::getStatus(_tree, _name, "statusFlags"));
7681
blist.push_back(utils::getStatus(_tree, _name, "parent_"));
7782

@@ -85,6 +90,7 @@ panda::GenParticle::datastore::setAddress(TTree& _tree, TString const& _name, ut
8590

8691
utils::setAddress(_tree, _name, "pdgid", pdgid, _branches, _setStatus);
8792
utils::setAddress(_tree, _name, "finalState", finalState, _branches, _setStatus);
93+
utils::setAddress(_tree, _name, "miniaodPacked", miniaodPacked, _branches, _setStatus);
8894
utils::setAddress(_tree, _name, "statusFlags", statusFlags, _branches, _setStatus);
8995
utils::setAddress(_tree, _name, "parent_", parent_, _branches, _setStatus);
9096
}
@@ -98,6 +104,7 @@ panda::GenParticle::datastore::book(TTree& _tree, TString const& _name, utils::B
98104

99105
utils::book(_tree, _name, "pdgid", size, 'I', pdgid, _branches);
100106
utils::book(_tree, _name, "finalState", size, 'O', finalState, _branches);
107+
utils::book(_tree, _name, "miniaodPacked", size, 'O', miniaodPacked, _branches);
101108
utils::book(_tree, _name, "statusFlags", size, 's', statusFlags, _branches);
102109
utils::book(_tree, _name, "parent_", size, 'S', parent_, _branches);
103110
}
@@ -109,6 +116,7 @@ panda::GenParticle::datastore::releaseTree(TTree& _tree, TString const& _name)
109116

110117
utils::resetAddress(_tree, _name, "pdgid");
111118
utils::resetAddress(_tree, _name, "finalState");
119+
utils::resetAddress(_tree, _name, "miniaodPacked");
112120
utils::resetAddress(_tree, _name, "statusFlags");
113121
utils::resetAddress(_tree, _name, "parent_");
114122
}
@@ -131,6 +139,7 @@ panda::GenParticle::GenParticle(char const* _name/* = ""*/) :
131139
PackedParticle(new GenParticleArray(1, _name)),
132140
pdgid(gStore.getData(this).pdgid[0]),
133141
finalState(gStore.getData(this).finalState[0]),
142+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
134143
statusFlags(gStore.getData(this).statusFlags[0]),
135144
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
136145
{
@@ -140,13 +149,15 @@ panda::GenParticle::GenParticle(GenParticle const& _src) :
140149
PackedParticle(new GenParticleArray(1, _src.getName())),
141150
pdgid(gStore.getData(this).pdgid[0]),
142151
finalState(gStore.getData(this).finalState[0]),
152+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
143153
statusFlags(gStore.getData(this).statusFlags[0]),
144154
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
145155
{
146156
PackedParticle::operator=(_src);
147157

148158
pdgid = _src.pdgid;
149159
finalState = _src.finalState;
160+
miniaodPacked = _src.miniaodPacked;
150161
statusFlags = _src.statusFlags;
151162
parent = _src.parent;
152163
}
@@ -155,6 +166,7 @@ panda::GenParticle::GenParticle(datastore& _data, UInt_t _idx) :
155166
PackedParticle(_data, _idx),
156167
pdgid(_data.pdgid[_idx]),
157168
finalState(_data.finalState[_idx]),
169+
miniaodPacked(_data.miniaodPacked[_idx]),
158170
statusFlags(_data.statusFlags[_idx]),
159171
parent(_data.parentContainer_, _data.parent_[_idx])
160172
{
@@ -164,6 +176,7 @@ panda::GenParticle::GenParticle(ArrayBase* _array) :
164176
PackedParticle(_array),
165177
pdgid(gStore.getData(this).pdgid[0]),
166178
finalState(gStore.getData(this).finalState[0]),
179+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
167180
statusFlags(gStore.getData(this).statusFlags[0]),
168181
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
169182
{
@@ -191,6 +204,7 @@ panda::GenParticle::operator=(GenParticle const& _src)
191204

192205
pdgid = _src.pdgid;
193206
finalState = _src.finalState;
207+
miniaodPacked = _src.miniaodPacked;
194208
statusFlags = _src.statusFlags;
195209
parent = _src.parent;
196210

@@ -207,6 +221,7 @@ panda::GenParticle::doBook_(TTree& _tree, TString const& _name, utils::BranchLis
207221

208222
utils::book(_tree, _name, "pdgid", "", 'I', &pdgid, _branches);
209223
utils::book(_tree, _name, "finalState", "", 'O', &finalState, _branches);
224+
utils::book(_tree, _name, "miniaodPacked", "", 'O', &miniaodPacked, _branches);
210225
utils::book(_tree, _name, "statusFlags", "", 's', &statusFlags, _branches);
211226
utils::book(_tree, _name, "parent_", "", 'S', gStore.getData(this).parent_, _branches);
212227
}
@@ -218,6 +233,7 @@ panda::GenParticle::doInit_()
218233

219234
pdgid = 0;
220235
finalState = false;
236+
miniaodPacked = false;
221237
statusFlags = 0;
222238
parent.init();
223239

@@ -244,6 +260,7 @@ panda::GenParticle::dump(std::ostream& _out/* = std::cout*/) const
244260

245261
_out << "pdgid = " << pdgid << std::endl;
246262
_out << "finalState = " << finalState << std::endl;
263+
_out << "miniaodPacked = " << miniaodPacked << std::endl;
247264
_out << "statusFlags = " << statusFlags << std::endl;
248265
_out << "parent = " << parent << std::endl;
249266
}

Objects/src/UnpackedGenParticle.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ panda::UnpackedGenParticle::getListOfBranches()
66
{
77
utils::BranchList blist;
88
blist += ParticleM::getListOfBranches();
9-
blist += {"pdgid", "finalState", "statusFlags", "parent_"};
9+
blist += {"pdgid", "finalState", "miniaodPacked", "statusFlags", "parent_"};
1010
return blist;
1111
}
1212

@@ -17,6 +17,7 @@ panda::UnpackedGenParticle::datastore::allocate(UInt_t _nmax)
1717

1818
pdgid = new Int_t[nmax_];
1919
finalState = new Bool_t[nmax_];
20+
miniaodPacked = new Bool_t[nmax_];
2021
statusFlags = new UShort_t[nmax_];
2122
parent_ = new Short_t[nmax_];
2223
}
@@ -30,6 +31,8 @@ panda::UnpackedGenParticle::datastore::deallocate()
3031
pdgid = 0;
3132
delete [] finalState;
3233
finalState = 0;
34+
delete [] miniaodPacked;
35+
miniaodPacked = 0;
3336
delete [] statusFlags;
3437
statusFlags = 0;
3538
delete [] parent_;
@@ -43,6 +46,7 @@ panda::UnpackedGenParticle::datastore::setStatus(TTree& _tree, TString const& _n
4346

4447
utils::setStatus(_tree, _name, "pdgid", _branches);
4548
utils::setStatus(_tree, _name, "finalState", _branches);
49+
utils::setStatus(_tree, _name, "miniaodPacked", _branches);
4650
utils::setStatus(_tree, _name, "statusFlags", _branches);
4751
utils::setStatus(_tree, _name, "parent_", _branches);
4852
}
@@ -54,6 +58,7 @@ panda::UnpackedGenParticle::datastore::getStatus(TTree& _tree, TString const& _n
5458

5559
blist.push_back(utils::getStatus(_tree, _name, "pdgid"));
5660
blist.push_back(utils::getStatus(_tree, _name, "finalState"));
61+
blist.push_back(utils::getStatus(_tree, _name, "miniaodPacked"));
5762
blist.push_back(utils::getStatus(_tree, _name, "statusFlags"));
5863
blist.push_back(utils::getStatus(_tree, _name, "parent_"));
5964

@@ -67,6 +72,7 @@ panda::UnpackedGenParticle::datastore::setAddress(TTree& _tree, TString const& _
6772

6873
utils::setAddress(_tree, _name, "pdgid", pdgid, _branches, _setStatus);
6974
utils::setAddress(_tree, _name, "finalState", finalState, _branches, _setStatus);
75+
utils::setAddress(_tree, _name, "miniaodPacked", miniaodPacked, _branches, _setStatus);
7076
utils::setAddress(_tree, _name, "statusFlags", statusFlags, _branches, _setStatus);
7177
utils::setAddress(_tree, _name, "parent_", parent_, _branches, _setStatus);
7278
}
@@ -80,6 +86,7 @@ panda::UnpackedGenParticle::datastore::book(TTree& _tree, TString const& _name,
8086

8187
utils::book(_tree, _name, "pdgid", size, 'I', pdgid, _branches);
8288
utils::book(_tree, _name, "finalState", size, 'O', finalState, _branches);
89+
utils::book(_tree, _name, "miniaodPacked", size, 'O', miniaodPacked, _branches);
8390
utils::book(_tree, _name, "statusFlags", size, 's', statusFlags, _branches);
8491
utils::book(_tree, _name, "parent_", size, 'S', parent_, _branches);
8592
}
@@ -91,6 +98,7 @@ panda::UnpackedGenParticle::datastore::releaseTree(TTree& _tree, TString const&
9198

9299
utils::resetAddress(_tree, _name, "pdgid");
93100
utils::resetAddress(_tree, _name, "finalState");
101+
utils::resetAddress(_tree, _name, "miniaodPacked");
94102
utils::resetAddress(_tree, _name, "statusFlags");
95103
utils::resetAddress(_tree, _name, "parent_");
96104
}
@@ -113,6 +121,7 @@ panda::UnpackedGenParticle::UnpackedGenParticle(char const* _name/* = ""*/) :
113121
ParticleM(new UnpackedGenParticleArray(1, _name)),
114122
pdgid(gStore.getData(this).pdgid[0]),
115123
finalState(gStore.getData(this).finalState[0]),
124+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
116125
statusFlags(gStore.getData(this).statusFlags[0]),
117126
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
118127
{
@@ -122,13 +131,15 @@ panda::UnpackedGenParticle::UnpackedGenParticle(UnpackedGenParticle const& _src)
122131
ParticleM(new UnpackedGenParticleArray(1, _src.getName())),
123132
pdgid(gStore.getData(this).pdgid[0]),
124133
finalState(gStore.getData(this).finalState[0]),
134+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
125135
statusFlags(gStore.getData(this).statusFlags[0]),
126136
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
127137
{
128138
ParticleM::operator=(_src);
129139

130140
pdgid = _src.pdgid;
131141
finalState = _src.finalState;
142+
miniaodPacked = _src.miniaodPacked;
132143
statusFlags = _src.statusFlags;
133144
parent = _src.parent;
134145
}
@@ -137,6 +148,7 @@ panda::UnpackedGenParticle::UnpackedGenParticle(datastore& _data, UInt_t _idx) :
137148
ParticleM(_data, _idx),
138149
pdgid(_data.pdgid[_idx]),
139150
finalState(_data.finalState[_idx]),
151+
miniaodPacked(_data.miniaodPacked[_idx]),
140152
statusFlags(_data.statusFlags[_idx]),
141153
parent(_data.parentContainer_, _data.parent_[_idx])
142154
{
@@ -146,6 +158,7 @@ panda::UnpackedGenParticle::UnpackedGenParticle(ArrayBase* _array) :
146158
ParticleM(_array),
147159
pdgid(gStore.getData(this).pdgid[0]),
148160
finalState(gStore.getData(this).finalState[0]),
161+
miniaodPacked(gStore.getData(this).miniaodPacked[0]),
149162
statusFlags(gStore.getData(this).statusFlags[0]),
150163
parent(gStore.getData(this).parentContainer_, gStore.getData(this).parent_[0])
151164
{
@@ -173,6 +186,7 @@ panda::UnpackedGenParticle::operator=(UnpackedGenParticle const& _src)
173186

174187
pdgid = _src.pdgid;
175188
finalState = _src.finalState;
189+
miniaodPacked = _src.miniaodPacked;
176190
statusFlags = _src.statusFlags;
177191
parent = _src.parent;
178192

@@ -189,6 +203,7 @@ panda::UnpackedGenParticle::doBook_(TTree& _tree, TString const& _name, utils::B
189203

190204
utils::book(_tree, _name, "pdgid", "", 'I', &pdgid, _branches);
191205
utils::book(_tree, _name, "finalState", "", 'O', &finalState, _branches);
206+
utils::book(_tree, _name, "miniaodPacked", "", 'O', &miniaodPacked, _branches);
192207
utils::book(_tree, _name, "statusFlags", "", 's', &statusFlags, _branches);
193208
utils::book(_tree, _name, "parent_", "", 'S', gStore.getData(this).parent_, _branches);
194209
}
@@ -200,6 +215,7 @@ panda::UnpackedGenParticle::doInit_()
200215

201216
pdgid = 0;
202217
finalState = false;
218+
miniaodPacked = false;
203219
statusFlags = 0;
204220
parent.init();
205221

@@ -222,6 +238,7 @@ panda::UnpackedGenParticle::dump(std::ostream& _out/* = std::cout*/) const
222238

223239
_out << "pdgid = " << pdgid << std::endl;
224240
_out << "finalState = " << finalState << std::endl;
241+
_out << "miniaodPacked = " << miniaodPacked << std::endl;
225242
_out << "statusFlags = " << statusFlags << std::endl;
226243
_out << "parent = " << parent << std::endl;
227244
}

0 commit comments

Comments
 (0)