File indexing completed on 2025-07-01 08:58:10
0001
0002
0003
0004 #pragma once
0005
0006 #include <JANA/Components/JDatabundle.h>
0007 #include <podio/CollectionBase.h>
0008 #include <podio/podioVersion.h>
0009
0010
0011 class JPodioDatabundle : public JDatabundle {
0012
0013 private:
0014 const podio::CollectionBase* m_collection = nullptr;
0015
0016 public:
0017 size_t GetSize() const override {
0018 if (m_collection == nullptr) {
0019 return 0;
0020 }
0021 return m_collection->size();
0022 }
0023
0024 virtual void ClearData() override {
0025 m_collection = nullptr;
0026 SetStatus(JDatabundle::Status::Empty);
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 }
0037
0038 const podio::CollectionBase* GetCollection() const { return m_collection; }
0039 void SetCollection(const podio::CollectionBase* collection) { m_collection = collection; }
0040 };
0041
0042