ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArCafJobs
LArCafJobs
PersistentAccessor.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
9
10
#ifndef LArSamples_PersistentAccessor_H
11
#define LArSamples_PersistentAccessor_H
12
13
#include "
LArCafJobs/CellInfo.h
"
14
#include "
LArCafJobs/HistoryContainer.h
"
15
#include "
LArCafJobs/EventData.h
"
16
#include "
LArCafJobs/RunData.h
"
17
#include "TString.h"
18
#include "TTree.h"
19
20
class
TFile;
21
22
namespace
LArSamples
{
23
24
class
ATLAS_NOT_THREAD_SAFE
PersistentAccessor
{
25
26
public
:
27
29
PersistentAccessor
(TTree&
cellTree
, TTree&
SCTree
, TTree&
eventTree
, TTree*
runTree
, TFile*
file
);
30
PersistentAccessor
(
const
TString&
fileName
);
31
32
PersistentAccessor
(
const
PersistentAccessor
&);
33
PersistentAccessor
&
operator=
(
const
PersistentAccessor
&);
34
35
static
PersistentAccessor
*
open
(
const
TString&
fileName
);
36
37
virtual
~PersistentAccessor
();
38
39
unsigned
int
historySize
(
unsigned
int
i)
const
;
40
unsigned
int
historySizeSC
(
unsigned
int
i)
const
;
41
42
bool
save
()
const
;
43
44
const
TTree&
cellTree
()
const
{
return
*
m_cellTree
; }
45
const
TTree&
SCTree
()
const
{
return
*
m_SCTree
; }
46
const
TTree&
eventTree
()
const
{
return
*
m_eventTree
; }
47
const
TTree&
runTree
()
const
{
return
*
m_runTree
; }
48
49
TFile*
file
()
const
{
return
m_file
; }
50
TString fileName()
const
;
51
52
const
HistoryContainer
* historyContainer(
unsigned
int
i)
const
;
53
const
HistoryContainer
* historyContainerSC(
unsigned
int
i)
const
;
54
55
unsigned
int
nEvents
()
const
{
return
m_eventTree
->GetEntries(); }
56
const
EventData
* eventData(
unsigned
int
i)
const
;
57
58
unsigned
int
nRuns
()
const
{
return
m_runTree
->GetEntries(); }
59
const
RunData
* runData(
unsigned
int
i)
const
;
60
61
void
add
(
HistoryContainer
* cont);
62
void
addSC(
HistoryContainer
* cont);
63
void
addEvent(
EventData
* eventData);
64
void
addRun(
RunData
* runData);
65
66
HistoryContainer
*
currentContainer
()
const
{
return
m_historyCont
; }
67
HistoryContainer
*
currentContainerSC
()
const
{
return
m_historyContSC
; }
68
69
static
PersistentAccessor
*
merge
(
const
std::vector<const PersistentAccessor*>& accessors,
const
TString& fileName);
70
static
PersistentAccessor
*
merge
(
const
std::vector<TString>& inputFiles,
const
TString& fileName);
71
72
int
getCellEntry
(
unsigned
int
i)
const
{
return
m_cellTree
->GetEntry(i); }
73
int
getSCEntry
(
unsigned
int
i)
const
{
return
m_SCTree
->GetEntry(i); }
74
75
private
:
76
77
TTree*
m_cellTree
, *
m_SCTree
, *
m_eventTree
, *
m_runTree
;
78
mutable
TFile*
m_file
;
79
mutable
HistoryContainer
*
m_historyCont
;
80
mutable
HistoryContainer
*
m_historyContSC
;
81
mutable
EventData
*
m_eventData
;
82
mutable
RunData
*
m_runData
;
83
mutable
std::map<unsigned int, const RunData*>
m_runCache
;
84
};
85
}
86
87
#endif
operator=
ElementLink & operator=(const ElementLink &)=default
CellInfo.h
EventData.h
HistoryContainer.h
RunData.h
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition
checker_macros.h:212
LArSamples::EventData
Definition
EventData.h:29
LArSamples::HistoryContainer
Definition
HistoryContainer.h:29
LArSamples::PersistentAccessor
Definition
PersistentAccessor.h:24
LArSamples::PersistentAccessor::currentContainer
HistoryContainer * currentContainer() const
Definition
PersistentAccessor.h:66
LArSamples::PersistentAccessor::m_eventTree
TTree * m_eventTree
Definition
PersistentAccessor.h:77
LArSamples::PersistentAccessor::cellTree
const TTree & cellTree() const
Definition
PersistentAccessor.h:44
LArSamples::PersistentAccessor::PersistentAccessor
PersistentAccessor(const PersistentAccessor &)
LArSamples::PersistentAccessor::nRuns
unsigned int nRuns() const
Definition
PersistentAccessor.h:58
LArSamples::PersistentAccessor::save
bool save() const
Definition
PersistentAccessor.cxx:191
LArSamples::PersistentAccessor::historySizeSC
unsigned int historySizeSC(unsigned int i) const
Definition
PersistentAccessor.cxx:125
LArSamples::PersistentAccessor::m_file
TFile * m_file
Definition
PersistentAccessor.h:78
LArSamples::PersistentAccessor::open
static PersistentAccessor * open(const TString &fileName)
Definition
PersistentAccessor.cxx:68
LArSamples::PersistentAccessor::fileName
TString fileName() const
Definition
PersistentAccessor.cxx:154
LArSamples::PersistentAccessor::m_eventData
EventData * m_eventData
Definition
PersistentAccessor.h:81
LArSamples::PersistentAccessor::SCTree
const TTree & SCTree() const
Definition
PersistentAccessor.h:45
LArSamples::PersistentAccessor::m_historyCont
HistoryContainer * m_historyCont
Definition
PersistentAccessor.h:79
LArSamples::PersistentAccessor::eventTree
const TTree & eventTree() const
Definition
PersistentAccessor.h:46
LArSamples::PersistentAccessor::historySize
unsigned int historySize(unsigned int i) const
Definition
PersistentAccessor.cxx:119
LArSamples::PersistentAccessor::m_SCTree
TTree * m_SCTree
Definition
PersistentAccessor.h:77
LArSamples::PersistentAccessor::m_runCache
std::map< unsigned int, const RunData * > m_runCache
Definition
PersistentAccessor.h:83
LArSamples::PersistentAccessor::currentContainerSC
HistoryContainer * currentContainerSC() const
Definition
PersistentAccessor.h:67
LArSamples::PersistentAccessor::m_runData
RunData * m_runData
Definition
PersistentAccessor.h:82
LArSamples::PersistentAccessor::getCellEntry
int getCellEntry(unsigned int i) const
Definition
PersistentAccessor.h:72
LArSamples::PersistentAccessor::m_historyContSC
HistoryContainer * m_historyContSC
Definition
PersistentAccessor.h:80
LArSamples::PersistentAccessor::m_runTree
TTree * m_runTree
Definition
PersistentAccessor.h:77
LArSamples::PersistentAccessor::file
TFile * file() const
Definition
PersistentAccessor.h:49
LArSamples::PersistentAccessor::nEvents
unsigned int nEvents() const
Definition
PersistentAccessor.h:55
LArSamples::PersistentAccessor::runTree
const TTree & runTree() const
Definition
PersistentAccessor.h:47
LArSamples::PersistentAccessor::PersistentAccessor
PersistentAccessor(TTree &cellTree, TTree &SCTree, TTree &eventTree, TTree *runTree, TFile *file)
Constructor.
Definition
PersistentAccessor.cxx:26
LArSamples::PersistentAccessor::getSCEntry
int getSCEntry(unsigned int i) const
Definition
PersistentAccessor.h:73
LArSamples::PersistentAccessor::m_cellTree
TTree * m_cellTree
Definition
PersistentAccessor.h:77
LArSamples::RunData
Definition
RunData.h:21
add
bool add(const std::string &hname, TKey *tobj)
Definition
fastadd.cxx:55
LArSamples
Definition
AbsShape.h:24
merge
Definition
merge.py:1
Generated on
for ATLAS Offline Software by
1.17.0