PandaTree
HLTObject.h
1 #ifndef PandaTree_Objects_HLTObject_h
2 #define PandaTree_Objects_HLTObject_h
3 #include "Constants.h"
4 #include "PackedParticle.h"
5 #include "../../Framework/interface/Array.h"
6 #include "../../Framework/interface/Collection.h"
7 #include "../../Framework/interface/Ref.h"
8 #include "../../Framework/interface/RefVector.h"
9 
10 namespace panda {
11 
12  class HLTObject : public PackedParticle {
13  public:
16  ~datastore() { deallocate(); }
17 
18  std::vector<std::vector<UShort_t>>* filters{0};
19 
20  void allocate(UInt_t n) override;
21  void deallocate() override;
22  void setStatus(TTree&, TString const&, utils::BranchList const&) override;
23  utils::BranchList getStatus(TTree&, TString const&) const override;
24  utils::BranchList getBranchNames(TString const& = "") const override;
25  void setAddress(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t setStatus = kTRUE) override;
26  void book(TTree&, TString const&, utils::BranchList const& = {"*"}, Bool_t dynamic = kTRUE) override;
27  void releaseTree(TTree&, TString const&) override;
28  void resizeVectors_(UInt_t) override;
29  };
30 
33 
34  typedef PackedParticle base_type;
35 
36  HLTObject(char const* name = "");
37  HLTObject(HLTObject const&);
38  HLTObject(datastore&, UInt_t idx);
39  ~HLTObject();
40  HLTObject& operator=(HLTObject const&);
41 
42  static char const* typeName() { return "HLTObject"; }
43 
44  void print(std::ostream& = std::cout, UInt_t level = 1) const override;
45  void dump(std::ostream& = std::cout) const override;
46 
47  std::vector<UShort_t>* filters;
48 
49  /* BEGIN CUSTOM HLTObject.h.classdef */
50  /* END CUSTOM */
51 
52  static utils::BranchList getListOfBranches();
53 
54  void destructor(Bool_t recursive = kFALSE);
55 
56  protected:
58 
59  void doBook_(TTree&, TString const&, utils::BranchList const& = {"*"}) override;
60  void doInit_() override;
61  };
62 
67 
68  /* BEGIN CUSTOM HLTObject.h.global */
69  /* END CUSTOM */
70 
71 }
72 
73 #endif
Base class for fixed-size containers.
Definition: ArrayBase.h:13
A reference to an element in a container.
Definition: Ref.h:20
Definition: PackedParticle.h:13
Base class for dynamic-size containers.
Definition: CollectionBase.h:16
void dump(std::ostream &=std::cout) const override
Dump the object content.
Definition: HLTObject.cc:170
Template class for fixed-size container implementations. Inherits from base_type::array_type of the e...
Definition: Array.h:20
List of branch names.
Definition: IOUtils.h:64
void resizeVectors_(UInt_t) override
Override when there are vector members.
Definition: HLTObject.cc:75
Definition: HLTObject.h:12
void print(std::ostream &=std::cout, UInt_t level=1) const override
Print the object content.
Definition: HLTObject.cc:162
Template class for dynamic-size container implementations. Inherits from base_type::collection_type o...
Definition: Collection.h:19
Definition: PackedParticle.h:15
Definition: HLTObject.h:14
Definition: Array.h:11
A vector of references to elements in a container.
Definition: RefVector.h:18