Public Methods | |
MainEventClass () | |
~MainEventClass () | |
void | process () |
void | end () |
Public Attributes | |
Int_t | nb |
Int_t | nevent |
TTree * | tree |
TFile * | hfile |
XANAEsdEvent * | event |
TBranch * | branch |
|
Definition at line 127 of file MainEvent.cpp. References branch, event, hfile, nb, nevent, and tree.
00127 : 00128 tree(0), hfile(0), event(0), branch(0) 00129 { 00130 nevent = 400; // by default create 400 events 00131 Int_t comp = 1; // by default file is compressed 00132 Int_t split = 1; // by default, split Event in sub branches 00133 Int_t write = 1; // by default the tree is filled 00134 Int_t hfill = 0; // by default histograms are not filled 00135 Int_t read = 0; 00136 Int_t arg4 = 1; 00137 Int_t arg5 = 600; //default number of tracks per event 00138 Int_t netf = 0; 00139 00140 // Event *event = 0; 00141 00142 // Fill event, header and tracks with some random numbers 00143 nb = 0; 00144 Int_t bufsize; 00145 Double_t told = 0; 00146 Double_t tnew = 0; 00147 00148 // Create a new ROOT binary machine independent file. 00149 // Note that this file may contain any kind of ROOT objects, histograms, 00150 // pictures, graphics objects, detector geometries, tracks, events, etc.. 00151 // This file is now becoming the current directory. 00152 hfile = new TFile("Event.root","RECREATE"); 00153 hfile->SetCompressionLevel(comp); 00154 00155 // Create histogram to show write_time in function of time 00156 Float_t curtime = -0.5; 00157 00158 // Create a ROOT Tree and one superbranch 00159 tree = new TTree("T","An example of a ROOT tree"); 00160 tree->SetAutoSave(1000000000); // autosave when 1 Gbyte written 00161 bufsize = 256000; 00162 if (split) bufsize /= 4; 00163 // try XANA event class 00164 // event = new Event(); 00165 event = new XANAEsdEvent; 00166 // TTree::SetBranchStyle(branchStyle); 00167 // try XANA event class 00168 // TBranch *branch = tree->Branch("event", "Event", &event, bufsize,split); 00169 branch = tree->Branch("event","XANAEsdEvent",&event,bufsize,split); 00170 branch->SetAutoDelete(kFALSE); 00171 Float_t ptmin = 1; 00172 00173 } |
|
Definition at line 105 of file MainEvent.cpp.
00105 {} |
|
Definition at line 191 of file MainEvent.cpp. References hfile, nb, nevent, and tree. Referenced by main.
|
|
Definition at line 175 of file MainEvent.cpp. References branch, event, nevent, and tree. Referenced by main.
00176 { 00177 for (Int_t ev = 0; ev < nevent; ev++) { 00178 00179 // event->Build(ev, arg5, ptmin); 00180 branch->ResetAddress(); 00181 branch->SetAddress(&event); 00182 event->setGeneral(1,1); 00183 00184 // nb += tree->Fill(); //fill the tree 00185 tree->Fill(); //fill the tree 00186 00187 // if (hm) hm->Hfill(event); //fill histograms 00188 } 00189 } |
|
Definition at line 114 of file MainEvent.cpp. Referenced by MainEventClass, and process. |
|
Definition at line 113 of file MainEvent.cpp. Referenced by MainEventClass, and process. |
|
Definition at line 112 of file MainEvent.cpp. Referenced by end, and MainEventClass. |
|
Definition at line 110 of file MainEvent.cpp. Referenced by end, and MainEventClass. |
|
Definition at line 110 of file MainEvent.cpp. Referenced by end, MainEventClass, and process. |
|
Definition at line 111 of file MainEvent.cpp. Referenced by end, MainEventClass, and process. |