@@ -36,7 +36,6 @@ class TRestDetectorReadout : public TRestMetadata {
36
36
37
37
void Initialize () override ;
38
38
39
- Int_t fNReadoutPlanes ; // /< Number of readout planes present on the readout
40
39
std::vector<TRestDetectorReadoutPlane>
41
40
fReadoutPlanes ; // /< A std::vector storing the TRestDetectorReadoutPlane definitions.
42
41
@@ -45,32 +44,42 @@ class TRestDetectorReadout : public TRestMetadata {
45
44
std::vector<TRestDetectorReadoutModule> fModuleDefinitions ; // !///< A std::vector storing the different
46
45
// ! TRestDetectorReadoutModule definitions.
47
46
48
- void ValidateReadout ();
47
+ void ValidateReadout () const ;
49
48
50
49
public:
51
50
TRestDetectorReadoutPlane& operator [](int p) { return fReadoutPlanes [p]; }
52
51
53
52
TRestDetectorReadoutPlane* GetReadoutPlane (int p);
54
- void AddReadoutPlane (TRestDetectorReadoutPlane plane);
53
+ void AddReadoutPlane (const TRestDetectorReadoutPlane& plane);
55
54
56
55
// ///////////////////////////////////
57
56
TRestDetectorReadoutPlane* GetReadoutPlaneWithID (int id);
58
57
TRestDetectorReadoutModule* GetReadoutModuleWithID (int id);
59
58
TRestDetectorReadoutChannel* GetReadoutChannelWithDaqID (int daqId);
60
59
// ///////////////////////////////////
61
60
62
- Int_t GetNumberOfReadoutPlanes ();
61
+ Int_t GetNumberOfReadoutPlanes () const { return fReadoutPlanes . size (); }
63
62
Int_t GetNumberOfModules ();
64
63
Int_t GetNumberOfChannels ();
65
64
66
- Int_t GetModuleDefinitionId (TString name);
65
+ Int_t GetModuleDefinitionId (const TString& name);
67
66
68
67
// ///////////////////////////////////
69
68
TRestDetectorReadoutModule* ParseModuleDefinition (TiXmlElement* moduleDefinition);
70
69
void GetPlaneModuleChannel (Int_t daqID, Int_t& planeID, Int_t& moduleID, Int_t& channelID);
71
70
Int_t GetHitsDaqChannel (const TVector3& position, Int_t& planeID, Int_t& moduleID, Int_t& channelID);
72
- Int_t GetHitsDaqChannelAtReadoutPlane (const TVector3& hitPosition, Int_t& moduleID, Int_t& channelID,
73
- Int_t planeId = 0 );
71
+
72
+ // / Returns a tuple with the DaqID, ModuleID, ChannelID
73
+ std::tuple<Int_t, Int_t, Int_t> GetHitsDaqChannelAtReadoutPlane (const TVector3& position,
74
+ Int_t planeId = 0 );
75
+
76
+ // / \brief Returns the DaqID of the channel for position. If no channel is found returns -1
77
+ Int_t GetDaqId (const TVector3& position, bool check = true );
78
+
79
+ std::string GetTypeForChannelDaqId (Int_t daqId);
80
+
81
+ std::set<Int_t> GetAllDaqIds ();
82
+
74
83
Double_t GetX (Int_t signalID);
75
84
Double_t GetY (Int_t signalID);
76
85
// ///////////////////////////////////
@@ -94,10 +103,10 @@ class TRestDetectorReadout : public TRestMetadata {
94
103
// Constructor
95
104
TRestDetectorReadout ();
96
105
explicit TRestDetectorReadout (const char * configFilename);
97
- TRestDetectorReadout (const char * configFilename, std::string name);
106
+ TRestDetectorReadout (const char * configFilename, const std::string& name);
98
107
// Destructor
99
108
~TRestDetectorReadout () override ;
100
109
101
- ClassDefOverride (TRestDetectorReadout, 2 );
110
+ ClassDefOverride (TRestDetectorReadout, 3 );
102
111
};
103
112
#endif
0 commit comments