PPM-DU analysis  2.3
conversion and analysis of the PPM-DU data
 All Classes Files Functions Variables Pages
/home/alex/Work/Research/Km3NeT/PPM-DU/ppm-du-v2.3/dom.h
Go to the documentation of this file.
1 #ifndef _dom_h_
2 #define _dom_h_
3 
4 #include <iostream>
5 #include <vector>
6 
7 #include "pmt.h"
8 #include "domHeader.h"
9 
35 class dom {
36  public:
37 
38  dom() : fDomHeader(), fvPmt() { }
39 
41  const domHeader GetDomHeader() const { return fDomHeader; }
43  void SetDomHeader(const domHeader& eHeader) { fDomHeader = eHeader; }
45  const std::vector<pmt> GetPmtsData() const { return fvPmt; }
47  const bool HasPmtsData() const {
48  if (fvPmt.size() == 0) return false;
49  else return true;
50  }
52  const bool HasPmtData(const int pmtId) {
53  for (unsigned int pmt = 0; pmt < fvPmt.size(); ++pmt)
54  if (fvPmt[pmt].GetPmtId() == pmtId) return true;
55  return false;
56  }
58  void SetPmtsData(const std::vector<pmt> pmts) { fvPmt = pmts; }
60  void ClearPmtsData() { fvPmt.clear(); }
62  const pmt GetPmtData(const int pmtId) const {
63  pmt curPmt(pmtId, 0);
64  for (unsigned int pmt = 0; pmt < fvPmt.size(); ++pmt)
65  if (fvPmt[pmt].GetPmtId() == pmtId) curPmt = fvPmt[pmt];
66  return curPmt;
67  }
68 
69  private:
70  domHeader fDomHeader;
71  std::vector<pmt> fvPmt;
72 };
73 
74 #endif
const domHeader GetDomHeader() const
get the information contained in the header (see domHeader class)
Definition: dom.h:41
organisation of the data - dom level
Definition: dom.h:35
void ClearPmtsData()
clear the dom data
Definition: dom.h:60
const pmt GetPmtData(const int pmtId) const
get only one pmt objects
Definition: dom.h:62
Identify and fill the pmts with data.
Definition: pmt.h:34
void SetPmtsData(const std::vector< pmt > pmts)
set the filled pmts in the dom
Definition: dom.h:58
void SetDomHeader(const domHeader &eHeader)
set the information in the header (see domHeader class)
Definition: dom.h:43
const std::vector< pmt > GetPmtsData() const
get all the pmts objects (in which are the data)
Definition: dom.h:45
const bool HasPmtsData() const
test if dom has data whatever the pmt
Definition: dom.h:47
Fill a dom header from a binary file.
Definition: domHeader.h:30
const bool HasPmtData(const int pmtId)
test if dom has data on a specific pmt
Definition: dom.h:52
dom()
Definition: dom.h:38
const int pmtId
Definition: constants.h:11