FEDRA emulsion software from the OPERA Collaboration
Catalog.h
Go to the documentation of this file.
1 #ifndef CATALOG_H
2 #define CATALOG_H
3 
4 #include "Struct.h"
5 
6 class Catalog
7 {
8 private:
10  unsigned int _nConfigs, _xViews, _yViews;
11  unsigned int *_pFragmentIndexes;
12  unsigned char Reserved[256];
15 
16 
17 public:
21  void setHeaderInfo (HeaderInfo headerInfo);
23  void initFragmentIndexes(unsigned int yviews, unsigned int xviews){_pFragmentIndexes = new unsigned int[yviews*xviews];}
24  bool setFragmentIndexes(unsigned int y, unsigned int x, unsigned int value);
25  void setXviews(unsigned int x){_xViews = x;}
26  void setYviews(unsigned int y){_yViews = y;}
27  void setXmin(double xMin){_area.xMin = xMin;}
28  void setXmax(double xMax){_area.xMax = xMax;}
29  void setYmin(double yMin){_area.yMin = yMin;}
30  void setYmax(double yMax){_area.yMax = yMax;}
31  void setXstep(double xStep){_area.xStep = xStep;}
32  void setYstep(double yStep){_area.yStep = yStep;}
33  void setNfragments(unsigned int n){_area.nFragments = n;}
34  int findConfig(std::string configName);
35  std::string getConfigValue(int index,std::string configName);
36 
37 
38  unsigned int getFragmentIndexes(unsigned int y, unsigned int x) {return _pFragmentIndexes[y*_xViews+x];};
39  unsigned int getXviews(){return _xViews;}
40  unsigned int getYviews(){return _yViews;}
41  double getXmin(){return _area.xMin;}
42  double getXmax(){return _area.xMax;}
43  double getYmin(){return _area.yMin;}
44  double getYmax(){return _area.yMax;}
45  double getXstep(){return _area.xStep;}
46  double getYstep(){return _area.yStep;}
47  unsigned int getNfragments(){return _area.nFragments;}
49 
50 
51 
52 
53 };
54 
55 #endif
Definition: Catalog.h:7
double getXstep()
Definition: Catalog.h:45
double getYmin()
Definition: Catalog.h:43
void setNfragments(unsigned int n)
Definition: Catalog.h:33
void setXmin(double xMin)
Definition: Catalog.h:27
double getXmax()
Definition: Catalog.h:42
void initFragmentIndexes(unsigned int yviews, unsigned int xviews)
Definition: Catalog.h:23
HeaderInfo getHeaderInfo()
Definition: Catalog.h:22
Area _area
Definition: Catalog.h:9
bool setFragmentIndexes(unsigned int y, unsigned int x, unsigned int value)
Definition: Catalog.cpp:13
unsigned int _nConfigs
Definition: Catalog.h:10
SetupStringRepresentation setup
Definition: Catalog.h:18
unsigned char Reserved[256]
Definition: Catalog.h:12
double getXmin()
Definition: Catalog.h:41
double getYmax()
Definition: Catalog.h:44
unsigned int getNfragments()
Definition: Catalog.h:47
SetupStringRepresentation * getSetup()
Definition: Catalog.h:48
HeaderInfo _headerInfo
Definition: Catalog.h:13
void setHeaderInfo(HeaderInfo headerInfo)
Definition: Catalog.cpp:4
SetupStringRepresentation _setup
Definition: Catalog.h:14
unsigned int _xViews
Definition: Catalog.h:10
void setYmax(double yMax)
Definition: Catalog.h:30
double getYstep()
Definition: Catalog.h:46
unsigned int getYviews()
Definition: Catalog.h:40
void setXstep(double xStep)
Definition: Catalog.h:31
Catalog()
Definition: Catalog.h:19
void setXviews(unsigned int x)
Definition: Catalog.h:25
unsigned int getXviews()
Definition: Catalog.h:39
unsigned int getFragmentIndexes(unsigned int y, unsigned int x)
Definition: Catalog.h:38
void setYviews(unsigned int y)
Definition: Catalog.h:26
unsigned int _yViews
Definition: Catalog.h:10
unsigned int * _pFragmentIndexes
Definition: Catalog.h:11
void setYmin(double yMin)
Definition: Catalog.h:29
void setXmax(double xMax)
Definition: Catalog.h:28
void setYstep(double yStep)
Definition: Catalog.h:32
std::string getConfigValue(int index, std::string configName)
Definition: Catalog.cpp:67
~Catalog()
Definition: Catalog.h:20
int findConfig(std::string configName)
Definition: Catalog.cpp:21
Definition: Struct.h:41
double xMax
Definition: Struct.h:42
unsigned int nFragments
Definition: Struct.h:44
double yMin
Definition: Struct.h:42
double xStep
Definition: Struct.h:43
double yMax
Definition: Struct.h:42
double yStep
Definition: Struct.h:43
double xMin
Definition: Struct.h:42
Definition: Struct.h:20
Definition: Struct.h:62