ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VariableArray.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VariableArray.h
1 #ifndef VARARRAY_VARIABLEARRAY_H
2 #define VARARRAY_VARIABLEARRAY_H
3 
4 #include <phool/PHObject.h>
5 
6 #include <iostream>
7 #include <vector>
8 
9 class VariableArray : public PHObject
10 {
11  public:
12  VariableArray(const unsigned int idval = 0);
13  ~VariableArray() override;
14 
15  void identify(std::ostream &os = std::cout) const override;
16 
17  // Here are the very explicit set routines...
18  void set_val(const std::vector<short> &vec);
19  const short int *get_array() const { return sval; }
20  unsigned int get_array_size() const { return nVal; }
21  int Id() const { return id; }
22  void Reset() override;
23 
24  protected:
25  int id;
26  unsigned int nVal;
27  short *sval; //[nVal]
28 
29  ClassDefOverride(VariableArray, 1)
30 };
31 
32 #endif /* VARIABLEARRAY */