I was able to produce a more compact class using a vector as a base class. After doing this it occurred to me that a TObjArray
should have this Notify functionality.
#ifndef TOBJECTNOTIFYGROUP_HPP
#define TOBJECTNOTIFYGROUP_HPP
#include <vector>
#include <TObject.h>
class TObjectNotifyGroup : public std::vector< TObject* >, public TObject {
public:
TObjectNotifyGroup() : TObject() {};
virtual ~TObjectNotifyGroup() {};
virtual Bool_t Notify() {
Bool_t success = true;
for (auto obj : *this) success &= obj->Notify();
return success;
};
};
#endif // TOBJECTNOTIFYGROUP_HPP