ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
LArSamples::TreeAccessor Class Reference

#include <TreeAccessor.h>

Inheritance diagram for LArSamples::TreeAccessor:
Collaboration diagram for LArSamples::TreeAccessor:

Public Member Functions

 TreeAccessor (TTree &cellTree, TTree &eventTree, TTree *runTree, TFile *file)
 Constructor
More...
 
 TreeAccessor (const TString &fileName)
 
virtual ~TreeAccessor ()
 
bool writeToFile (const TString &fileName) const
 
unsigned int historySize (unsigned int i) const
 
unsigned int nEvents () const
 
const EventDataeventData (unsigned int i) const
 
unsigned int nRuns () const
 
const RunDatarunData (unsigned int i) const
 
void add (HistoryContainer *cont)
 
const HistorygetCellHistory (unsigned int i) const
 
const CellInfogetCellInfo (unsigned int i) const
 
virtual const HistorynewCellHistory (unsigned int i) const
 
virtual const HistorycellHistory (unsigned int i) const
 
virtual const CellInfocellInfo (unsigned int i) const
 
virtual unsigned int nChannels () const
 
virtual void resetCache () const
 
const CellInfocellInfoCache (unsigned int i) const
 
const Historypass (unsigned int i, const FilterParams &f) const
 
const HistorycellCache () const
 
unsigned int cachePos () const
 
void resetCellInfoCache ()
 
bool save () const
 
const TTree & cellTree () const
 
const TTree & eventTree () const
 
const TTree & runTree () const
 
TFile * file () const
 
TString fileName () const
 
const HistoryContainerhistoryContainer (unsigned int i) const
 
void addEvent (EventData *eventData)
 
void addRun (RunData *runData)
 
HistoryContainercurrentContainer () const
 
int getCellEntry (unsigned int i) const
 

Static Public Member Functions

static TreeAccessoropen (const TString &fileName)
 
static TreeAccessormerge (const std::vector< const Accessor * > &accessors, const TString &fileName="")
 
static TreeAccessormerge (const std::vector< const Accessor * > &accessors, const TString &fileName, const TString &LBFile)
 
static TreeAccessorfilter (const Accessor &accessor, const FilterParams &filterParams, const TString &fileName, const DataTweaker &tweaker)
 
static std::vector< TreeAccessor * > filter (const Accessor &accessor, const FilterList &filterList, const DataTweaker &tweaker)
 
static TreeAccessormakeTemplate (const Accessor &accessor, const TString &fileName)
 
static PersistentAccessormerge (const std::vector< const PersistentAccessor * > &accessors, const TString &fileName)
 
static PersistentAccessormerge (const std::vector< TString > &inputFiles, const TString &fileName)
 

Private Attributes

unsigned int m_pos
 
const Historym_cellCache
 
std::vector< CellInfo * > m_cellInfoCache
 
TTree * m_cellTree
 
TTree * m_eventTree
 
TTree * m_runTree
 
TFile * m_file
 
HistoryContainerm_historyCont
 
EventDatam_eventData
 
RunDatam_runData
 
std::map< unsigned int, const RunData * > m_runCache
 

Friends

class Interface
 

Detailed Description

Definition at line 32 of file TreeAccessor.h.

Constructor & Destructor Documentation

◆ TreeAccessor() [1/2]

LArSamples::TreeAccessor::TreeAccessor ( TTree &  cellTree,
TTree &  eventTree,
TTree *  runTree,
TFile *  file 
)
inline

Constructor

Definition at line 37 of file TreeAccessor.h.

◆ TreeAccessor() [2/2]

LArSamples::TreeAccessor::TreeAccessor ( const TString &  fileName)
inline

Definition at line 40 of file TreeAccessor.h.

◆ ~TreeAccessor()

virtual LArSamples::TreeAccessor::~TreeAccessor ( )
inlinevirtual

Definition at line 44 of file TreeAccessor.h.

44 { resetCache(); }

Member Function Documentation

◆ add()

void LArSamples::TreeAccessor::add ( HistoryContainer cont)
inline

Definition at line 69 of file TreeAccessor.h.

◆ addEvent()

void PersistentAccessor::addEvent ( EventData eventData)
inherited

Definition at line 149 of file PersistentAccessor.cxx.

150 {
152  m_eventTree->Fill();
153  m_eventData = nullptr;
154 }

◆ addRun()

void PersistentAccessor::addRun ( RunData runData)
inherited

Definition at line 157 of file PersistentAccessor.cxx.

158 {
159  m_runData = runData;
160  m_runTree->Fill();
161  m_runData = nullptr;
162 }

◆ cachePos()

unsigned int LArSamples::AbsLArCells::cachePos ( ) const
inlineinherited

Definition at line 45 of file AbsLArCells.h.

45 { return m_pos; }

◆ cellCache()

const History* LArSamples::AbsLArCells::cellCache ( ) const
inlineinherited

Definition at line 44 of file AbsLArCells.h.

44 { return m_cellCache; }

◆ cellHistory()

const History * AbsLArCells::cellHistory ( unsigned int  i) const
virtualinherited

Reimplemented in LArSamples::Interface.

Definition at line 57 of file AbsLArCells.cxx.

58 {
59  if (m_pos == i) return m_cellCache;
60  resetCache();
61  const History* history = newCellHistory(i);
62  if (!history) return nullptr;
63  m_cellCache = history;
64  m_pos = i;
65  return m_cellCache;
66 }

◆ cellInfo()

const CellInfo * AbsLArCells::cellInfo ( unsigned int  i) const
virtualinherited

Definition at line 69 of file AbsLArCells.cxx.

70 {
71  const CellInfo* info = cellInfoCache(i);
72  if (info) return (info->isValid() ? new CellInfo(*info) : nullptr);
73  info = getCellInfo(i);
74  if (info) m_cellInfoCache[i] = new CellInfo(*info, false);
75  //m_cellInfoCache[i] = (info ? new CellInfo(*info, false) : new CellInfo());
76  return info;
77 }

◆ cellInfoCache()

const CellInfo * AbsLArCells::cellInfoCache ( unsigned int  i) const
inherited

Definition at line 80 of file AbsLArCells.cxx.

81 {
82  return m_cellInfoCache[i];
83 }

◆ cellTree()

const TTree& LArSamples::PersistentAccessor::cellTree ( ) const
inlineinherited

Definition at line 43 of file PersistentAccessor.h.

43 { return *m_cellTree; }

◆ currentContainer()

HistoryContainer* LArSamples::PersistentAccessor::currentContainer ( ) const
inlineinherited

Definition at line 62 of file PersistentAccessor.h.

62 { return m_historyCont; }

◆ eventData()

const EventData* LArSamples::TreeAccessor::eventData ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 64 of file TreeAccessor.h.

◆ eventTree()

const TTree& LArSamples::PersistentAccessor::eventTree ( ) const
inlineinherited

Definition at line 44 of file PersistentAccessor.h.

44 { return *m_eventTree; }

◆ file()

TFile* LArSamples::PersistentAccessor::file ( ) const
inlineinherited

Definition at line 47 of file PersistentAccessor.h.

47 { return m_file; }

◆ fileName()

TString PersistentAccessor::fileName ( ) const
inherited

Definition at line 135 of file PersistentAccessor.cxx.

136 {
137  return (m_file ? m_file->GetName() : "");
138 }

◆ filter() [1/2]

std::vector< TreeAccessor * > TreeAccessor::filter ( const Accessor accessor,
const FilterList filterList,
const DataTweaker tweaker 
)
static

Definition at line 303 of file TreeAccessor.cxx.

306 {
307  if (filterList.size() == 0) {
308  cout << "No filter categories specified, done! (?)" << endl;
309  return std::vector<TreeAccessor*>();
310  }
311 
312  for (unsigned int f = 0; f < filterList.size(); f++) {
313  cout << "Skimming to " << filterList.fileName(f) << endl;
314  if (!gSystem->AccessPathName(filterList.fileName(f))) {
315  cout << "File already exists, exiting." << endl;
316  return std::vector<TreeAccessor*>();
317  }
318  }
319 
320  std::vector<TreeAccessor*> newAccessors;
321  for (unsigned int f = 0; f < filterList.size(); f++)
322  newAccessors.push_back(new TreeAccessor(filterList.fileName(f)));
323  std::map<std::pair<unsigned int, unsigned int>, unsigned int> eventIndices;
324  std::vector< std::map<unsigned int, unsigned int> > eventsToKeep(filterList.size());
325  std::vector< std::map<unsigned int, unsigned int> > runsToKeep(filterList.size());
326 
327  double nTot = 0, nPass = 0;
328 
329  for (unsigned int i = 0; i < accessor.nEvents(); i++) {
330  const EventData* eventData = accessor.eventData(i);
331  eventIndices[std::pair<unsigned int, unsigned int>(eventData->run(), eventData->event())] = i;
332  }
333 
334  for (unsigned int i = 0; i < accessor.nChannels(); i++) {
335  if (i % 25000 == 0) {
336  cout << "Filtering " << i << "/" << accessor.nChannels()
337  << " (passing so far = " << nPass << ", total seen = " << nTot << ")" << endl;
338  //ClassCounts::printCountsTable();
339  }
340  bool first = true;
341 
342  const History* history = nullptr;
343  for (unsigned int f = 0; f < filterList.size(); f++) {
344  history = accessor.pass(i, filterList.filterParams(f));
345  if (history) break;
346  }
347  for (unsigned int f = 0; f < filterList.size(); f++) {
348  if (!history || !history->cellInfo() || !filterList.filterParams(f).passCell(*history->cellInfo())) {
350  newAccessors[f]->add(newHist);
351  delete newHist;
352  continue;
353  }
354  if (first) { nTot += history->nData(); first = false; }
355  HistoryContainer* newHist = new HistoryContainer(new CellInfo(*history->cellInfo()));
356  for (unsigned int k = 0; k < history->nData(); k++) {
357  if (!filterList.filterParams(f).passEvent(*history->data(k))) continue;
358  const EventData* eventData = history->data(k)->eventData();
359  std::map<std::pair<unsigned int, unsigned int>, unsigned int>::const_iterator findIndex =
360  eventIndices.find(std::pair<unsigned int, unsigned int>(eventData->run(), eventData->event()));
361  if (findIndex == eventIndices.end()) {
362  cout << "Inconsistent event numbering!!!" << endl;
363  delete newHist;
364  return std::vector<TreeAccessor*>();
365  }
366  int oldEvtIndex = findIndex->second;
367  bool isNewEvt = (eventsToKeep[f].find(oldEvtIndex) == eventsToKeep[f].end());
368  unsigned int newEvtIndex = (isNewEvt ? eventsToKeep[f].size() : eventsToKeep[f][oldEvtIndex]);
369  if (isNewEvt) eventsToKeep[f][oldEvtIndex] = newEvtIndex;
370 
371  int oldRunIndex = history->data(k)->eventData()->runIndex();
372  bool isNewRun = (runsToKeep[f].find(oldRunIndex) == runsToKeep[f].end());
373  unsigned int newRunIndex = (isNewRun ? runsToKeep[f].size() : runsToKeep[f][oldRunIndex]);
374  if (isNewRun) runsToKeep[f][oldRunIndex] = newRunIndex;
375 
376  Data* newData = tweaker.tweak(*history->data(k), newEvtIndex);
377  if (!newData) {
378  cout << "Filtering failed on data " << k << " of cell " << i << ", aborting" << endl;
379  delete newHist;
380  for (unsigned int f = 0; f < filterList.size(); f++) delete newAccessors[f];
381  return std::vector<TreeAccessor*>();
382  }
383  nPass++;
384  newHist->add(newData->dissolve());
385  }
386  newAccessors[f]->add(newHist);
387  delete newHist;
388  }
389  }
390 
391  for (unsigned int f = 0; f < filterList.size(); f++) {
392  cout << "Adding runs..." << endl;
393  std::vector<unsigned int> runsToKeep_ordered(runsToKeep[f].size());
394  for (const auto& runIndex : runsToKeep[f])
395  runsToKeep_ordered[runIndex.second] = runIndex.first;
396 
397  for (unsigned int runIndex : runsToKeep_ordered) {
398  RunData* newRun = new RunData(*accessor.runData(runIndex));
399  newAccessors[f]->addRun(newRun);
400  delete newRun;
401  }
402  cout << "Adding events..." << endl;
403  std::vector<unsigned int> eventsToKeep_ordered(eventsToKeep[f].size());
404  for (const auto& eventIndex : eventsToKeep[f])
405  eventsToKeep_ordered[eventIndex.second] = eventIndex.first;
406 
407  for (unsigned int eventIndex : eventsToKeep_ordered) {
408  std::map<unsigned int, unsigned int>::const_iterator idx = runsToKeep[f].find(accessor.eventData(eventIndex)->runIndex());
409  int newRunIndex = (idx == runsToKeep[f].end() ? 0 : idx->second);
410  EventData* newEvent = tweaker.tweak(*accessor.eventData(eventIndex), newRunIndex);
411  newAccessors[f]->addEvent(newEvent);
412  delete newEvent;
413  }
414  }
415  cout << "Filtering done! final size = " << nPass << endl;
416  //ClassCounts::printCountsTable();
417  for (unsigned int f = 0; f < filterList.size(); f++) {
418  cout << "Saving " << newAccessors[f]->fileName() << endl;
419  newAccessors[f]->save();
420  }
421  return newAccessors;
422 }

◆ filter() [2/2]

TreeAccessor * TreeAccessor::filter ( const Accessor accessor,
const FilterParams filterParams,
const TString &  fileName,
const DataTweaker tweaker 
)
static

Definition at line 292 of file TreeAccessor.cxx.

296 {
297  FilterList filterList; filterList.add(filterParams, fileName);
298  std::vector<TreeAccessor*> result = filter(accessor, filterList, tweaker);
299  return (!result.empty() ? result[0] : nullptr);
300 }

◆ getCellEntry()

int LArSamples::PersistentAccessor::getCellEntry ( unsigned int  i) const
inlineinherited

Definition at line 67 of file PersistentAccessor.h.

67 { return m_cellTree->GetEntry(i); }

◆ getCellHistory()

const History * TreeAccessor::getCellHistory ( unsigned int  i) const
virtual

Implements LArSamples::AbsLArCells.

Definition at line 51 of file TreeAccessor.cxx.

52 {
53  //cout << "A" << endl;
54  if (i >= cellTree().GetEntries()) return nullptr;
55  //cout << "---> TTree::GetEntry " << i << endl;
56  getCellEntry(i);
57  //cout << "---> done TTree::GetEntry" << endl;
58 
59  //cout << "B " << currentContainer()->nDataContainers() << endl;
60  std::vector<const EventData*> eventDatas;
61 
62  for (unsigned int k = 0; k < currentContainer()->nDataContainers(); k++) {
63  const EventData* evtData = eventData(currentContainer()->dataContainer(k)->eventIndex());
64  EventData* newEvtData = (evtData ? new EventData(*evtData) : nullptr);
65  eventDatas.push_back(newEvtData);
66  }
67  //cout << "C" << endl;
68  //cout << "---> TreeAcc : make new hist" << endl;
69  return (currentContainer()->cellInfo() ? new History(*currentContainer(), eventDatas, i) : nullptr);
70 }

◆ getCellInfo()

const CellInfo * TreeAccessor::getCellInfo ( unsigned int  i) const
virtual

Reimplemented from LArSamples::AbsLArCells.

Definition at line 43 of file TreeAccessor.cxx.

44 {
45  const HistoryContainer* cont = historyContainer(i);
46  if (!cont || !cont->cellInfo()) return nullptr;
47  return new CellInfo(*cont->cellInfo());
48 }

◆ historyContainer()

const HistoryContainer * PersistentAccessor::historyContainer ( unsigned int  i) const
inherited

Definition at line 99 of file PersistentAccessor.cxx.

100 {
101  m_cellTree->GetEntry(i);
102  return m_historyCont;
103 }

◆ historySize()

unsigned int LArSamples::TreeAccessor::historySize ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 61 of file TreeAccessor.h.

◆ makeTemplate()

TreeAccessor * TreeAccessor::makeTemplate ( const Accessor accessor,
const TString &  fileName 
)
static

Definition at line 425 of file TreeAccessor.cxx.

426 {
427  TreeAccessor* newAccessor = new TreeAccessor(fileName);
428 
429  std::vector<short> samples(5, 0);
430  std::vector<float> autoCorrs(4, 0);
431 
432  RunData* dummyRun = new RunData(0);
433  newAccessor->addRun(dummyRun);
434  delete dummyRun;
435 
436  EventData* dummyEvent = new EventData(0, 0, 0, 0);
437  newAccessor->addEvent(dummyEvent);
438  delete dummyEvent;
439 
440  for (unsigned int i = 0; i < accessor.nChannels(); i++) {
441  if (i % 25000 == 0)
442  cout << "Templating " << i << "/" << accessor.nChannels() << endl;
443  const History* history = accessor.cellHistory(i);
444  if (!history || !history->cellInfo()) {
446  newAccessor->add(newHist);
447  delete newHist;
448  continue;
449  }
450  HistoryContainer* newHist = new HistoryContainer(new CellInfo(*history->cellInfo()));
451  DataContainer* dataContainer = new DataContainer(CaloGain::LARHIGHGAIN, samples, 0, 0, 0, 0, autoCorrs);
452  newHist->add(dataContainer);
453  newAccessor->add(newHist);
454  delete newHist;
455  }
456 
457  newAccessor->save();
458  return newAccessor;
459 }

◆ merge() [1/4]

TreeAccessor * TreeAccessor::merge ( const std::vector< const Accessor * > &  accessors,
const TString &  fileName,
const TString &  LBFile 
)
static

Definition at line 162 of file TreeAccessor.cxx.

163 {
164  // O.Simard - 01.07.2011
165  // Alternative version with LB cleaning.
166 
167  bool kBadLB=false;
168  std::vector<unsigned int> LBList;
169  std::ifstream infile(LBFile.Data());
170  std::string line;
171  // assume single-line format with coma-separated LBs (from python)
172  std::getline(infile,line,'\n');
173  TString filter(line.c_str());
174  TObjArray* list = filter.Tokenize(", "); // coma\space delimiters
175  if(list->GetEntries() == 0){
176  printf("No LB filtering specified, or bad format. Exiting.\n");
177  delete list;
178  return nullptr;
179  }
180 
181  for(int k = 0; k < list->GetEntries(); k++){
182  TObjString* tobs = (TObjString*)(list->At(k));
183  LBList.push_back((unsigned int)(tobs->String()).Atoi());
184  }
185  delete list;
186  printf("LB List: %d\n",(int)LBList.size());
187 
188 
189  // from here it is similar to other functions of this class
190  TreeAccessor* newAcc = new TreeAccessor(fileName);
191  unsigned int size = 0;
192  CellInfo* info = nullptr;
193 
194  int evtIndex = 0, runIndex = 0;
195  std::map<std::pair<int, int>, int> evtMap;
196  std::map<int, int> runMap;
197 
198  cout << "Merging runs" << endl;
199  for (const Accessor* accessor : accessors) {
200  if (!accessor) {
201  cout << "Cannot merge: one of the inputs is null!" << endl;
202  return nullptr;
203  }
204  for (unsigned int i = 0; i < accessor->nRuns(); i++) {
205  int run = accessor->runData(i)->run();
206  if (runMap.find(run) != runMap.end()) continue;
207  runMap[run] = runIndex;
208  RunData* newRun = new RunData(*accessor->runData(i));
209  newAcc->addRun(newRun);
210  delete newRun;
211  runIndex++;
212  }
213  }
214 
215  cout << "Merging events" << endl;
216  unsigned int nEventsTotal = 0, iEvt = 0;
217  for (const Accessor* accessor : accessors)
218  nEventsTotal += accessor->nEvents();
219  for (const Accessor* accessor : accessors) {
220  for (unsigned int i = 0; i < accessor->nEvents(); i++) {
221  iEvt++;
222  if (iEvt % 100000 == 0) cout << "Merging event " << iEvt << "/" << nEventsTotal << endl;
223 
224  // ----
225  // skip LBs which are found in the list
226  kBadLB=false;
227  for(unsigned int ilb = 0 ; ilb < LBList.size() ; ilb++){
228  if(LBList.at(ilb)==accessor->eventData(i)->lumiBlock()){
229  kBadLB=true;
230  //printf(" == Rejecting Event in LB %4d\n",accessor->eventData(i)->lumiBlock());
231  break;
232  }
233  }
234  if(kBadLB) continue;
235  // ----
236 
237  std::pair<int, int> evtId(accessor->eventData(i)->run(), accessor->eventData(i)->event());
238  if (evtMap.find(evtId) != evtMap.end()) continue;
239  evtMap[evtId] = evtIndex;
240  std::map<int, int>::const_iterator idx = runMap.find(accessor->eventData(i)->run());
241  int newRunIndex = (idx == runMap.end() ? -999 : idx->second);
242  EventData* newEvent = new EventData(*accessor->eventData(i), newRunIndex);
243  newAcc->addEvent(newEvent);
244  delete newEvent;
245  evtIndex++;
246  }
247  }
248 
249  for (unsigned int i = 0; i < newAcc->nChannels(); i++) {
250  if (i % 10000 == 0) {
251  cout << "Merging channel " << i << "/" << newAcc->nChannels() << " (current size = " << size << ")" << endl;
252  //ClassCounts::printCountsTable();
253  }
255  for (const Accessor* accessor : accessors) {
256  const History* history = accessor->cellHistory(i);
257  if (!history || !history->isValid()) continue;
258  if (!historyContainer) {
259  info = new CellInfo(*history->cellInfo());
261  }
262  for (unsigned int j = 0; j < history->nData(); j++) {
263  DataContainer* newDC = new DataContainer(history->data(j)->container());
264  std::map<std::pair<int, int>, int>::const_iterator newIndex
265  = evtMap.find(std::make_pair(history->data(j)->run(), history->data(j)->event()));
266  //if (newIndex == evtMap.end()) cout << "Event not found for cell " << i << ", data " << j << "." << endl;
267  newDC->setEventIndex(newIndex != evtMap.end() ? newIndex->second : -1);
268  historyContainer->add(newDC);
269  if (!info->shape(history->data(j)->gain())) {
270  const ShapeInfo* shape = history->cellInfo()->shape(history->data(j)->gain());
271  if (!shape)
272  cout << "Shape not filled for hash = " << i << ", index = " << j << ", gain = " << Data::gainStr(history->data(j)->gain()) << endl;
273  info->setShape(history->data(j)->gain(), (shape ? new ShapeInfo(*shape) : nullptr));
274  }
275  }
276  }
277  if(historyContainer){
279  }
280  newAcc->add(historyContainer);
281  delete historyContainer;
282  historyContainer=nullptr;
283  //}
284  }
285 
286  cout << "Merging done, final size = " << size << endl;
287  newAcc->save();
288  return newAcc;
289 }

◆ merge() [2/4]

TreeAccessor * TreeAccessor::merge ( const std::vector< const Accessor * > &  accessors,
const TString &  fileName = "" 
)
static

Definition at line 73 of file TreeAccessor.cxx.

75 {
76  cout << "Merging to " << fileName << endl;
77  TreeAccessor* newAcc = new TreeAccessor(fileName);
78  unsigned int size = 0;
79  CellInfo* info = nullptr;
80 
81  int evtIndex = 0, runIndex = 0;
82  std::map<std::pair<int, int>, int> evtMap;
83  std::map<int, int> runMap;
84 
85  cout << "Merging runs" << endl;
86  for (const Accessor* accessor : accessors) {
87  if (!accessor) {
88  cout << "Cannot merge: one of the inputs is null!" << endl;
89  return nullptr;
90  }
91  for (unsigned int i = 0; i < accessor->nRuns(); i++) {
92  int run = accessor->runData(i)->run();
93  if (runMap.find(run) != runMap.end()) continue;
94  runMap[run] = runIndex;
95  RunData* newRun = new RunData(*accessor->runData(i));
96  newAcc->addRun(newRun);
97  delete newRun;
98  runIndex++;
99  }
100  }
101 
102  cout << "Merging events" << endl;
103  unsigned int nEventsTotal = 0, iEvt = 0;
104  for (const Accessor* accessor : accessors)
105  nEventsTotal += accessor->nEvents();
106  for (const Accessor* accessor : accessors) {
107  for (unsigned int i = 0; i < accessor->nEvents(); i++) {
108  iEvt++;
109  if (iEvt % 100000 == 0) cout << "Merging event " << iEvt << "/" << nEventsTotal << endl;
110  std::pair<int, int> evtId(accessor->eventData(i)->run(), accessor->eventData(i)->event());
111  if (evtMap.find(evtId) != evtMap.end()) continue;
112  evtMap[evtId] = evtIndex;
113  std::map<int, int>::const_iterator idx = runMap.find(accessor->eventData(i)->run());
114  int newRunIndex = (idx == runMap.end() ? -999 : idx->second);
115  //cout << "Storing eventData for run " << accessor->eventData(i)->run() << " at index " << newRunIndex << " instead of " << accessor->eventData(i)->runIndex() << endl;
116  EventData* newEvent = new EventData(*accessor->eventData(i), newRunIndex);
117  newAcc->addEvent(newEvent);
118  delete newEvent;
119  evtIndex++;
120  }
121  }
122 
123  for (unsigned int i = 0; i < newAcc->nChannels(); i++) {
124  if (i % 10000 == 0) {
125  cout << "Merging channel " << i << "/" << newAcc->nChannels() << " (current size = " << size << ")" << endl;
126  //ClassCounts::printCountsTable();
127  }
129  for (const Accessor* accessor : accessors) {
130  const History* history = accessor->cellHistory(i);
131  if (!history || !history->isValid()) continue;
132  if (!historyContainer) {
133  info = new CellInfo(*history->cellInfo());
135  }
136  for (unsigned int j = 0; j < history->nData(); j++) {
137  DataContainer* newDC = new DataContainer(history->data(j)->container());
138  std::map<std::pair<int, int>, int>::const_iterator newIndex
139  = evtMap.find(std::make_pair(history->data(j)->run(), history->data(j)->event()));
140  if (newIndex == evtMap.end()) cout << "Event not found for cell " << i << ", data " << j << "." << endl;
141  newDC->setEventIndex(newIndex != evtMap.end() ? newIndex->second : -1);
142  historyContainer->add(newDC);
143  if (!info->shape(history->data(j)->gain())) {
144  const ShapeInfo* shape = history->cellInfo()->shape(history->data(j)->gain());
145  if (!shape)
146  cout << "Shape not filled for hash = " << i << ", index = " << j << ", gain = " << Data::gainStr(history->data(j)->gain()) << endl;
147  info->setShape(history->data(j)->gain(), (shape ? new ShapeInfo(*shape) : nullptr));
148  }
149  }
150  }
152  newAcc->add(historyContainer);
153  delete historyContainer;
154  }
155 
156  cout << "Merging done, final size = " << size << endl;
157  newAcc->save();
158  return newAcc;
159 }

◆ merge() [3/4]

PersistentAccessor * PersistentAccessor::merge ( const std::vector< const PersistentAccessor * > &  accessors,
const TString &  fileName 
)
staticinherited

Definition at line 181 of file PersistentAccessor.cxx.

183 {
185  unsigned int size = 0;
186  CellInfo* info = nullptr;
187 
188  int evtIndex = 0, runIndex = 0;
189  std::map<std::pair<int, int>, int> evtMap;
190  std::map<int, int> runMap;
191  std::map< std::pair<const PersistentAccessor*, int>, int > evtAccMap;
192 
193  cout << "Merging runs" << endl;
194  for (const PersistentAccessor* accessor : accessors) {
195  if (!accessor) {
196  cout << "Cannot merge: one of the inputs is null!" << endl;
197  delete newAcc;
198  return nullptr;
199  }
200  for (unsigned int i = 0; i < accessor->nRuns(); i++) {
201  int run = accessor->runData(i)->run();
202  if (runMap.find(run) != runMap.end()) continue;
203  runMap[run] = runIndex;
204  RunData* newRun = new RunData(*accessor->runData(i));
205  newAcc->addRun(newRun);
206  delete newRun;
207  runIndex++;
208  }
209  }
210 
211  cout << "Merging events" << endl;
212  unsigned int nEventsTotal = 0, iEvt = 0;
213  for (const PersistentAccessor* accessor : accessors) {
214  nEventsTotal += accessor->nEvents();
215  }
216  for (const PersistentAccessor* accessor : accessors) {
217  for (unsigned int i = 0; i < accessor->nEvents(); i++) {
218  iEvt++;
219  if (iEvt % 100000 == 0) cout << "Merging event " << iEvt << "/" << nEventsTotal << endl;
220  std::pair<int, int> evtId(accessor->eventData(i)->run(), accessor->eventData(i)->event());
221  std::pair<const PersistentAccessor*, int> evtAccId(accessor, i);
222  if (evtMap.find(evtId) != evtMap.end()) {
223  cout << "ERROR: Skipping duplicate entry for run " << accessor->eventData(i)->run() << ", event " << accessor->eventData(i)->event() << endl;
224  continue;
225  }
226  evtAccMap[evtAccId] = evtIndex;
227  evtMap[evtId] = evtIndex;
228  std::map<int, int>::const_iterator idx = runMap.find(accessor->eventData(i)->run());
229  int newRunIndex = (idx == runMap.end() ? -999 : idx->second);
230  //cout << "Storing eventData for run " << accessor->eventData(i)->run() << " at index " << newRunIndex << " instead of " << accessor->eventData(i)->runIndex() << endl;
231  EventData* newEvent = new EventData(*accessor->eventData(i), newRunIndex);
232  newAcc->addEvent(newEvent);
233  delete newEvent;
234  evtIndex++;
235  }
236  }
237 
238  for (unsigned int i = 0; i < Definitions::nChannels; i++) {
239  if (i % 10000 == 0) {
240  cout << "Merging channel " << i << "/" << Definitions::nChannels << " (current size = " << size << ")" << endl;
241  //ClassCounts::printCountsTable();
242  }
243  HistoryContainer* newHistory = nullptr;
244  for (const PersistentAccessor* accessor : accessors) {
245  const HistoryContainer* history = accessor->historyContainer(i);
246  if (!history || !history->isValid()) continue;
247  if (!newHistory) {
248  info = new CellInfo(*history->cellInfo());
249  newHistory = new HistoryContainer(info);
250  }
251  for (unsigned int j = 0; j < history->nDataContainers(); j++) {
252  DataContainer* newDC = new DataContainer(*history->dataContainer(j));
253  std::map<std::pair<const PersistentAccessor*, int>, int>::const_iterator newIndex
254  = evtAccMap.find(std::make_pair(accessor, history->dataContainer(j)->eventIndex()));
255  if (newIndex == evtAccMap.end()) cout << "Event not found for cell " << i << ", data " << j << "." << endl;
256  newDC->setEventIndex(newIndex != evtAccMap.end() ? newIndex->second : -1);
257  newHistory->add(newDC);
258  if (!info->shape(history->dataContainer(j)->gain())) {
259  const ShapeInfo* shape = history->cellInfo()->shape(history->dataContainer(j)->gain());
260  if (!shape)
261  cout << "Shape not filled for hash = " << i << ", index = " << j << ", gain = " << history->dataContainer(j)->gain() << endl;
262  info->setShape(history->dataContainer(j)->gain(), (shape ? new ShapeInfo(*shape) : nullptr));
263  }
264  }
265  }
266  if (newHistory) size += newHistory->nDataContainers();
267  newAcc->add(newHistory);
268  delete newHistory;
269  }
270 
271  cout << "Merging done, final size = " << size << endl;
272  newAcc->save();
273  return newAcc;
274 }

◆ merge() [4/4]

PersistentAccessor * PersistentAccessor::merge ( const std::vector< TString > &  inputFiles,
const TString &  fileName 
)
staticinherited

Definition at line 277 of file PersistentAccessor.cxx.

278 {
279  std::vector<const PersistentAccessor*> accessors;
280  for (const TString& inputFile : inputFiles) {
282  if (!accessor) {
283  cout << "ERROR : could not open file " << inputFile << endl;
284  return nullptr;
285  }
286  accessors.push_back(accessor);
287  }
289  for (const PersistentAccessor* accessor : accessors) {
290  delete accessor;
291  }
292  return result;
293 }

◆ nChannels()

virtual unsigned int LArSamples::AbsLArCells::nChannels ( ) const
inlinevirtualinherited

Reimplemented in LArSamples::MonitorBase.

Definition at line 34 of file AbsLArCells.h.

34 { return Definitions::nChannels; }

◆ nEvents()

unsigned int LArSamples::TreeAccessor::nEvents ( ) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 63 of file TreeAccessor.h.

63 { return PersistentAccessor::nEvents(); }

◆ newCellHistory()

const History * AbsLArCells::newCellHistory ( unsigned int  i) const
virtualinherited

Definition at line 42 of file AbsLArCells.cxx.

43 {
44  const History* history = getCellHistory(i);
45  if (!history) return nullptr;
46  if (!m_cellInfoCache[i]) {
47  const CellInfo* ci=history->cellInfo();
48  if (ci) {
49  m_cellInfoCache[i]=new CellInfo(*ci,false);
50  }
51  }
52  // m_cellInfoCache[i] = (history->cellInfo() ? new CellInfo(*history->cellInfo(), false) : new CellInfo());
53  return history;
54 }

◆ nRuns()

unsigned int LArSamples::TreeAccessor::nRuns ( ) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 66 of file TreeAccessor.h.

66 { return PersistentAccessor::nRuns(); }

◆ open()

TreeAccessor * TreeAccessor::open ( const TString &  fileName)
static

Definition at line 28 of file TreeAccessor.cxx.

29 {
30  TFile* file = TFile::Open(fileName);
31  if (!file) return nullptr;
32  if (!file->IsOpen()) { delete file; return nullptr; }
33  TTree* cellTree = (TTree*)file->Get("cells");
34  if (!cellTree) return nullptr;
35  TTree* eventTree = (TTree*)file->Get("events");
36  if (!eventTree) return nullptr;
37  TTree* runTree = (TTree*)file->Get("runs");
39  return accessor;
40 }

◆ pass()

const History * AbsLArCells::pass ( unsigned int  i,
const FilterParams f 
) const
inherited

Definition at line 97 of file AbsLArCells.cxx.

98 {
99  //std::cout << "Called AbsLArCells with hash " << i << std::endl;
100  if (!f.passHash(i)) return nullptr;
101  const CellInfo* info = cellInfo(i);
102  if (!info) {
103  return nullptr;
104  }
105  //std::cout << "Called AbsLArCells::pass on a cell belonging to " << Id::str(info->calo()) << std::endl;
106  bool result = f.passCell(*info);
107  delete info;
108  return result ? cellHistory(i) : nullptr;
109 }

◆ resetCache()

void AbsLArCells::resetCache ( ) const
virtualinherited

Definition at line 32 of file AbsLArCells.cxx.

33 {
34  if (m_cellCache) {
35  delete m_cellCache;
36  m_cellCache = nullptr;
37  }
38  m_pos = nChannels() + 1;
39 }

◆ resetCellInfoCache()

void AbsLArCells::resetCellInfoCache ( )
inherited

Definition at line 112 of file AbsLArCells.cxx.

113 {
114  unsigned int i = 0;
116  cellInfo != m_cellInfoCache.end(); ++cellInfo, i++)
117  if (*cellInfo) {
118  delete *cellInfo;
119  *cellInfo = 0;
120  }
121 }

◆ runData()

const RunData* LArSamples::TreeAccessor::runData ( unsigned int  i) const
inlinevirtual

Implements LArSamples::Accessor.

Definition at line 67 of file TreeAccessor.h.

67 { return PersistentAccessor::runData(i); }

◆ runTree()

const TTree& LArSamples::PersistentAccessor::runTree ( ) const
inlineinherited

Definition at line 45 of file PersistentAccessor.h.

45 { return *m_runTree; }

◆ save()

bool PersistentAccessor::save ( ) const
inherited

Definition at line 165 of file PersistentAccessor.cxx.

166 {
167  if (!m_file) return 0;
168  m_file->cd();
169  cout << "Writing " << m_runTree->GetEntries() << " run(s)..." << endl;
170  m_runTree->Write();
171  cout << "Writing " << m_eventTree->GetEntries() << " event(s)..." << endl;
172  m_eventTree->Write();
173  cout << "Writing " << m_cellTree->GetEntries() << " cell(s)..." << endl;
174  m_cellTree->Write();
175  m_file->Flush();
176  cout << "Writing done!" << endl;
177  return true;
178 }

◆ writeToFile()

bool TreeAccessor::writeToFile ( const TString &  fileName) const
virtual

Implements LArSamples::Accessor.

Definition at line 461 of file TreeAccessor.cxx.

462 {
463  TFile* newFile = new TFile(fileName, "RECREATE");
464  if (newFile && !newFile->IsOpen()) { delete newFile; newFile = nullptr; }
465  if (!newFile) return false;
466 
467  cellTree().Write();
468  eventTree().Write();
469 
470  delete newFile;
471 
472  return true;
473 }

Friends And Related Function Documentation

◆ Interface

friend class Interface
friend

Definition at line 55 of file TreeAccessor.h.

Member Data Documentation

◆ m_cellCache

const History* LArSamples::AbsLArCells::m_cellCache
mutableprivateinherited

Definition at line 52 of file AbsLArCells.h.

◆ m_cellInfoCache

std::vector<CellInfo*> LArSamples::AbsLArCells::m_cellInfoCache
mutableprivateinherited

Definition at line 53 of file AbsLArCells.h.

◆ m_cellTree

TTree* LArSamples::PersistentAccessor::m_cellTree
privateinherited

Definition at line 71 of file PersistentAccessor.h.

◆ m_eventData

EventData* LArSamples::PersistentAccessor::m_eventData
mutableprivateinherited

Definition at line 74 of file PersistentAccessor.h.

◆ m_eventTree

TTree * LArSamples::PersistentAccessor::m_eventTree
privateinherited

Definition at line 71 of file PersistentAccessor.h.

◆ m_file

TFile* LArSamples::PersistentAccessor::m_file
mutableprivateinherited

Definition at line 72 of file PersistentAccessor.h.

◆ m_historyCont

HistoryContainer* LArSamples::PersistentAccessor::m_historyCont
mutableprivateinherited

Definition at line 73 of file PersistentAccessor.h.

◆ m_pos

unsigned int LArSamples::AbsLArCells::m_pos
mutableprivateinherited

Definition at line 51 of file AbsLArCells.h.

◆ m_runCache

std::map<unsigned int, const RunData*> LArSamples::PersistentAccessor::m_runCache
mutableprivateinherited

Definition at line 76 of file PersistentAccessor.h.

◆ m_runData

RunData* LArSamples::PersistentAccessor::m_runData
mutableprivateinherited

Definition at line 75 of file PersistentAccessor.h.

◆ m_runTree

TTree * LArSamples::PersistentAccessor::m_runTree
privateinherited

Definition at line 71 of file PersistentAccessor.h.


The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LArSamples::FilterParams::passCell
bool passCell(const CellInfo &info) const
Definition: FilterParams.cxx:482
LArSamples::FilterParams::passEvent
bool passEvent(const Data &data) const
Definition: FilterParams.cxx:427
LArSamples::AbsLArCells::m_pos
unsigned int m_pos
Definition: AbsLArCells.h:51
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
checkFileSG.line
line
Definition: checkFileSG.py:75
LArSamples::Data::container
const DataContainer & container() const
Definition: Data.h:161
get_generator_info.result
result
Definition: get_generator_info.py:21
LArSamples::PersistentAccessor::currentContainer
HistoryContainer * currentContainer() const
Definition: PersistentAccessor.h:62
LArSamples::AbsLArCells::newCellHistory
virtual const History * newCellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:42
run.infile
string infile
Definition: run.py:13
LArSamples::PersistentAccessor::m_cellTree
TTree * m_cellTree
Definition: PersistentAccessor.h:71
LArSamples::EventData::event
int event() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:44
LArSamples::DataContainer::gain
CaloGain::CaloGain gain() const
Definition: DataContainer.h:54
LArSamples::History::cellInfo
const CellInfo * cellInfo() const
Definition: History.h:61
LArSamples::AbsLArCells::cellHistory
virtual const History * cellHistory(unsigned int i) const
Definition: AbsLArCells.cxx:57
LArSamples::PersistentAccessor::runData
const RunData * runData(unsigned int i) const
Definition: PersistentAccessor.cxx:122
Epos_Base_Fragment.inputFiles
string inputFiles
Definition: Epos_Base_Fragment.py:18
LArSamples::Accessor
A base class for accessing ntuple data.
Definition: LArCalorimeter/LArSamplesMon/LArSamplesMon/Accessor.h:24
LArSamples::History
Definition: History.h:40
LArSamples::HistoryContainer::dataContainer
const DataContainer * dataContainer(unsigned int i) const
Definition: HistoryContainer.h:41
LArSamples::AbsLArCells::m_cellInfoCache
std::vector< CellInfo * > m_cellInfoCache
Definition: AbsLArCells.h:53
checkCorrelInHIST.ilb
ilb
Definition: checkCorrelInHIST.py:563
LArSamples::PersistentAccessor
Definition: PersistentAccessor.h:24
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::AbsLArCells::cellInfo
virtual const CellInfo * cellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:69
LArSamples::EventData::runIndex
int runIndex() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:53
LArSamples::PersistentAccessor::runTree
const TTree & runTree() const
Definition: PersistentAccessor.h:45
LArSamples::ShapeInfo
Definition: ShapeInfo.h:24
LArSamples::PersistentAccessor::eventData
const EventData * eventData(unsigned int i) const
Definition: PersistentAccessor.cxx:113
LArSamples::PersistentAccessor::addEvent
void addEvent(EventData *eventData)
Definition: PersistentAccessor.cxx:149
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
LArSamples::PersistentAccessor::file
TFile * file() const
Definition: PersistentAccessor.h:47
LArSamples::PersistentAccessor::add
void add(HistoryContainer *cont)
Definition: PersistentAccessor.cxx:141
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:88
LArSamples::PersistentAccessor::PersistentAccessor
PersistentAccessor(TTree &cellTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor
Definition: PersistentAccessor.cxx:26
LArSamples::Definitions::nChannels
static const unsigned int nChannels
Definition: Definitions.h:14
LArSamples::PersistentAccessor::nEvents
unsigned int nEvents() const
Definition: PersistentAccessor.h:52
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArSamples::Data::gainStr
static TString gainStr(CaloGain::CaloGain gain)
Definition: Data.cxx:502
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArSamples::AbsLArCells::getCellInfo
virtual const CellInfo * getCellInfo(unsigned int i) const
Definition: AbsLArCells.cxx:86
LArSamples::CellInfo::shape
const ShapeInfo * shape(CaloGain::CaloGain gain) const
Definition: CellInfo.cxx:78
MakeNewFileFromOldAndSubstitution.newHist
dictionary newHist
Definition: ICHEP2016/MakeNewFileFromOldAndSubstitution.py:96
LArSamples::HistoryContainer::isValid
bool isValid() const
Definition: HistoryContainer.cxx:52
LArSamples::PersistentAccessor::historySize
unsigned int historySize(unsigned int i) const
Definition: PersistentAccessor.cxx:106
LArSamples::EventData::run
int run() const
Definition: EventData.cxx:59
LArSamples::PersistentAccessor::m_file
TFile * m_file
Definition: PersistentAccessor.h:72
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::AbsLArCells::getCellHistory
virtual const History * getCellHistory(unsigned int i) const =0
LArSamples::History::nData
unsigned int nData() const
Definition: History.h:56
LArSamples::PersistentAccessor::m_historyCont
HistoryContainer * m_historyCont
Definition: PersistentAccessor.h:73
LArSamples::PersistentAccessor::m_eventData
EventData * m_eventData
Definition: PersistentAccessor.h:74
LArSamples::TreeAccessor::eventData
const EventData * eventData(unsigned int i) const
Definition: TreeAccessor.h:64
LArSamples::PersistentAccessor::open
static PersistentAccessor * open(const TString &fileName)
Definition: PersistentAccessor.cxx: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:67
LArSamples::PersistentAccessor::nRuns
unsigned int nRuns() const
Definition: PersistentAccessor.h:55
LArSamples::PersistentAccessor::cellTree
const TTree & cellTree() const
Definition: PersistentAccessor.h:43
LArSamples::AbsLArCells::cellInfoCache
const CellInfo * cellInfoCache(unsigned int i) const
Definition: AbsLArCells.cxx:80
LArSamples::Data
Definition: Data.h:77
LArSamples::FilterList::fileName
const TString & fileName(unsigned int i) const
Definition: FilterList.h:31
LArSamples::AbsLArCells::m_cellCache
const History * m_cellCache
Definition: AbsLArCells.h:52
LArSamples::TreeAccessor::TreeAccessor
TreeAccessor(TTree &cellTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor
Definition: TreeAccessor.h:37
LArSamples::Data::dissolve
const DataContainer * dissolve()
Definition: Data.cxx:56
LArSamples::PersistentAccessor::m_runTree
TTree * m_runTree
Definition: PersistentAccessor.h:71
LArSamples::Data::gain
CaloGain::CaloGain gain() const
Definition: Data.h:90
LArSamples::PersistentAccessor::m_eventTree
TTree * m_eventTree
Definition: PersistentAccessor.h:71
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
LArSamples::CellInfo
Definition: CellInfo.h:31
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:165
LArSamples::TreeAccessor::filter
static TreeAccessor * filter(const Accessor &accessor, const FilterParams &filterParams, const TString &fileName, const DataTweaker &tweaker)
Definition: TreeAccessor.cxx:292
LArSamples::DataContainer
Definition: DataContainer.h:25
LArSamples::PersistentAccessor::m_runData
RunData * m_runData
Definition: PersistentAccessor.h:75
LArSamples::HistoryContainer
Definition: HistoryContainer.h:29
LArSamples::DataContainer::eventIndex
int eventIndex() const
Definition: DataContainer.h:64
LArSamples::HistoryContainer::add
void add(const DataContainer *data)
append data (takes ownership)
Definition: HistoryContainer.h:46
DeMoScan.first
bool first
Definition: DeMoScan.py:534
generate::GetEntries
double GetEntries(TH1D *h, int ilow, int ihi)
Definition: rmsFrac.cxx:20
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
LArSamples::PersistentAccessor::eventTree
const TTree & eventTree() const
Definition: PersistentAccessor.h:44
LArSamples::AbsLArCells::resetCache
virtual void resetCache() const
Definition: AbsLArCells.cxx:32
xAODRootTest.accessors
dictionary accessors
Definition: xAODRootTest.py:67
LArSamples::PersistentAccessor::addRun
void addRun(RunData *runData)
Definition: PersistentAccessor.cxx:157
LArSamples::TreeAccessor::add
void add(HistoryContainer *cont)
Definition: TreeAccessor.h:69
LArSamples::PersistentAccessor::historyContainer
const HistoryContainer * historyContainer(unsigned int i) const
Definition: PersistentAccessor.cxx:99
LArSamples::Data::eventData
const EventData * eventData() const
Definition: Data.h:100
LArSamples::History::isValid
bool isValid() const
Definition: History.cxx:149
LArSamples::TreeAccessor
Definition: TreeAccessor.h:32
LArSamples::FilterList::size
unsigned int size() const
Definition: FilterList.h:29
LArSamples::PersistentAccessor::merge
static PersistentAccessor * merge(const std::vector< const PersistentAccessor * > &accessors, const TString &fileName)
Definition: PersistentAccessor.cxx:181
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
LArSamples::PersistentAccessor::fileName
TString fileName() const
Definition: PersistentAccessor.cxx:135
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::HistoryContainer::nDataContainers
unsigned int nDataContainers() const
Definition: HistoryContainer.h:40
EventInfoCnvParams::eventIndex
thread_local event_number_t eventIndex
Definition: IEvtIdModifierSvc.h:34