File indexing completed on 2026-04-07 08:08:32
0001 #ifndef __CLUSTER_SMALL_INFO_CONTAINER_H__
0002 #define __CLUSTER_SMALL_INFO_CONTAINER_H__
0003
0004 #include "ClusterSmallInfo.h"
0005 #include <phool/PHObject.h>
0006 #include <TClonesArray.h>
0007 #include <cstdint>
0008 #include <iostream>
0009
0010 class ClusterSmallInfoContainer : public PHObject
0011 {
0012 public:
0013 ClusterSmallInfoContainer();
0014 ~ClusterSmallInfoContainer() override;
0015 void identify(std::ostream& os = std::cout) const override;
0016 void Reset() override;
0017
0018 void set_live_trigger(uint64_t live_trigger) { _live_trigger = live_trigger; }
0019 void set_scaled_trigger(uint64_t scaled_trigger) { _scaled_trigger = scaled_trigger; }
0020 void set_bunchnumber(float bunchnumber) { _bunchnumber = bunchnumber; }
0021
0022
0023
0024 bool add_cluster(const float&, const float&, const float&, const float&, const float&);
0025
0026 ClusterSmallInfo* get_cluster_at(int);
0027 const ClusterSmallInfo* get_cluster_at(int) const;
0028
0029 uint64_t get_live_trigger() const { return _live_trigger; }
0030 uint64_t get_scaled_trigger() const { return _scaled_trigger; }
0031 float get_bunch_number() const { return _bunchnumber; }
0032
0033
0034
0035 size_t size() const { return _size; }
0036 void compress();
0037
0038 protected:
0039 size_t _size;
0040 TClonesArray *_clones = nullptr;
0041 uint64_t _live_trigger;
0042 uint64_t _scaled_trigger;
0043 float _bunchnumber;
0044
0045
0046
0047
0048 private:
0049 ClassDefOverride(ClusterSmallInfoContainer, 1);
0050 };
0051
0052 #endif