BmnRoot
Loading...
Searching...
No Matches
UniRunGeometry.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2// UniRunGeometry header file
3// Generated 05-11-2015
4// ----------------------------------------------------------------------
5
10#ifndef UniRunGEOMETRY_H
11#define UniRunGEOMETRY_H 1
12
13#include "TDatime.h"
14#include "TObjArray.h"
15#include "TString.h"
16#include "UniConnection.h"
17
19{
20 private:
21 /* GENERATED PRIVATE MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
23 UniConnection* connectionDB;
24
26 int i_geometry_id;
28 unsigned char* blob_root_geometry;
30 Long_t sz_root_geometry;
31
32 // Constructor
33 UniRunGeometry(UniConnection* db_connect, int geometry_id, unsigned char* root_geometry, Long_t size_root_geometry);
34 /* END OF PRIVATE GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
35
36 public:
37 /* GENERATED PUBLIC MEMBERS (SHOULD NOT BE CHANGED MANUALLY) */
38 virtual ~UniRunGeometry(); // Destructor
39
40 // static class functions
42 static UniRunGeometry* CreateRunGeometry(unsigned char* root_geometry, Long_t size_root_geometry);
44 static UniRunGeometry* GetRunGeometry(int geometry_id);
46 static int CheckRunGeometryExists(int geometry_id);
48 static int DeleteRunGeometry(int geometry_id);
50 static int PrintAll();
51
52 // Getters
54 int GetGeometryId() { return i_geometry_id; }
56 unsigned char* GetRootGeometry()
57 {
58 unsigned char* tmp_root_geometry = new unsigned char[sz_root_geometry];
59 memcpy(tmp_root_geometry, blob_root_geometry, sz_root_geometry);
60 return tmp_root_geometry;
61 }
63 Long_t GetRootGeometrySize() { return sz_root_geometry; }
64
65 // Setters
67 int SetRootGeometry(unsigned char* root_geometry, Long_t size_root_geometry);
68
70 void Print();
71 /* END OF PUBLIC GENERATED PART (SHOULD NOT BE CHANGED MANUALLY) */
72
73 static UniRunGeometry* CreateRunGeometry(int geometry_id, unsigned char* root_geometry, Long_t size_root_geometry);
75 static TObjArray* GetAll();
76
78};
79
80#endif
int GetGeometryId()
get geometry id of the current run geometry
int SetRootGeometry(unsigned char *root_geometry, Long_t size_root_geometry)
set root geometry of the current run geometry
virtual ~UniRunGeometry()
static TObjArray * GetAll()
get all run geometries
static int DeleteRunGeometry(int geometry_id)
delete run geometry from the database
static UniRunGeometry * CreateRunGeometry(int geometry_id, unsigned char *root_geometry, Long_t size_root_geometry)
static UniRunGeometry * GetRunGeometry(int geometry_id)
get run geometry from the database
static UniRunGeometry * CreateRunGeometry(unsigned char *root_geometry, Long_t size_root_geometry)
add new run geometry to the database
static int CheckRunGeometryExists(int geometry_id)
check run geometry exists in the database: 1- true, 0 - false, <0 - database operation error
unsigned char * GetRootGeometry()
get root geometry of the current run geometry
Long_t GetRootGeometrySize()
get size of root geometry of the current run geometry
ClassDef(UniRunGeometry, 1)
static int PrintAll()
print all run geometrys
void Print()
print information about current run geometry