Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VariableArrayContainer.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file VariableArrayContainer.cc
2 
3 #include "VariableArray.h"
4 
5 #include <TObjArray.h>
6 
7 using namespace std;
8 
10 {
11  arraycontainer = new TObjArray();
12  return;
13 }
14 
16 {
17  TObjArrayIter *iter = new TObjArrayIter(arraycontainer);
18  while (VariableArray *vararray = dynamic_cast<VariableArray *>(iter->Next()))
19  {
20  delete vararray;
21  }
22  delete iter;
23  delete arraycontainer;
24  return;
25 }
26 
28 {
29  os << "contain ObjCont" << endl;
30  return;
31 }
32 
34 {
35  arraycontainer->Add(var);
36  cout << "Adding " << var->GetName() << endl;
37  return;
38 }
39 
41 {
42  TObjArrayIter *iter = new TObjArrayIter(arraycontainer);
43  while (VariableArray *vararray = dynamic_cast<VariableArray *>(iter->Next()))
44  {
45  vararray->Reset();
46  }
47  delete iter;
48  return;
49 }