37 cout <<
"Processing " <<
fChain->GetEntries() <<
" entries" << endl;
38 for (
long long i = 0; i <
fChain->GetEntries(); i++) {
39 if (i % 500 == 0) cout <<
"Processing Entry " << i << endl;
49 unsigned int eventIndex = samples->
addEvent(eventData);
55 unsigned int hash =
m_id2hash[(*cc_sel_IdCells)[j]];
57 cout <<
"ERROR: skipping cell with offline ID = " << (*cc_sel_IdCells)[j] << endl;
76 templateInfo->
iEta(), templateInfo->
iPhi(),
78 nullptr,
nullptr,
nullptr, templateInfo->
position(), templateInfo->
onlid());
85 std::vector<short> samples;
86 if (digitIndex >= 0) {
88 std::vector<int> intSamples = (*lardigit_Samples)[digitIndex];
89 for (
int s : intSamples) {
90 samples.push_back((
short)s);
112 cout <<
"Making online->hash map" << endl;
113 std::map<unsigned long long, unsigned int> on2hash;
114 for (
unsigned int i = 0; i <
m_template->nChannels(); i++) {
117 on2hash[info->onlid()] = i;
120 cout <<
"Making offlineID->hash map" << endl;
121 for (
unsigned int i = 0; i < translator.
Tree()->
GetEntries(); i++) {
122 translator.
Tree()->GetEntry(i);
char data[hepevt_bytes_allocation_ATLAS]
static const std::string outputFileName
TGraphErrors * GetEntries(TH2F *histo)
vector< unsigned int > * lardigit_offlineId
vector< float > * cc_sel_TimeCells
vector< int > * cc_sel_BadCells
vector< unsigned int > * cc_sel_IdCells
UInt_t RunNumber
current Tree number in a TChain
vector< int > * cc_sel_DetCells
CaloD3PDClass(TTree *tree=0)
vector< int > * cc_sel_QCells
vector< float > * cc_sel_E
vector< float > * cc_sel_Sigma
vector< int > * lardigit_gain
This is a "hash" representation of an Identifier.
TVector3 position() const
short feedThrough() const
bool initMapping(const TString &templateFile, const TString &translatorFile)
std::unique_ptr< Interface > m_template
bool makeSamplesTuple(const TString &outputFileName)
D3PDConverter(TTree &tree, const TString &templateFile, const TString &translatorFile)
Constructor.
std::map< unsigned int, unsigned int > m_id2hash
storage of the time histories of all the cells
HistoryContainer * makeNewHistory(const IdentifierHash &hash, CellInfo *info)
append data (takes ownership of everything)
unsigned int addEvent(EventData *eventData)
HistoryContainer *& hist_cont(unsigned int i)
unsigned int addRun(RunData *eventData)
bool writeTrees(const char *fileName)
void setRunData(const RunData *runData)
void add(const DataContainer *data)
append data (takes ownership)
CellInfo * cell_info() const
static std::unique_ptr< Interface > open(const TString &fileName)