10 #ifndef GGSTCLONESARRAYSERVICE_H_
11 #define GGSTCLONESARRAYSERVICE_H_
13 #include "TClonesArray.h"
62 TClonesArray*
ProvideArray(
int sizeHint = 0,
bool clearElements =
false);
84 std::string _className;
86 struct ArrayDescriptor {
91 array(NULL), allocSize(0) {
97 bool operator<(
const ArrayDescriptor &rhs) {
98 if (allocSize < rhs.allocSize)
105 typedef std::list<ArrayDescriptor> ArrayList;
106 ArrayList _availableArrays;
107 ArrayList _assignedArrays;
A service which manages a pool of reusable TClonesArray.
void DeleteAll()
Delete all unassigned arrays in storage.
TClonesArray * ProvideArray(int sizeHint=0, bool clearElements=false)
Method to obtain an array from the service.
void TakeBackArray(TClonesArray *&array)
Gives an array back to the service.
GGSTClonesArrayService(const char *className)
Constructor.
~GGSTClonesArrayService()
Destructor.