6#ifndef ATLASHEPMC_GENEVENT_H
7#define ATLASHEPMC_GENEVENT_H
9#include "HepMC3/GenEvent.h"
10#include "HepMC3/GenHeavyIon.h"
11#include "HepMC3/GenPdfInfo.h"
12#include "HepMC3/PrintStreams.h"
27#include <unordered_map>
30inline std::vector<HepMC3::GenParticlePtr>::const_iterator
begin(HepMC3::GenEvent& e) {
return e.particles().begin(); }
31inline std::vector<HepMC3::GenParticlePtr>::const_iterator
end(HepMC3::GenEvent& e) {
return e.particles().end(); }
32inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
begin(
const HepMC3::GenEvent& e) {
return e.particles().begin(); }
33inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
end(
const HepMC3::GenEvent& e) {
return e.particles().end(); }
37inline const std::string s_barcodeStr{
"barcode"};
38inline const std::string s_barcodePluralStr{
"barcodes"};
39using Print=HepMC3::Print;
40using GenHeavyIon=HepMC3::GenHeavyIon;
41using GenEvent=HepMC3::GenEvent;
43class ShortEventAttribute :
public HepMC3::Attribute {
45 ShortEventAttribute():HepMC3::Attribute(){}
46 ShortEventAttribute(
const HepMC3::GenEvent* e):HepMC3::Attribute(){ from_event(e); }
48 bool from_event(
const HepMC3::GenEvent* e){
49 NUP=
e->particles().size();
51 XWGTUP =
e->weights().size() ?
e->weights()[0] : 1.0;
52 auto A_signal_process_id=
e->attribute<HepMC3::IntAttribute>(
"signal_process_id");
53 IDPRUP = A_signal_process_id?A_signal_process_id->value() : 0;
54 auto A_event_scale=
e->attribute<HepMC3::DoubleAttribute>(
"event_scale");
55 SCALUP = A_event_scale? A_event_scale->value():0;
56 auto A_alphaQCD=
e->attribute<HepMC3::DoubleAttribute>(
"alphaQCD");
57 AQCDUP = A_alphaQCD? A_alphaQCD->value():0;
58 auto A_alphaQED=
e->attribute<HepMC3::DoubleAttribute>(
"alphaQED");
59 AQEDUP = A_alphaQED? A_alphaQED->value():0;
60 for (
int i = 0;
i < NUP; ++
i ){
61 const auto & thisParticle =
e->particles().at(i);
62 PUP[
i][0] = thisParticle->momentum().px();
63 PUP[
i][1] = thisParticle->momentum().py();
64 PUP[
i][2] = thisParticle->momentum().pz();
65 PUP[
i][3] = thisParticle->momentum().e();
66 PUP[
i][4] = thisParticle->momentum().m();
67 IDUP[
i] = thisParticle->pdg_id();
68 auto pv = thisParticle->production_vertex();
69 auto ev = thisParticle->end_vertex();
70 if (pv &&
ev ) ISTUP[
i] = 2;
71 if (pv && !
ev ) ISTUP[
i] = 1;
72 if (thisParticle->status() == 4 || !pv ) ISTUP[
i] = -1;
73 auto flow1 = thisParticle->attribute<HepMC3::IntAttribute>(
"flow1");
74 auto flow2 = thisParticle->attribute<HepMC3::IntAttribute>(
"flow2");
75 ICOLUP[
i].first = flow1 ? flow1->value() : 0;
76 ICOLUP[
i].second = flow2 ? flow2->value() : 0;
79 if (pv && !
pv->particles_in().empty()) {
80 l =
pv->particles_in().front()->id();
82 for (
const auto& p :
pv->particles_in()) {
83 const int id =
p->id();
94 bool from_string(
const std::string &att)
override {
95 std::istringstream iss(att);
105 for (
int i = 0;
i < NUP; ++
i ){
108 iss >> MOTHUP[
i].first;
109 iss >> MOTHUP[
i].second;
110 iss >> ICOLUP[
i].first;
111 iss >> ICOLUP[
i].second;
124 bool to_string(std::string &fl)
const override {
125 std::ostringstream
file;
126 file <<
" " << std::setw(4) << NUP
127 <<
" " << std::setw(6) << IDPRUP
128 <<
" " << std::setw(14) << XWGTUP
129 <<
" " << std::setw(14) << SCALUP
130 <<
" " << std::setw(14) << AQEDUP
131 <<
" " << std::setw(14) << AQCDUP <<
"\n";
132 for (
int i = 0;
i < NUP; ++
i )
133 file <<
" " << std::setw(8) << IDUP[
i]
134 <<
" " << std::setw(2) << ISTUP[
i]
135 <<
" " << std::setw(4) << MOTHUP[
i].first
136 <<
" " << std::setw(4) << MOTHUP[
i].second
137 <<
" " << std::setw(4) << ICOLUP[
i].first
138 <<
" " << std::setw(4) << ICOLUP[
i].second
139 <<
" " << std::setw(14) << PUP[
i][0]
140 <<
" " << std::setw(14) << PUP[
i][1]
141 <<
" " << std::setw(14) << PUP[
i][2]
142 <<
" " << std::setw(14) << PUP[
i][3]
143 <<
" " << std::setw(14) << PUP[
i][4]
144 <<
" " << std::setw(1) << VTIMUP[
i]
145 <<
" " << std::setw(1) << SPINUP[
i] << std::endl;
155 PUP.resize(NUP, std::vector<double>(5));
166 std::vector<long> IDUP{};
167 std::vector<int> ISTUP{};
168 std::vector< std::pair<int,int> > MOTHUP{};
169 std::vector< std::pair<int,int> > ICOLUP{};
170 std::vector< std::vector<double> > PUP{};
171 std::vector<double> VTIMUP{};
172 std::vector<double> SPINUP{};
176class GenEventBarcodes :
public HepMC3::Attribute
179 virtual bool from_string(
const std::string & )
override {
return false; }
180 virtual bool to_string(std::string &att)
const override
182 att =
"GenEventBarcodes";
186 auto it = m_vertexBC.find (
id);
187 if (it != m_vertexBC.end())
return it->second;
191 auto it = m_vertexBC.find (
id);
192 if (it != m_vertexBC.end())
return it->second;
196 auto it = m_particleBC.find (
id);
197 if (it != m_particleBC.end())
return it->second;
201 auto it = m_particleBC.find (
id);
202 if (it != m_particleBC.end())
return it->second;
206 void add (GenVertexPtr p) {
208 auto barcode =
p->attribute<HepMC3::IntAttribute>(
"barcode");
210 m_vertexBC[
barcode->value()] = std::move(p);
214 void remove (GenVertexPtr p) {
216 auto barcode =
p->attribute<HepMC3::IntAttribute>(
"barcode");
218 auto it = m_vertexBC.find (
barcode->value());
219 if (it != m_vertexBC.end()) {
220 m_vertexBC.erase (it);
225 void add (GenParticlePtr p) {
227 auto barcode =
p->attribute<HepMC3::IntAttribute>(
"barcode");
229 m_particleBC[
barcode->value()] = std::move(p);
233 void remove (GenParticlePtr p) {
235 auto barcode =
p->attribute<HepMC3::IntAttribute>(
"barcode");
237 auto it = m_particleBC.find (
barcode->value());
238 if (it != m_particleBC.end()) {
239 m_particleBC.erase (it);
244 std::map<int, ConstGenVertexPtr> barcode_to_vertex_map()
const {
245 std::map<int, ConstGenVertexPtr> ret;
246 for (
const auto &bcvertpair: m_vertexBC)
247 ret.insert({bcvertpair.first,std::const_pointer_cast<const HepMC3::GenVertex>(bcvertpair.second)});
250 std::map<int, ConstGenParticlePtr> barcode_to_particle_map()
const {
251 std::map<int, ConstGenParticlePtr> ret;
252 for (
const auto &bcpartpair: m_particleBC)
253 ret.insert({bcpartpair.first,std::const_pointer_cast<const HepMC3::GenParticle>(bcpartpair.second)});
256 std::map<int,int> id_to_barcode_map()
const {
257 std::map<int, int> ret;
258 for (
const auto &bcvertpair: m_vertexBC) ret.insert({bcvertpair.second->id(),bcvertpair.first});
259 for (
const auto &bcpartpair: m_particleBC) ret.insert({bcpartpair.second->id(),bcpartpair.first});
264 void fillAttribute(GenEvent* e) {
265 const auto eventAttributes =
e->attributes();
266 const auto barcodeAttributeIt = eventAttributes.find(
"barcode");
267 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
271 if (hasBarcodeAttribute && barcodeAttributeIt->second.count(i) > 0) {
272 const auto &
ptr = barcodeAttributeIt->second.at(i);
273 if (
ptr->is_parsed()) {
274 m_particleBC[
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()] =
ptr->particle();
277 m_particleBC[std::atoi(
ptr->unparsed_string().c_str())] =
ptr->particle();
283 const auto &vertices =
e->vertices();
284 for (
size_t i = 1;
i <= vertices.size();
i++) {
285 if (hasBarcodeAttribute && barcodeAttributeIt->second.count(-i) > 0) {
286 const auto &
ptr = barcodeAttributeIt->second.at(-i);
287 if (
ptr->is_parsed()) {
288 m_vertexBC[
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()] =
ptr->vertex();
291 m_vertexBC[std::atoi(
ptr->unparsed_string().c_str())] =
ptr->vertex();
294 m_vertexBC[-
i] = vertices[
i-1];
301 std::unordered_map<int, GenVertexPtr> m_vertexBC;
302 std::unordered_map<int, GenParticlePtr> m_particleBC;
310class ShadowParticle :
public HepMC3::Attribute {
317 ShadowParticle(ConstGenParticlePtr p)
318 : Attribute(), m_shadow(
p) {}
321 virtual bool from_string(
const std::string &)
override {
return false; }
324 virtual bool to_string(std::string &att)
const override
326 att =
"ShadowParticle";
340 e->add_attribute(
"long_long_event_number", std::make_shared<HepMC3::LongLongAttribute>(num));
344 auto at =
e->attribute<HepMC3::LongLongAttribute>(
"long_long_event_number");
345 return at?
at->value():
e->event_number();
348inline std::map<std::string, std::size_t> weights_map(
const HepMC3::GenEvent* e) {
349 std::map<std::string, std::size_t> ret;
350 auto run =
e->run_info();
351 if (!
run)
return ret;
352 std::vector<std::string>
names =
run->weight_names();
353 for (
const auto& name: names) ret[
name] =
run->weight_index(name);
357inline std::vector<HepMC3::GenParticlePtr>::const_iterator
begin(HepMC3::GenEvent& e) {
return e.particles().begin(); }
358inline std::vector<HepMC3::GenParticlePtr>::const_iterator
end(HepMC3::GenEvent& e) {
return e.particles().end(); }
359inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
begin(
const HepMC3::GenEvent& e) {
return e.particles().begin(); }
360inline std::vector<HepMC3::ConstGenParticlePtr>::const_iterator
end(
const HepMC3::GenEvent& e) {
return e.particles().end(); }
363 GenEvent*
e=
new GenEvent();
364 std::shared_ptr<HepMC3::IntAttribute> signal_process_id_A = std::make_shared<HepMC3::IntAttribute>(
signal_process_id);
365 e->add_attribute(
"signal_process_id",signal_process_id_A);
366 e->add_attribute(s_barcodePluralStr, std::make_shared<GenEventBarcodes>());
367 e->set_event_number(event_number);
372 GenEvent*
e=
new GenEvent();
373 e->set_event_number(inEvt->event_number());
374 e->weights()=inEvt->weights();
375 auto a_mpi = inEvt->attribute<HepMC3::IntAttribute>(
"mpi");
376 if (a_mpi)
e->add_attribute(
"mpi",std::make_shared<HepMC3::IntAttribute>(*a_mpi));
377 auto a_signal_process_id = inEvt->attribute<HepMC3::IntAttribute>(
"signal_process_id");
378 if (a_signal_process_id)
e->add_attribute(
"signal_process_id",std::make_shared<HepMC3::IntAttribute>(*a_signal_process_id));
379 auto a_event_scale = inEvt->attribute<HepMC3::DoubleAttribute>(
"event_scale");
380 if (a_event_scale)
e->add_attribute(
"event_scale",std::make_shared<HepMC3::DoubleAttribute>(*a_event_scale));
381 auto a_alphaQCD = inEvt->attribute<HepMC3::DoubleAttribute>(
"alphaQCD");
382 if (a_alphaQCD)
e->add_attribute(
"alphaQCD",std::make_shared<HepMC3::DoubleAttribute>(*a_alphaQCD));
383 auto a_alphaQED = inEvt->attribute<HepMC3::DoubleAttribute>(
"alphaQED");
384 if (a_alphaQED)
e->add_attribute(
"alphaQED",std::make_shared<HepMC3::DoubleAttribute>(*a_alphaQED));
385 auto a_pi = inEvt->pdf_info();
386 if (a_pi)
e->set_pdf_info(std::make_shared<HepMC3::GenPdfInfo>(*a_pi));
387 auto a_hi = inEvt->heavy_ion();
388 if (a_hi)
e->set_heavy_ion(std::make_shared<HepMC3::GenHeavyIon>(*a_hi));
389 auto a_random_states = inEvt->attribute<HepMC3::VectorLongIntAttribute>(
"random_states");
390 if (a_random_states)
e->add_attribute(
"random_states",std::make_shared<HepMC3::VectorLongIntAttribute>(*a_random_states));
391 e->add_attribute(s_barcodePluralStr, std::make_shared<GenEventBarcodes>());
396 auto barcodes =
e->attribute<GenEventBarcodes> (s_barcodePluralStr);
398 barcodes = std::make_shared<GenEventBarcodes>();
399 e->add_attribute(s_barcodePluralStr, barcodes);
407 const auto &
barcodes =
e->attribute<GenEventBarcodes> (s_barcodePluralStr);
413 const auto eventAttributes =
e->attributes();
414 const auto barcodeAttributeIt = eventAttributes.find(s_barcodeStr);
415 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
417 const auto &vertices =
e->vertices();
418 if (hasBarcodeAttribute) {
419 for (
size_t i = 1;
i <= vertices.size();
i++) {
420 const auto &ptrIt = barcodeAttributeIt->second.find(-i);
421 if (ptrIt != barcodeAttributeIt->second.end()) {
422 const auto &
ptr = ptrIt->second;
423 if (
ptr->is_parsed()) {
424 if (
id ==
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()) {
425 return ptr->vertex();
429 if (
id == std::atoi(
ptr->unparsed_string().c_str())) {
430 return ptr->vertex();
437 if (-
id > 0 && -
id <=
static_cast<int>(vertices.size())) {
438 if (!vertices[-
id-1]->attribute<HepMC3::IntAttribute>(s_barcodeStr)) {
439 return vertices[-
id-1];
442 return HepMC3::ConstGenVertexPtr();
447 const auto &
barcodes =
e->attribute<GenEventBarcodes> (s_barcodePluralStr);
453 const auto eventAttributes =
e->attributes();
454 const auto barcodeAttributeIt = eventAttributes.find(s_barcodeStr);
455 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
458 if (hasBarcodeAttribute) {
460 const auto &ptrIt = barcodeAttributeIt->second.find(i);
461 if (ptrIt != barcodeAttributeIt->second.end()) {
462 const auto &
ptr = ptrIt->second;
463 if (
ptr->is_parsed()) {
464 if (
id ==
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()) {
465 return ptr->particle();
469 if (
id == std::atoi(
ptr->unparsed_string().c_str())) {
470 return ptr->particle();
477 if (
id > 0 &&
id <=
static_cast<int>(
particles.size())) {
478 if (!particles[
id-1]->attribute<HepMC3::IntAttribute>(s_barcodeStr)) {
482 return HepMC3::ConstGenParticlePtr();
487 const auto &
barcodes =
e->attribute<GenEventBarcodes> (s_barcodePluralStr);
493 const auto eventAttributes =
e->attributes();
494 const auto barcodeAttributeIt = eventAttributes.find(s_barcodeStr);
495 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
497 const auto &vertices =
e->vertices();
498 if (hasBarcodeAttribute) {
499 for (
size_t i = 1;
i <= vertices.size();
i++) {
500 const auto &ptrIt = barcodeAttributeIt->second.find(-i);
501 if (ptrIt != barcodeAttributeIt->second.end()) {
502 const auto &
ptr = ptrIt->second;
503 if (
ptr->is_parsed()) {
504 if (
id ==
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()) {
505 return ptr->vertex();
509 if (
id == std::atoi(
ptr->unparsed_string().c_str())) {
510 return ptr->vertex();
517 if (-
id > 0 && -
id <=
static_cast<int>(vertices.size())) {
518 if (!vertices[-
id-1]->attribute<HepMC3::IntAttribute>(s_barcodeStr)) {
519 return vertices[-
id-1];
522 return HepMC3::GenVertexPtr();
527 const auto &
barcodes =
e->attribute<GenEventBarcodes> (s_barcodePluralStr);
533 const auto eventAttributes =
e->attributes();
534 const auto barcodeAttributeIt = eventAttributes.find(s_barcodeStr);
535 const bool hasBarcodeAttribute = barcodeAttributeIt != eventAttributes.end();
538 if (hasBarcodeAttribute) {
540 const auto &ptrIt = barcodeAttributeIt->second.find(i);
541 if (ptrIt != barcodeAttributeIt->second.end()) {
542 const auto &
ptr = ptrIt->second;
543 if (
ptr->is_parsed()) {
544 if (
id ==
static_cast<HepMC3::IntAttribute*
>(
ptr.get())->value()) {
545 return ptr->particle();
549 if (
id == std::atoi(
ptr->unparsed_string().c_str())) {
550 return ptr->particle();
557 if (
id > 0 &&
id <=
static_cast<int>(
particles.size())) {
558 if (!particles[
id-1]->attribute<HepMC3::IntAttribute>(s_barcodeStr)) {
562 return HepMC3::GenParticlePtr();
565inline int mpi(
const GenEvent& evt) {
566 std::shared_ptr<HepMC3::IntAttribute> A_mpi=
evt.attribute<HepMC3::IntAttribute>(
"mpi");
567 return A_mpi?(A_mpi->value()):0;
569inline int mpi(
const GenEvent* evt) {
570 std::shared_ptr<HepMC3::IntAttribute> A_mpi=
evt->attribute<HepMC3::IntAttribute>(
"mpi");
571 return A_mpi?(A_mpi->value()):0;
575 std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=
evt.attribute<HepMC3::IntAttribute>(
"signal_process_id");
576 return A_signal_process_id?(A_signal_process_id->value()):0;
579 std::shared_ptr<HepMC3::IntAttribute> A_signal_process_id=
evt->attribute<HepMC3::IntAttribute>(
"signal_process_id");
580 return A_signal_process_id?(A_signal_process_id->value()):0;
583 std::shared_ptr<HepMC3::IntAttribute>
signal_process_id = std::make_shared<HepMC3::IntAttribute>(i);
586inline void set_mpi(GenEvent* e,
const int i=0) {
587 std::shared_ptr<HepMC3::IntAttribute>
mpi = std::make_shared<HepMC3::IntAttribute>(i);
588 e->add_attribute(
"mpi",std::move(
mpi));
591 e->add_attribute(
"random_states",std::make_shared<HepMC3::VectorLongIntAttribute>(
a));
594 if (!v || !e)
return;
597 v->add_attribute(
"signal_process_vertex",std::make_shared<HepMC3::IntAttribute>(1));
600inline GenVertexPtr signal_process_vertex(GenEvent* e) {
for (
auto v:
e->vertices())
if (
v->attribute<HepMC3::IntAttribute>(
"signal_process_vertex"))
return v;
return nullptr; }
602 if (!e)
return false;
604 for (
const auto& p :
e->beams()) {
if (
p->status() == 4) ++nBeams; }
605 if (nBeams != 2)
return false;
610 if (!
p->parent_event())
return false;
611 auto barcodes =
p->parent_event()->template attribute<GenEventBarcodes> (s_barcodePluralStr);
613 barcodes = std::make_shared<GenEventBarcodes>();
614 p->parent_event()->add_attribute(s_barcodePluralStr, barcodes);
617 bool ret =
p->add_attribute(s_barcodeStr,std::make_shared<HepMC3::IntAttribute>(i));
633 if (num > std::numeric_limits<int>::max())
return false;
634 e->set_event_number((
int)num);
638 return e->event_number();
640inline GenEvent::particle_iterator
begin(HepMC::GenEvent& e) {
return e.particles_begin(); }
641inline GenEvent::particle_iterator
end(HepMC::GenEvent& e) {
return e.particles_end(); }
642inline GenEvent::particle_const_iterator
begin(
const HepMC::GenEvent& e) {
return e.particles_begin(); }
643inline GenEvent::particle_const_iterator
end(
const HepMC::GenEvent& e) {
return e.particles_end(); }
644inline GenEvent*
newGenEvent(
const int a,
const int b ) {
return new GenEvent(
a,b); }
647inline GenVertex*
barcode_to_vertex(
const GenEvent* e,
int id ) {
return e->barcode_to_vertex(
id);}
649inline int mpi(
const GenEvent& e) {
652inline int mpi(
const GenEvent* e) {
656 return e.signal_process_id();
659 return e->signal_process_id();
662 e->set_signal_process_id(i);
664inline void set_mpi(GenEvent* e,
const int i) {
668 e->set_random_states(
a);
671 e->set_signal_process_vertex(v);
674 HepMC::GenEvent* outEvt =
new HepMC::GenEvent( inEvt->signal_process_id(), inEvt->event_number() );
675 outEvt->set_mpi ( inEvt->mpi() );
676 outEvt->set_event_scale ( inEvt->event_scale() );
677 outEvt->set_alphaQCD ( inEvt->alphaQCD() );
678 outEvt->set_alphaQED ( inEvt->alphaQED() );
679 outEvt->weights() = inEvt->weights();
680 outEvt->set_random_states( inEvt->random_states() );
681 if (
nullptr != inEvt->heavy_ion() ) {
682 outEvt->set_heavy_ion ( *inEvt->heavy_ion() );
684 if (
nullptr != inEvt->pdf_info() ) {
685 outEvt->set_pdf_info ( *inEvt->pdf_info() );
696inline void line(std::ostream& os,
const GenEvent& e) {e.print(os);}
697inline void line(std::ostream& os,
const GenEvent* e) {e->print(os);}
698inline void content(std::ostream& os,
const GenEvent& e) {e.print(os);}
699inline void content(std::ostream& os,
const GenEvent* e) {e->print(os);}
bool add(const std::string &hname, TKey *tobj)
mapped_type at(key_type key) const
Look up an element in the map.
void line(std::ostream &os, const GenEvent &e)
void content(std::ostream &os, const GenEvent &e)
int signal_process_id(const GenEvent &e)
void set_mpi(GenEvent *e, const int i)
bool set_ll_event_number(HepMC::GenEvent *e, long long int num)
void set_signal_process_vertex(GenEvent *e, T v)
GenParticle * barcode_to_particle(const GenEvent *e, int id)
GenEvent::particle_iterator begin(HepMC::GenEvent &e)
GenEvent::particle_iterator end(HepMC::GenEvent &e)
void set_random_states(GenEvent *e, std::vector< T > a)
GenVertex * barcode_to_vertex(const GenEvent *e, int id)
long long int get_ll_event_number(const HepMC::GenEvent *e)
HepMC::GenVertex * GenVertexPtr
bool suggest_barcode(T &p, int i)
void set_signal_process_id(GenEvent *e, const int i)
GenEvent * copyemptyGenEvent(const GenEvent *inEvt)
void fillBarcodesAttribute(GenEvent *)
GenParticle * GenParticlePtr
const GenParticle * ConstGenParticlePtr
GenVertex * signal_process_vertex(const GenEvent *e)
int mpi(const GenEvent &e)
bool valid_beam_particles(const GenEvent *e)
const HepMC::GenVertex * ConstGenVertexPtr
GenEvent * newGenEvent(const int a, const int b)
l
Printing final latex table to .tex output file.
virtual bool resize(size_t sz) override
Change the size of all aux data vectors.
int run(int argc, char *argv[])