HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hmdcrawstruct.h
Go to the documentation of this file.
1 #ifndef HMDCRAWSTRUCT_H
2 #define HMDCRAWSTRUCT_H
3 
4 #include "TNamed.h"
5 #include "TObjArray.h"
6 #include "TArrayI.h"
7 #include "hparset.h"
8 
9 class HParIo;
10 
11 class HMdcRawMothStru: public TNamed {
12 protected:
13  Int_t nTdcs; // number of TDCs on the motherboard
14 public:
17  void setNTdcs(Int_t n) {nTdcs=n;}
18  Int_t getNTdcs() {return nTdcs;}
19  void clear() {
20  nTdcs=0;
21  }
22  ClassDef(HMdcRawMothStru,1) // Tdc level of MdcRawStruct parameter container
23 };
24 
25 
26 class HMdcRawModStru: public TObject {
27 protected:
28  TObjArray* array;
29 public:
30  HMdcRawModStru(Int_t n=16);
33  return *static_cast<HMdcRawMothStru*>((*array)[i]);
34  }
35  Int_t getNMotherboards() {return array->GetEntries();}
36  Int_t getMboIndex(const Text_t*);
37  Int_t getSize() {return array->GetEntries();}
38  ClassDef(HMdcRawModStru,1) // Motherboard level of MdcRawStruct parameter container
39 };
40 
41 
42 class HMdcRawSecStru: public TObject {
43 protected:
44  TObjArray* array;
45 public:
46  HMdcRawSecStru(Int_t n=4);
49  return *static_cast<HMdcRawModStru*>((*array)[i]);
50  }
51  Int_t getSize() {return array->GetEntries();}
52  ClassDef(HMdcRawSecStru,1) // Sector level of MdcRawStruct parameter container
53 };
54 
55 
56 class HMdcRawStruct : public HParSet {
57 protected:
58  TObjArray* array; // array of pointers
59 public:
60  HMdcRawStruct(const Char_t* name="MdcRawStruct",
61  const Char_t* title="Mdc parameters for hardware structure",
62  const Char_t* context="",
63  Int_t n=6);
66  return *static_cast<HMdcRawSecStru*>((*array)[i]);
67  }
68  Bool_t init(HParIo* input,Int_t* set);
69  Int_t write(HParIo* output);
70  void readline(const Char_t*, Int_t*);
71  Bool_t writeline(Char_t *, Int_t, Int_t, Int_t);
72  void putAsciiHeader(TString&);
73  Int_t getSize() {return array->GetEntries();}
74  void clear();
75  void printParam();
76  void getMaxIndices(TArrayI*);
77  ClassDef(HMdcRawStruct,1) // MdcRawStruct parameter container for number of TDCs
78 };
79 
80 #endif /* !HMDCRAWSTRUCT_H */
81 
82 
83 
84 
85 
86 
87 
void putAsciiHeader(TString &)
void getMaxIndices(TArrayI *)
Int_t n
Int_t getMboIndex(const Text_t *)
TObjArray * array
Definition: hmdcrawstruct.h:44
Definition: hpario.h:11
Bool_t writeline(Char_t *, Int_t, Int_t, Int_t)
virtual Int_t write()
Definition: hparset.cc:119
void setNTdcs(Int_t n)
Definition: hmdcrawstruct.h:17
TString input
Definition: GarReader.C:5
HMdcRawSecStru & operator[](Int_t i)
Definition: hmdcrawstruct.h:65
Int_t getNMotherboards()
Definition: hmdcrawstruct.h:35
void readline(const Char_t *, Int_t *)
Definition: hparset.h:9
TObjArray * array
Definition: hmdcrawstruct.h:58
TObjArray * array
Definition: hmdcrawstruct.h:28
return output
HMdcRawMothStru & operator[](Int_t i)
Definition: hmdcrawstruct.h:32
HMdcRawSecStru(Int_t n=4)
HMdcRawStruct(const Char_t *name="MdcRawStruct", const Char_t *title="Mdc parameters for hardware structure", const Char_t *context="", Int_t n=6)
Int_t getSize()
Definition: hmdcrawstruct.h:73
HMdcRawModStru & operator[](Int_t i)
Definition: hmdcrawstruct.h:48
HMdcRawModStru(Int_t n=16)
virtual Bool_t init(void)
Definition: hparset.h:21