Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:17:13

0001 #ifndef FUN4ALLPACKET_CALOPACKETCONTAINERV1_H
0002 #define FUN4ALLPACKET_CALOPACKETCONTAINERV1_H
0003 
0004 #include "CaloPacketContainer.h"
0005 
0006 #include <limits>
0007 
0008 class CaloPacket;
0009 class TClonesArray;
0010 
0011 class CaloPacketContainerv1 : public CaloPacketContainer
0012 {
0013  public:
0014   CaloPacketContainerv1();
0015   ~CaloPacketContainerv1() override;
0016 
0017   /// Clear Event
0018   void Reset() override;
0019 
0020   /** identify Function from PHObject
0021       @param os Output Stream
0022    */
0023   void identify(std::ostream &os = std::cout) const override;
0024 
0025   /// isValid returns non zero if object contains vailid data
0026   int isValid() const override;
0027 
0028   CaloPacket *AddPacket() override;
0029   CaloPacket *AddPacket(CaloPacket *calopacket) override;
0030   unsigned int get_npackets() override;
0031   CaloPacket *getPacket(unsigned int index) override;
0032   CaloPacket *getPacketbyId(int id) override;
0033   void setEvtSequence(const int i) override { eventno = i; }
0034   int getEvtSequence() const override { return eventno; }
0035   void setStatus(const unsigned int ui) override { status = ui; }
0036   unsigned int getStatus() const override { return status; }
0037   void deletePacketAt(int index) override;
0038   void deletePacket(CaloPacket *packet) override;
0039 
0040  private:
0041   TClonesArray *CaloPacketsTCArray{nullptr};
0042   int eventno{std::numeric_limits<int>::min()};
0043   unsigned int status{0};
0044 
0045   ClassDefOverride(CaloPacketContainerv1, 2)
0046 };
0047 
0048 #endif