28 #ifndef STAR_StStrangeControllerBase
29 #define STAR_StStrangeControllerBase
36 #include "TClonesArray.h"
50 enum StrBranchType {dataBranch=0, mcBranch=1, assocBranch};
58 TClonesArray* GetArray(Int_t branchType);
59 TClonesArray* GetDataArray();
60 TClonesArray* GetMcArray();
61 TClonesArray* GetAssocArray();
63 Int_t GetN(Int_t branchType);
73 virtual void Clear(Option_t* opt=0);
74 virtual void Finish();
77 virtual void Select(Int_t i=-1);
78 virtual void Unselect(Int_t i=-1);
80 virtual void InitReadDst();
81 virtual void InitCreateDst();
82 virtual void InitCreateSubDst();
83 virtual Int_t MakeReadDst() = 0;
84 virtual Int_t MakeCreateDst(
StEvent& event) = 0;
85 virtual Int_t MakeCreateMcDst(
StMcVertex* mcVert) = 0;
86 virtual Int_t MakeCreateSubDst();
88 TClass* GetDataClass()
const;
89 TClass* GetMcClass()
const;
90 TClass* GetAssocClass()
const;
93 const char* GetMcName()
const;
94 const char* GetAssocName()
const;
95 void SetBufferSize(Int_t b);
100 void PrintNumCand(
const char* text, Int_t num);
101 TBranch* AssignBranch(
const char* name, TClonesArray** address);
105 TClonesArray* dataArray;
106 TClonesArray* mcArray;
107 TClonesArray* assocArray;
108 TClonesArray* tempArray;
143 inline TClonesArray* StStrangeControllerBase::GetDataArray()
144 {
return dataArray; }
145 inline TClonesArray* StStrangeControllerBase::GetMcArray()
147 inline TClonesArray* StStrangeControllerBase::GetAssocArray()
148 {
return assocArray; }
150 inline Int_t StStrangeControllerBase::GetN(Int_t branchType)
151 { TClonesArray* array = GetArray(branchType);
152 return (array ? array->GetEntriesFast() : 0); }
153 inline Int_t StStrangeControllerBase::GetN()
154 {
return (dataArray ? dataArray->GetEntriesFast() : 0); }
155 inline Int_t StStrangeControllerBase::GetNMc()
156 {
return (mcArray ? mcArray->GetEntriesFast() : 0); }
157 inline Int_t StStrangeControllerBase::GetNAssoc()
158 {
return (assocArray ? assocArray->GetEntriesFast() : 0); }
160 inline StStrangeMuDst* StStrangeControllerBase::Get(Int_t i, Int_t branchType)
161 { TClonesArray* array = GetArray(branchType);
170 inline TClass* StStrangeControllerBase::GetDataClass()
const
171 {
return dataClass; }
172 inline TClass* StStrangeControllerBase::GetMcClass()
const
174 inline TClass* StStrangeControllerBase::GetAssocClass()
const
175 {
return assocClass; }
177 inline const char* StStrangeControllerBase::GetMcName()
const
178 {
return mcName.Data(); }
179 inline const char* StStrangeControllerBase::GetAssocName()
const
180 {
return assocName.Data(); }
182 inline void StStrangeControllerBase::SetBufferSize(Int_t b) { bsize = b; }