ATLAS Offline Software
LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
10 #ifndef LArSamples_DataStore_H
11 #define LArSamples_DataStore_H
12 
13 #include "LArCafJobs/Definitions.h"
15 #include "LArCafJobs/CellInfo.h"
16 #include "LArCafJobs/CaloId.h"
17 
18 #include <vector>
19 #include "AthenaKernel/CLASS_DEF.h"
20 
21 class IdentifierHash;
22 class TH1I;
23 class LArShapeDumper;
24 
25 namespace LArSamples {
26 
27  class D3PDConverter;
28  class DataContainer;
29  class EventData;
30  class RunData;
31 
33 
34  public:
35 
37  DataStore();
38 
40  virtual ~DataStore();
41 
42  const HistoryContainer* historyContainer(unsigned int i) const { return m_cellHistories[i]; }
43  const EventData* eventData(unsigned int i) const { return m_events[i]; }
44  const RunData* runData(unsigned int i) const { return m_runs[i]; }
45 
47  HistoryContainer* makeNewHistory(const IdentifierHash& hash, CellInfo* info);
48  bool addData(const IdentifierHash& hash, DataContainer* data);
49 
50  unsigned int addEvent(EventData* eventData);
51  unsigned int addRun(RunData* eventData);
52 
53  unsigned int nChannels() const { return Definitions::nChannels; }
54  unsigned int size() const;
55  unsigned int nFilledChannels() const;
56  unsigned int nEvents() const { return m_events.size(); }
57  unsigned int nRuns() const { return m_runs.size(); }
58 
59  double footprint() const;
60  bool writeTrees(const char* fileName);
61 
62  friend class ::LArShapeDumper;
63  friend class D3PDConverter;
64 
65  private:
66 
67  HistoryContainer*& hist_cont(unsigned int i) { return m_cellHistories[i]; }
68  EventData*& eventData(unsigned int i) { return m_events[i]; }
69  RunData*& runData(unsigned int i) { return m_runs[i]; }
70 
71  std::vector<HistoryContainer*> m_cellHistories;
72  std::vector<EventData*> m_events;
73  std::vector<RunData*> m_runs;
74  };
75 }
76 
77 #endif
grepfile.info
info
Definition: grepfile.py:38
CaloId.h
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
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
TH1I
Definition: rootspy.cxx:332
LArSamples::DataStore::historyContainer
const HistoryContainer * historyContainer(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:42
LArSamples::D3PDConverter
storage of the time histories of all the cells
Definition: D3PDConverter.h:23
LArSamples::DataStore::runData
const RunData * runData(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:44
LArSamples
Definition: AbsShape.h:24
LArShapeDumper
Definition: LArShapeDumper.h:64
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LArSamples::RunData
Definition: RunData.h:21
LArSamples::DataStore::hist_cont
HistoryContainer *& hist_cont(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:67
LArSamples::DataStore::eventData
EventData *& eventData(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:68
FortranAlgorithmOptions.fileName
fileName
Definition: FortranAlgorithmOptions.py:13
LArSamples::Definitions::nChannels
static const unsigned int nChannels
Definition: Definitions.h:14
LArSamples::DataStore::m_runs
std::vector< RunData * > m_runs
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:73
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArSamples::DataStore::nChannels
unsigned int nChannels() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:53
EventData
Definition: Trigger/TrigAccel/TrigCudaFitter/src/EventData.h:10
LArSamples::DataStore::eventData
const EventData * eventData(unsigned int i) const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:43
LArSamples::DataStore::runData
RunData *& runData(unsigned int i)
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:69
Definitions.h
LArSamples::DataStore::m_events
std::vector< EventData * > m_events
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:72
HistoryContainer.h
LArSamples::DataStore::nEvents
unsigned int nEvents() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:56
LArSamples::DataStore
storage of the time histories of all the cells
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:32
LArSamples::CellInfo
Definition: CellInfo.h:31
LArSamples::DataContainer
Definition: DataContainer.h:25
CaloCondBlobAlgs_fillNoiseFromASCII.hash
dictionary hash
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:109
LArSamples::HistoryContainer
Definition: HistoryContainer.h:29
LArSamples::DataStore::m_cellHistories
std::vector< HistoryContainer * > m_cellHistories
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:71
IdentifierHash
Definition: IdentifierHash.h:38
LArSamples::EventData
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/EventData.h:29
CellInfo.h
CLASS_DEF.h
macros to associate a CLID to a type
LArSamples::DataStore::nRuns
unsigned int nRuns() const
Definition: LArCalorimeter/LArCafJobs/LArCafJobs/DataStore.h:57