ATLAS Offline Software
Loading...
Searching...
No Matches
TreeAccessor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
9
10#ifndef LArSamples_TreeAccessor_H
11#define LArSamples_TreeAccessor_H
12
15#include "LArCafJobs/CellInfo.h"
17#include "TString.h"
18#include "TTree.h"
21
22class TFile;
23
24namespace LArSamples {
25
26 class Data;
27 class FilterParams;
28 class DataTweaker;
29 class EventData;
30 class RunData;
31
33
34 public:
35
37 TreeAccessor(TTree& cellTree, TTree& scTree, TTree& eventTree, TTree* runTree, TFile* file)
39
41
42 static std::unique_ptr<TreeAccessor> open(const TString& fileName);
43
44 virtual ~TreeAccessor() { resetCache(); }
45
46 static std::unique_ptr<TreeAccessor> merge(const std::vector<const Accessor*>& accessors,const TString& fileName = "");
47 static std::unique_ptr<TreeAccessor> merge(const std::vector<const Accessor*>& accessors,const TString& fileName,const TString& LBFile);
48 static std::unique_ptr<TreeAccessor>
49 filter(const Accessor& accessor,
50 const FilterParams& filterParams,
51 const TString& fileName, const DataTweaker& tweaker);
52
53 static std::vector<std::unique_ptr<TreeAccessor> >
54 filter(const Accessor& accessor,
55 const FilterList& filterList, const DataTweaker& tweaker);
56
57 friend class Interface;
58
59 static std::unique_ptr<TreeAccessor> makeTemplate(const Accessor& accessor, const TString& fileName);
60
61 bool writeToFile(const TString& fileName) const;
62
63 unsigned int historySize(unsigned int i) const { return PersistentAccessor::historySize(i); }
64 unsigned int historySizeSC(unsigned int i) const { return PersistentAccessor::historySizeSC(i); }
65
66 unsigned int nEvents() const { return PersistentAccessor::nEvents(); }
67 const EventData* eventData(unsigned int i) const { return PersistentAccessor::eventData(i); }
68
69 unsigned int nRuns() const { return PersistentAccessor::nRuns(); }
70 const RunData* runData(unsigned int i) const { return PersistentAccessor::runData(i); }
71
73
74
75 const History* getCellHistory(unsigned int i) const;
76 const History* getSCHistory(unsigned int i) const;
77 const CellInfo* getCellInfo(unsigned int i) const;
78 const CellInfo* getSCInfo(unsigned int i) const;
79
80 };
81}
82
83#endif
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
virtual void resetCache() const
const RunData * runData(unsigned int i) const
unsigned int historySizeSC(unsigned int i) const
void add(HistoryContainer *cont)
unsigned int historySize(unsigned int i) const
PersistentAccessor(TTree &cellTree, TTree &SCTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor.
const EventData * eventData(unsigned int i) const
const EventData * eventData(unsigned int i) const
bool writeToFile(const TString &fileName) const
unsigned int historySize(unsigned int i) const
TreeAccessor(TTree &cellTree, TTree &scTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor.
const RunData * runData(unsigned int i) const
static std::unique_ptr< TreeAccessor > makeTemplate(const Accessor &accessor, const TString &fileName)
unsigned int nEvents() const
void add(HistoryContainer *cont)
unsigned int nRuns() const
unsigned int historySizeSC(unsigned int i) const
TreeAccessor(const TString &fileName)
Definition merge.py:1