er  dev
ERDigitizer.h
1 /********************************************************************************
2  * Copyright (C) Joint Institute for Nuclear Research *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 
10 #ifndef ERDigitizer_H
11 #define ERDigitizer_H
12 
13 #include <vector>
14 
15 #include "TClonesArray.h"
16 #include "TString.h"
17 
18 #include "ERTask.h"
19 #include "ERDigi.h"
20 
22 {
24  ERDigitizerError(Float_t ea, Float_t eb, Float_t ec){
25  a = ea;
26  b = eb;
27  c = ec;
28  }
29  Float_t a;
30  Float_t b;
31  Float_t c;
32 };
33 
34 struct ERTrigger
35 {
36  Int_t fValue;
37  Int_t fPriority;
38  ERTrigger(){}
39  ERTrigger(Int_t value, Int_t priority){
40  fValue = value;
41  fPriority = priority;
42  }
43 };
44 
45 class ERDigitizer : public ERTask {
46 
47 public:
49  ERDigitizer();
50 
52  ERDigitizer(TString name);
53 
57  ERDigitizer(TString name, Int_t verbose);
58 
60  ~ERDigitizer();
61 
63  virtual InitStatus Init();
64 
66  virtual void Exec(Option_t* opt);
67 
69  virtual void Finish();
70 
72  virtual void Reset();
73 
74  void AddError(TString volName,Float_t a, Float_t b, Float_t c);
75 
76  void AddTrigger(TString stationSID, Int_t value, Int_t priority);
77  void ApplyTrigger(TString stationSID, TClonesArray* digiCollection);
78 
79 protected:
80  std::map<TString, ERTrigger> fTriggers;
81 
82 protected:
83  ERDigi* AddDigi(TClonesArray* digi);
84 
85 private:
86  std::map<TString,TClonesArray*> fSenVolDigis;
87  std::map<TString,TClonesArray*> fSenVolPoints;
88  std::map<TString,ERDigitizerError> fSenVolErrors;
89  Float_t fEdep;
90  Float_t fTime;
91  Int_t fVolNb;
92 
93  ClassDef(ERDigitizer,1)
94 };
95 
96 #endif
Definition: ERDigi.h:15
Base abstract class for all tasks in er.
Definition: ERTask.h:27