SQLamarr
The stand-alone ultra-fast simulation option for the LHCb experiment
AbsDataLoader.h
1 // (c) Copyright 2022 CERN for the benefit of the LHCb Collaboration.
2 //
3 // This software is distributed under the terms of the GNU General Public
4 // Licence version 3 (GPL Version 3), copied verbatim in the file "LICENCE".
5 //
6 // In applying this licence, CERN does not waive the privileges and immunities
7 // granted to it by virtue of its status as an Intergovernmental Organization
8 // or submit itself to any jurisdiction.
9 
10 
11 // STL
12 #include <memory>
13 
14 // HepMC3
15 #include "HepMC3/GenParticle.h"
16 #include "HepMC3/GenEvent.h"
17 #include "HepMC3/ReaderAsciiHepMC2.h"
18 
19 #include "SQLamarr/db_functions.h"
20 #include "SQLamarr/BaseSqlInterface.h"
21 
22 namespace SQLamarr
23 {
54  {
55  public:
57 
58  protected:
59 
63  const std::string& data_source,
64 
66  uint64_t run_number,
67 
69  uint64_t evt_number
70  );
71 
77  int datasource_id,
79  int collision,
80  float t,
81  float x,
82  float y,
83  float z
84  );
85 
88  int genevent_id,
89  int hepmc_id,
90  int status,
91  float t,
92  float x,
93  float y,
94  float z,
95  bool is_primary
96  );
97 
100  int genevent_id,
101  int hepmc_id,
102  int production_vertex,
103  int end_vertex,
104  int pid,
105  int status,
106  float pe,
107  float px,
108  float py,
109  float pz,
110  float m
112  );
113  };
114 }
115 
Abstract Interface for loading data to the internal database.
Definition: AbsDataLoader.h:54
int insert_collision(int datasource_id, int collision, float t, float x, float y, float z)
Insert a collision in the GenEvent table.
int insert_particle(int genevent_id, int hepmc_id, int production_vertex, int end_vertex, int pid, int status, float pe, float px, float py, float pz, float m)
Insert a particle in the GenParticles table.
int insert_vertex(int genevent_id, int hepmc_id, int status, float t, float x, float y, float z, bool is_primary)
Insert a vertex in the GenVertices
int insert_event(const std::string &data_source, uint64_t run_number, uint64_t evt_number)
Insert data source reference in the DataSources table.
Abstract interface with helper functions to access an SQLite DB.
BaseSqlInterface(SQLite3DB &db)
Constructor, acquiring the database without ownership.