Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
TreeAccessor.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include "LArSamplesMon/Data.h"
8 #include "LArCafJobs/EventData.h"
9 #include "LArCafJobs/RunData.h"
13 #include "LArCafJobs/ShapeInfo.h"
14 
15 #include "TObjString.h"
16 #include "TFile.h"
17 #include "TTree.h"
18 #include "TSystem.h"
19 #include "TString.h"
20 #include <iostream>
21 #include <fstream>
22 #include <iomanip>
23 
24 using std::cout;
25 using std::endl;
26 
27 using namespace LArSamples;
28 
29 
31 {
32  TFile* file = TFile::Open(fileName);
33  if (!file) return nullptr;
34  if (!file->IsOpen()) { delete file; return nullptr; }
35  TTree* cellTree = (TTree*)file->Get("cells");
36  if (!cellTree) return nullptr;
37  TTree* scTree = (TTree*)file->Get("SC");
38  if (!scTree) return nullptr;
39  TTree* eventTree = (TTree*)file->Get("events");
40  if (!eventTree) return nullptr;
41  TTree* runTree = (TTree*)file->Get("runs");
43  return accessor;
44 }
45 
46 
47 const CellInfo* TreeAccessor::getCellInfo(unsigned int i) const
48 {
49  const HistoryContainer* cont = historyContainer(i);
50  if (!cont || !cont->cellInfo()) return nullptr;
51  return new CellInfo(*cont->cellInfo());
52 }
53 
54 const CellInfo* TreeAccessor::getSCInfo(unsigned int i) const
55 {
56  const HistoryContainer* cont = historyContainerSC(i);
57  if (!cont || !cont->cellInfo()) return nullptr;
58  return new CellInfo(*cont->cellInfo());
59 }
60 
61 
62 const History* TreeAccessor::getCellHistory(unsigned int i) const
63 {
64  if (i >= cellTree().GetEntries()) return nullptr;
65  getCellEntry(i);
66 
67  std::vector<const EventData*> eventDatas;
68 
69  for (unsigned int k = 0; k < currentContainer()->nDataContainers(); k++) {
70  const EventData* evtData = eventData(currentContainer()->dataContainer(k)->eventIndex());
71  EventData* newEvtData = (evtData ? new EventData(*evtData) : nullptr);
72  eventDatas.push_back(newEvtData);
73  }
74  return (currentContainer()->cellInfo() ? new History(*currentContainer(), eventDatas, i) : nullptr);
75 }
76 
77 const History* TreeAccessor::getSCHistory(unsigned int i) const
78 {
79  if (i >= SCTree().GetEntries()) return nullptr;
80  getSCEntry(i);
81 
82  std::vector<const EventData*> eventDatas;
83 
84  for (unsigned int k = 0; k < currentContainerSC()->nDataContainers(); k++) {
85  const EventData* evtData = eventData(currentContainerSC()->dataContainer(k)->eventIndex());
86  EventData* newEvtData = (evtData ? new EventData(*evtData) : nullptr);
87  eventDatas.push_back(newEvtData);
88  }
89  return (currentContainerSC()->cellInfo() ? new History(*currentContainerSC(), eventDatas, i) : nullptr);
90 }
91 
92 TreeAccessor* TreeAccessor::merge(const std::vector<const Accessor*>& accessors,
93  const TString& fileName)
94 {
95  cout << "Merging to " << fileName << endl;
96  TreeAccessor* newAcc = new TreeAccessor(fileName);
97  unsigned int size = 0;
98  CellInfo* info = nullptr;
99 
100  int evtIndex = 0, runIndex = 0;
101  std::map<std::pair<int, int>, int> evtMap;
102  std::map<int, int> runMap;
103 
104  cout << "Merging runs" << endl;
105  for (const Accessor* accessor : accessors) {
106  if (!accessor) {
107  cout << "Cannot merge: one of the inputs is null!" << endl;
108  delete newAcc;
109  return nullptr;
110  }
111  for (unsigned int i = 0; i < accessor->nRuns(); i++) {
112  int run = accessor->runData(i)->run();
113  if (runMap.find(run) != runMap.end()) continue;
114  runMap[run] = runIndex;
115  RunData* newRun = new RunData(*accessor->runData(i));
116  newAcc->addRun(newRun);
117  delete newRun;
118  runIndex++;
119  }
120  }
121 
122  cout << "Merging events" << endl;
123  unsigned int nEventsTotal = 0, iEvt = 0;
124  for (const Accessor* accessor : accessors)
125  nEventsTotal += accessor->nEvents();
126  for (const Accessor* accessor : accessors) {
127  for (unsigned int i = 0; i < accessor->nEvents(); i++) {
128  iEvt++;
129  if (iEvt % 100000 == 0) cout << "Merging event " << iEvt << "/" << nEventsTotal << endl;
130  std::pair<int, int> evtId(accessor->eventData(i)->run(), accessor->eventData(i)->event());
131  if (evtMap.find(evtId) != evtMap.end()) continue;
132  evtMap[evtId] = evtIndex;
133  std::map<int, int>::const_iterator idx = runMap.find(accessor->eventData(i)->run());
134  int newRunIndex = (idx == runMap.end() ? -999 : idx->second);
135  //cout << "Storing eventData for run " << accessor->eventData(i)->run() << " at index " << newRunIndex << " instead of " << accessor->eventData(i)->runIndex() << endl;
136  EventData* newEvent = new EventData(*accessor->eventData(i), newRunIndex);
137  newAcc->addEvent(newEvent);
138  delete newEvent;
139  evtIndex++;
140  }
141  }
142 
143  for (unsigned int i = 0; i < newAcc->nChannels(); i++) {
144  if (i % 10000 == 0) {
145  cout << "Merging channel " << i << "/" << newAcc->nChannels() << " (current size = " << size << ")" << endl;
146  //ClassCounts::printCountsTable();
147  }
149  for (const Accessor* accessor : accessors) {
150  const History* history = accessor->cellHistory(i);
151  if (!history || !history->isValid()) continue;
152  if (!historyContainer) {
153  info = new CellInfo(*history->cellInfo());
155  }
156  for (unsigned int j = 0; j < history->nData(); j++) {
157  DataContainer* newDC = new DataContainer(history->data(j)->container());
158  std::map<std::pair<int, int>, int>::const_iterator newIndex
159  = evtMap.find(std::make_pair(history->data(j)->run(), history->data(j)->event()));
160  if (newIndex == evtMap.end()) cout << "Event not found for cell " << i << ", data " << j << "." << endl;
161  newDC->setEventIndex(newIndex != evtMap.end() ? newIndex->second : -1);
162  historyContainer->add(newDC);
163  if (!info->shape(history->data(j)->gain())) {
164  const ShapeInfo* shape = history->cellInfo()->shape(history->data(j)->gain());
165  if (!shape)
166  cout << "Shape not filled for hash = " << i << ", index = " << j << ", gain = " << Data::gainStr(history->data(j)->gain()) << endl;
167  info->setShape(history->data(j)->gain(), (shape ? new ShapeInfo(*shape) : nullptr));
168  }
169  }
170  }
172  newAcc->add(historyContainer);
173  delete historyContainer;
174  }
175 
176  cout << "Merging done, final size = " << size << endl;
177  newAcc->save();
178  return newAcc;
179 }
180 
181 
182 TreeAccessor* TreeAccessor::merge(const std::vector<const Accessor*>& accessors,const TString& fileName,const TString& LBFile)
183 {
184  // O.Simard - 01.07.2011
185  // Alternative version with LB cleaning.
186 
187  bool kBadLB=false;
188  std::vector<unsigned int> LBList;
189  std::ifstream infile(LBFile.Data());
190  std::string line;
191  // assume single-line format with coma-separated LBs (from python)
192  std::getline(infile,line,'\n');
193  TString filter(line.c_str());
194  TObjArray* list = filter.Tokenize(", "); // coma\space delimiters
195  if(list->GetEntries() == 0){
196  printf("No LB filtering specified, or bad format. Exiting.\n");
197  delete list;
198  return nullptr;
199  }
200 
201  for(int k = 0; k < list->GetEntries(); k++){
202  TObjString* tobs = (TObjString*)(list->At(k));
203  LBList.push_back((unsigned int)(tobs->String()).Atoi());
204  }
205  delete list;
206  printf("LB List: %d\n",(int)LBList.size());
207 
208 
209  // from here it is similar to other functions of this class
210  TreeAccessor* newAcc = new TreeAccessor(fileName);
211  unsigned int size = 0;
212  CellInfo* info = nullptr;
213 
214  int evtIndex = 0, runIndex = 0;
215  std::map<std::pair<int, int>, int> evtMap;
216  std::map<int, int> runMap;
217 
218  cout << "Merging runs" << endl;
219  for (const Accessor* accessor : accessors) {
220  if (!accessor) {
221  cout << "Cannot merge: one of the inputs is null!" << endl;
222  delete newAcc;
223  return nullptr;
224  }
225  for (unsigned int i = 0; i < accessor->nRuns(); i++) {
226  int run = accessor->runData(i)->run();
227  if (runMap.find(run) != runMap.end()) continue;
228  runMap[run] = runIndex;
229  RunData* newRun = new RunData(*accessor->runData(i));
230  newAcc->addRun(newRun);
231  delete newRun;
232  runIndex++;
233  }
234  }
235 
236  cout << "Merging events" << endl;
237  unsigned int nEventsTotal = 0, iEvt = 0;
238  for (const Accessor* accessor : accessors)
239  nEventsTotal += accessor->nEvents();
240  for (const Accessor* accessor : accessors) {
241  for (unsigned int i = 0; i < accessor->nEvents(); i++) {
242  iEvt++;
243  if (iEvt % 100000 == 0) cout << "Merging event " << iEvt << "/" << nEventsTotal << endl;
244 
245  // ----
246  // skip LBs which are found in the list
247  kBadLB=false;
248  for(unsigned int ilb = 0 ; ilb < LBList.size() ; ilb++){
249  if(LBList.at(ilb)==accessor->eventData(i)->lumiBlock()){
250  kBadLB=true;
251  //printf(" == Rejecting Event in LB %4d\n",accessor->eventData(i)->lumiBlock());
252  break;
253  }
254  }
255  if(kBadLB) continue;
256  // ----
257 
258  std::pair<int, int> evtId(accessor->eventData(i)->run(), accessor->eventData(i)->event());
259  if (evtMap.find(evtId) != evtMap.end()) continue;
260  evtMap[evtId] = evtIndex;
261  std::map<int, int>::const_iterator idx = runMap.find(accessor->eventData(i)->run());
262  int newRunIndex = (idx == runMap.end() ? -999 : idx->second);
263  EventData* newEvent = new EventData(*accessor->eventData(i), newRunIndex);
264  newAcc->addEvent(newEvent);
265  delete newEvent;
266  evtIndex++;
267  }
268  }
269 
270  for (unsigned int i = 0; i < newAcc->nChannels(); i++) {
271  if (i % 10000 == 0) {
272  cout << "Merging channel " << i << "/" << newAcc->nChannels() << " (current size = " << size << ")" << endl;
273  //ClassCounts::printCountsTable();
274  }
276  for (const Accessor* accessor : accessors) {
277  const History* history = accessor->cellHistory(i);
278  if (!history || !history->isValid()) continue;
279  if (!historyContainer) {
280  info = new CellInfo(*history->cellInfo());
282  }
283  for (unsigned int j = 0; j < history->nData(); j++) {
284  DataContainer* newDC = new DataContainer(history->data(j)->container());
285  std::map<std::pair<int, int>, int>::const_iterator newIndex
286  = evtMap.find(std::make_pair(history->data(j)->run(), history->data(j)->event()));
287  //if (newIndex == evtMap.end()) cout << "Event not found for cell " << i << ", data " << j << "." << endl;
288  newDC->setEventIndex(newIndex != evtMap.end() ? newIndex->second : -1);
289  historyContainer->add(newDC);
290  if (!info->shape(history->data(j)->gain())) {
291  const ShapeInfo* shape = history->cellInfo()->shape(history->data(j)->gain());
292  if (!shape)
293  cout << "Shape not filled for hash = " << i << ", index = " << j << ", gain = " << Data::gainStr(history->data(j)->gain()) << endl;
294  info->setShape(history->data(j)->gain(), (shape ? new ShapeInfo(*shape) : nullptr));
295  }
296  }
297  }
298  if(historyContainer){
300  }
301  newAcc->add(historyContainer);
302  delete historyContainer;
303  historyContainer=nullptr;
304  //}
305  }
306 
307  cout << "Merging done, final size = " << size << endl;
308  newAcc->save();
309  return newAcc;
310 }
311 
312 
314  const FilterParams& filterParams,
315  const TString& fileName,
316  const DataTweaker& tweaker)
317 {
318  FilterList filterList; filterList.add(filterParams, fileName);
319  std::vector<TreeAccessor*> result = filter(accessor, filterList, tweaker);
320  return (!result.empty() ? result[0] : nullptr);
321 }
322 
323 std::vector<TreeAccessor*>
325  const FilterList& filterList,
326  const DataTweaker& tweaker)
327 {
328  if (filterList.size() == 0) {
329  cout << "No filter categories specified, done! (?)" << endl;
330  return std::vector<TreeAccessor*>();
331  }
332 
333  for (unsigned int f = 0; f < filterList.size(); f++) {
334  cout << "Skimming to " << filterList.fileName(f) << endl;
335  if (!gSystem->AccessPathName(filterList.fileName(f))) {
336  cout << "File already exists, exiting." << endl;
337  return std::vector<TreeAccessor*>();
338  }
339  }
340 
341  std::vector<TreeAccessor*> newAccessors;
342  for (unsigned int f = 0; f < filterList.size(); f++)
343  newAccessors.push_back(new TreeAccessor(filterList.fileName(f)));
344  std::map<std::pair<unsigned int, unsigned int>, unsigned int> eventIndices;
345  std::vector< std::map<unsigned int, unsigned int> > eventsToKeep(filterList.size());
346  std::vector< std::map<unsigned int, unsigned int> > runsToKeep(filterList.size());
347 
348  double nTot = 0, nPass = 0;
349 
350  for (unsigned int i = 0; i < accessor.nEvents(); i++) {
351  const EventData* eventData = accessor.eventData(i);
352  eventIndices[std::pair<unsigned int, unsigned int>(eventData->run(), eventData->event())] = i;
353  }
354 
355  for (unsigned int i = 0; i < accessor.nChannels(); i++) {
356  if (i % 25000 == 0) {
357  cout << "Filtering " << i << "/" << accessor.nChannels()
358  << " (passing so far = " << nPass << ", total seen = " << nTot << ")" << endl;
359  //ClassCounts::printCountsTable();
360  }
361  bool first = true;
362 
363  const History* history = nullptr;
364  for (unsigned int f = 0; f < filterList.size(); f++) {
365  history = accessor.pass(i, filterList.filterParams(f));
366  if (history) break;
367  }
368  for (unsigned int f = 0; f < filterList.size(); f++) {
369  if (!history || !history->cellInfo() || !filterList.filterParams(f).passCell(*history->cellInfo())) {
371  newAccessors[f]->add(newHist);
372  delete newHist;
373  continue;
374  }
375  if (first) { nTot += history->nData(); first = false; }
376  HistoryContainer* newHist = new HistoryContainer(new CellInfo(*history->cellInfo()));
377  for (unsigned int k = 0; k < history->nData(); k++) {
378  if (!filterList.filterParams(f).passEvent(*history->data(k))) continue;
379  const EventData* eventData = history->data(k)->eventData();
380  std::map<std::pair<unsigned int, unsigned int>, unsigned int>::const_iterator findIndex =
381  eventIndices.find(std::pair<unsigned int, unsigned int>(eventData->run(), eventData->event()));
382  if (findIndex == eventIndices.end()) {
383  cout << "Inconsistent event numbering!!!" << endl;
384  delete newHist;
385  return std::vector<TreeAccessor*>();
386  }
387  int oldEvtIndex = findIndex->second;
388  bool isNewEvt = (eventsToKeep[f].find(oldEvtIndex) == eventsToKeep[f].end());
389  unsigned int newEvtIndex = (isNewEvt ? eventsToKeep[f].size() : eventsToKeep[f][oldEvtIndex]);
390  if (isNewEvt) eventsToKeep[f][oldEvtIndex] = newEvtIndex;
391 
392  int oldRunIndex = history->data(k)->eventData()->runIndex();
393  bool isNewRun = (runsToKeep[f].find(oldRunIndex) == runsToKeep[f].end());
394  unsigned int newRunIndex = (isNewRun ? runsToKeep[f].size() : runsToKeep[f][oldRunIndex]);
395  if (isNewRun) runsToKeep[f][oldRunIndex] = newRunIndex;
396 
397  Data* newData = tweaker.tweak(*history->data(k), newEvtIndex);
398  if (!newData) {
399  cout << "Filtering failed on data " << k << " of cell " << i << ", aborting" << endl;
400  delete newHist;
401  for (unsigned int f = 0; f < filterList.size(); f++) delete newAccessors[f];
402  return std::vector<TreeAccessor*>();
403  }
404  nPass++;
405  newHist->add(newData->dissolve());
406  }
407  newAccessors[f]->add(newHist);
408  delete newHist;
409  }
410  }
411 
412  for (unsigned int f = 0; f < filterList.size(); f++) {
413  cout << "Adding runs..." << endl;
414  std::vector<unsigned int> runsToKeep_ordered(runsToKeep[f].size());
415  for (const auto& runIndex : runsToKeep[f])
416  runsToKeep_ordered[runIndex.second] = runIndex.first;
417 
418  for (unsigned int runIndex : runsToKeep_ordered) {
419  RunData* newRun = new RunData(*accessor.runData(runIndex));
420  newAccessors[f]->addRun(newRun);
421  delete newRun;
422  }
423  cout << "Adding events..." << endl;
424  std::vector<unsigned int> eventsToKeep_ordered(eventsToKeep[f].size());
425  for (const auto& eventIndex : eventsToKeep[f])
426  eventsToKeep_ordered[eventIndex.second] = eventIndex.first;
427 
428  for (unsigned int eventIndex : eventsToKeep_ordered) {
429  std::map<unsigned int, unsigned int>::const_iterator idx = runsToKeep[f].find(accessor.eventData(eventIndex)->runIndex());
430  int newRunIndex = (idx == runsToKeep[f].end() ? 0 : idx->second);
431  EventData* newEvent = tweaker.tweak(*accessor.eventData(eventIndex), newRunIndex);
432  newAccessors[f]->addEvent(newEvent);
433  delete newEvent;
434  }
435  }
436  cout << "Filtering done! final size = " << nPass << endl;
437  //ClassCounts::printCountsTable();
438  for (unsigned int f = 0; f < filterList.size(); f++) {
439  cout << "Saving " << newAccessors[f]->fileName() << endl;
440  newAccessors[f]->save();
441  }
442  return newAccessors;
443 }
444 
445 
447 {
448  TreeAccessor* newAccessor = new TreeAccessor(fileName);
449 
450  std::vector<short> samples(5, 0);
451  std::vector<float> autoCorrs(4, 0);
452 
453  RunData* dummyRun = new RunData(0);
454  newAccessor->addRun(dummyRun);
455  delete dummyRun;
456 
457  EventData* dummyEvent = new EventData(0, 0, 0, 0);
458  newAccessor->addEvent(dummyEvent);
459  delete dummyEvent;
460 
461  for (unsigned int i = 0; i < accessor.nChannels(); i++) {
462  if (i % 25000 == 0)
463  cout << "Templating " << i << "/" << accessor.nChannels() << endl;
464  const History* history = accessor.cellHistory(i);
465  if (!history || !history->cellInfo()) {
467  newAccessor->add(newHist);
468  delete newHist;
469  continue;
470  }
471  HistoryContainer* newHist = new HistoryContainer(new CellInfo(*history->cellInfo()));
472  DataContainer* dataContainer = new DataContainer(CaloGain::LARHIGHGAIN, samples, 0, 0, 0, 0, autoCorrs);
473  newHist->add(dataContainer);
474  newAccessor->add(newHist);
475  delete newHist;
476  }
477 
478  newAccessor->save();
479  return newAccessor;
480 }
481 
482 bool TreeAccessor::writeToFile(const TString& fileName) const
483 {
484  TFile* newFile = new TFile(fileName, "RECREATE");
485  if (newFile && !newFile->IsOpen()) { delete newFile; newFile = nullptr; }
486  if (!newFile) return false;
487 
488  cellTree().Write();
489  eventTree().Write();
490 
491  delete newFile;
492 
493  return true;
494 }
grepfile.info
info
Definition: grepfile.py:38
LArSamples::FilterParams::passCell
bool passCell(const CellInfo &info) const
Definition: FilterParams.cxx:482
RunData.h
LArSamples::FilterParams::passEvent
bool passEvent(const Data &data) const
Definition: FilterParams.cxx:427
checkFileSG.line
line
Definition: checkFileSG.py:75
LArSamples::Data::container
const DataContainer & container() const
Definition: Data.h:156
get_generator_info.result
result
Definition: get_generator_info.py:21
LArSamples::PersistentAccessor::currentContainer
HistoryContainer * currentContainer() const
Definition: PersistentAccessor.h:66
run.infile
string infile
Definition: run.py:13
LArSamples::FilterParams
Definition: FilterParams.h:50
LArSamples::EventData::event
int event() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:44
LArSamples::History::cellInfo
const CellInfo * cellInfo() const
Definition: History.h:56
LArSamples::Accessor
A base class for accessing ntuple data.
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Accessor.h:24
LArSamples::History
Definition: History.h:35
checkCorrelInHIST.ilb
ilb
Definition: checkCorrelInHIST.py:563
ClassCounts.h
LArSamples::FilterList::filterParams
const FilterParams & filterParams(unsigned int i) const
Definition: FilterList.h:30
LArSamples::Data::run
int run() const
Definition: Data.cxx:27
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
LArSamples
Definition: AbsShape.h:24
TreeAccessor.h
LArSamples::EventData::runIndex
int runIndex() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:53
GetEntries
TGraphErrors * GetEntries(TH2F *histo)
Definition: TRTCalib_makeplots.cxx:4019
FilterParams.h
LArSamples::PersistentAccessor::runTree
const TTree & runTree() const
Definition: PersistentAccessor.h:47
LArSamples::ShapeInfo
Definition: ShapeInfo.h:24
LArSamples::PersistentAccessor::addEvent
void addEvent(EventData *eventData)
Definition: PersistentAccessor.cxx:175
LArSamples::TreeAccessor::getCellInfo
const CellInfo * getCellInfo(unsigned int i) const
Definition: TreeAccessor.cxx:47
LArSamples::FilterList::add
void add(const FilterParams &params, const TString &fileName)
Definition: FilterList.h:27
LArSamples::Data::event
int event() const
Definition: Data.cxx:28
ShapeInfo.h
DataTweaker.h
LArSamples::PersistentAccessor::SCTree
const TTree & SCTree() const
Definition: PersistentAccessor.h:45
LArSamples::PersistentAccessor::file
TFile * file() const
Definition: PersistentAccessor.h:49
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArSamples::RunData
Definition: RunData.h:21
LArSamples::History::data
const Data * data(unsigned int i) const
Definition: History.cxx:91
LArSamples::TreeAccessor::getCellHistory
const History * getCellHistory(unsigned int i) const
Definition: TreeAccessor.cxx:62
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
lumiFormat.i
int i
Definition: lumiFormat.py:85
LArSamples::Data::gainStr
static TString gainStr(CaloGain::CaloGain gain)
Definition: Data.cxx:505
LArSamples::CellInfo::shape
const ShapeInfo * shape(CaloGain::CaloGain gain) const
Definition: CellInfo.cxx:78
MakeNewFileFromOldAndSubstitution.newHist
dictionary newHist
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:96
LArSamples::TreeAccessor::makeTemplate
static TreeAccessor * makeTemplate(const Accessor &accessor, const TString &fileName)
Definition: TreeAccessor.cxx:446
LArSamples::EventData::run
int run() const
Definition: EventData.cxx:59
hist_file_dump.f
f
Definition: hist_file_dump.py:141
ITk::EventData
InDet::SiSpacePointsSeedMakerEventData EventData
Definition: ITkSiSpacePointsSeedMaker.h:63
run
Definition: run.py:1
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
LArSamples::DataTweaker
Definition: DataTweaker.h:24
LArSamples::History::nData
unsigned int nData() const
Definition: History.h:51
LArSamples::TreeAccessor::merge
static TreeAccessor * merge(const std::vector< const Accessor * > &accessors, const TString &fileName="")
Definition: TreeAccessor.cxx:92
EventData.h
LArSamples::TreeAccessor::eventData
const EventData * eventData(unsigned int i) const
Definition: TreeAccessor.h:65
LArSamples::FilterList
Definition: FilterList.h:21
LArSamples::DataTweaker::tweak
Data * tweak(const Data &data, int evtIndex=-1) const
Definition: DataTweaker.cxx:47
LArSamples::PersistentAccessor::getCellEntry
int getCellEntry(unsigned int i) const
Definition: PersistentAccessor.h:72
LArSamples::PersistentAccessor::cellTree
const TTree & cellTree() const
Definition: PersistentAccessor.h:44
LArSamples::Data
Definition: Data.h:72
LArSamples::FilterList::fileName
const TString & fileName(unsigned int i) const
Definition: FilterList.h:31
LArSamples::Data::dissolve
const DataContainer * dissolve()
Definition: Data.cxx:56
LArSamples::Data::gain
CaloGain::CaloGain gain() const
Definition: Data.h:85
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArSamples::CellInfo
Definition: CellInfo.h:31
LArSamples::PersistentAccessor::historyContainerSC
const HistoryContainer * historyContainerSC(unsigned int i) const
Definition: PersistentAccessor.cxx:112
xAOD::JetAttributeAccessor::accessor
const AccessorWrapper< T > * accessor(xAOD::JetAttribute::AttributeID id)
Returns an attribute accessor corresponding to an AttributeID.
Definition: JetAccessorMap.h:26
LArSamples::HistoryContainer::cellInfo
const CellInfo * cellInfo() const
Definition: HistoryContainer.h:43
LArSamples::PersistentAccessor::save
bool save() const
Definition: PersistentAccessor.cxx:191
LArSamples::TreeAccessor::getSCHistory
const History * getSCHistory(unsigned int i) const
Definition: TreeAccessor.cxx:77
LArSamples::TreeAccessor::filter
static TreeAccessor * filter(const Accessor &accessor, const FilterParams &filterParams, const TString &fileName, const DataTweaker &tweaker)
Definition: TreeAccessor.cxx:313
LArSamples::DataContainer
Definition: DataContainer.h:25
LArSamples::HistoryContainer
Definition: HistoryContainer.h:29
LArSamples::TreeAccessor::getSCInfo
const CellInfo * getSCInfo(unsigned int i) const
Definition: TreeAccessor.cxx:54
LArSamples::PersistentAccessor::currentContainerSC
HistoryContainer * currentContainerSC() const
Definition: PersistentAccessor.h:67
LArSamples::HistoryContainer::add
void add(const DataContainer *data)
append data (takes ownership)
Definition: HistoryContainer.h:46
DeMoScan.first
bool first
Definition: DeMoScan.py:536
LArSamples::PersistentAccessor::getSCEntry
int getSCEntry(unsigned int i) const
Definition: PersistentAccessor.h:73
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArSamples::PersistentAccessor::eventTree
const TTree & eventTree() const
Definition: PersistentAccessor.h:46
LArSamples::TreeAccessor::writeToFile
bool writeToFile(const TString &fileName) const
Definition: TreeAccessor.cxx:482
Data.h
LArSamples::TreeAccessor::TreeAccessor
TreeAccessor(TTree &cellTree, TTree &scTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor
Definition: TreeAccessor.h:37
xAODRootTest.accessors
dictionary accessors
Definition: xAODRootTest.py:73
LArSamples::PersistentAccessor::addRun
void addRun(RunData *runData)
Definition: PersistentAccessor.cxx:183
LArSamples::TreeAccessor::add
void add(HistoryContainer *cont)
Definition: TreeAccessor.h:70
LArSamples::PersistentAccessor::historyContainer
const HistoryContainer * historyContainer(unsigned int i) const
Definition: PersistentAccessor.cxx:106
LArSamples::Data::eventData
const EventData * eventData() const
Definition: Data.h:95
LArSamples::History::isValid
bool isValid() const
Definition: History.cxx:152
LArSamples::TreeAccessor
Definition: TreeAccessor.h:32
LArSamples::FilterList::size
unsigned int size() const
Definition: FilterList.h:29
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
LArSamples::PersistentAccessor::fileName
TString fileName() const
Definition: PersistentAccessor.cxx:154
LArSamples::DataContainer::setEventIndex
void setEventIndex(int index)
Definition: DataContainer.h:92
LArSamples::AbsLArCells::nChannels
virtual unsigned int nChannels() const
Definition: AbsLArCells.h:34
fitman.k
k
Definition: fitman.py:528
LArSamples::TreeAccessor::open
static TreeAccessor * open(const TString &fileName)
Definition: TreeAccessor.cxx:30
LArSamples::HistoryContainer::nDataContainers
unsigned int nDataContainers() const
Definition: HistoryContainer.h:40
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34