10 #ifndef GGSTCLONESARRAYSERVICE_H_
11 #define GGSTCLONESARRAYSERVICE_H_
13 #include "TClonesArray.h"
61 TClonesArray *
ProvideArray(
int sizeHint = 0,
bool clearElements =
false);
83 std::string _className;
85 struct ArrayDescriptor {
89 ArrayDescriptor() : array(NULL), allocSize(0) {}
94 bool operator<(
const ArrayDescriptor &rhs) {
95 if (allocSize < rhs.allocSize)
102 typedef std::list<ArrayDescriptor> ArrayList;
103 ArrayList _availableArrays;
104 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.