TPCCondData
ExtendedAltroParameters.h
Go to the documentation of this file.
1 /*
2  * ExtendedAltroParameters.h
3  *
4  * Created on: Jul 13, 2012
5  * Author: caiazza
6  */
7 
8 #ifndef EXTENDEDALTROPARAMETERS_H_
9 #define EXTENDEDALTROPARAMETERS_H_
10 
11 //STD
12 #include <iostream>
13 #include <string>
14 
15 //LCIO
16 #include "lcio.h"
17 #include "UTIL/LCFixedObject.h"
18 
19 namespace tpcconddata
20 {
42 static const int EXTENDEDALTROPARSNINT = 16;
43 static const int EXTENDEDALTROPARSNFLOAT = 0;
44 static const int EXTENDEDALTROPARSNDOUBLE = 0;
45 
46 class ExtendedAltroParameters : public lcio::LCFixedObject<EXTENDEDALTROPARSNINT, EXTENDEDALTROPARSNFLOAT ,EXTENDEDALTROPARSNDOUBLE>
47 {
48 public:
53  enum GainSettings {MV12 = 0, MV15 = 1, MV19 = 2, MV27 = 3};
54 
59  enum ShapingSettings {NS30 = 7, NS60 = 3, NS90 = 1, NS120 = 0};
60 
62  {
66  bool Shutdown;
79 
81  PreampEnable(0),
82  Gain(GainSettings(0)),
84  Shutdown(0),
85  ZSThreshold(0),
86  ZSGlitchFilter(0),
87  PreSamples(0),
88  PostSamples(0),
90  RCUAddress(0),
91  RCUFWVersion(0),
92  RCUActiveFECA(0),
93  RCUActiveFECB(0),
97  {
98 
99  }
100  };
101 
105  ExtendedAltroParameters(ExtendedAltroData& Data);
106 
112  ExtendedAltroParameters(EVENT::LCObject* obj);
113 
118 
123  void SetData(ExtendedAltroData& Data);
124 
129  ExtendedAltroData GetData() const;
130 
135  void SetPreampEnable(bool& Enable);
136  void SetGainSettings(GainSettings& Gain);
137  void SetShapingTime(ShapingSettings& ShapingTime);
138  void SetShutdown(bool& Shutdown);
139  void SetZSThreshold(int& Threshold);
140  void SetZSGlitchFilter(int &MinSamples);
141  void SetPreSamples(int& PreSamples);
142  void SetPostSamples(int& PostSamples);
143  void SetPreTriggerSamples(int& PreTriggerSamples);
144  void SetRCUAddress(int& RCUAddress);
145  void SetRCUFWVersion(int& RCUFWVersion);
146  void SetRCUActiveFECA(int& RCUActiveFECA);
147  void SetRCUActiveFECB(int& RCUActiveFECB);
148  void SetRCUConfigRegister1(int& RCUConfigRegister1);
149  void SetRCUConfigRegister2(int& RCUConfigRegister2);
150  void SetRCUStatusErrors(int& RCUStatusErrors);
151 
156  bool GetPreampEnable() const ;
157  GainSettings GetGainSettings() const ;
159  bool GetShutdown() const ;
160  int GetZSThreshold() const ;
161  int GetZSGlitchFilter() const;
162  int GetPreSamples() const ;
163  int GetPostSamples() const ;
164  int GetPreTriggerSamples() const ;
165  int GetRCUAddress() const ;
166  int GetRCUFWVersion() const ;
167  int GetRCUActiveFECA() const ;
168  int GetRCUActiveFECB() const ;
169  int GetRCUConfigRegister1() const ;
170  int GetRCUConfigRegister2() const ;
171  int GetRCUStatusErrors() const ;
172 
177  static std::string getRevision();
178 
183  static std::string getDefaultColName();
184 
189  void print( std::ostream& os = std::cout ) const;
190 
195  const std::string getTypeName() const;
196 
201  const std::string getDataDescription() const;
202 };
203 
210 std::ostream &operator<<(std::ostream &os, const ExtendedAltroParameters &p);
211 
218 bool operator==(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second);
219 bool operator!=(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second);
220 }
221 
222 
223 #endif /* EXTENDEDALTROPARAMETERS_H_ */
void SetPreTriggerSamples(int &PreTriggerSamples)
bool operator==(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second)
Comparison operator that compares 1-1 all the internal data.
bool operator!=(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second)
void SetShapingTime(ShapingSettings &ShapingTime)
static std::string getDefaultColName()
Default name for the collection of this type.
ShapingSettings
Enumerator to store the available settings of the Shaping Time and match them with an human readable ...
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
void SetData(ExtendedAltroData &Data)
Sets all the data at the same time.
void SetRCUConfigRegister2(int &RCUConfigRegister2)
const std::string getDataDescription() const
Defines the data description in the standard condDB format.
void print(std::ostream &os=std::cout) const
Prints a summary of the data.
void SetRCUConfigRegister1(int &RCUConfigRegister1)
ExtendedAltroParameters(ExtendedAltroData &Data)
Convenient constructor to set all the data using the ExtendedAltroData structure to collect the data...
GainSettings
Enumerator to store the available settings of the gain and match them with an human readable name...
void SetPreampEnable(bool &Enable)
Single element setters.
static const int EXTENDEDALTROPARSNINT
Class storing to the condDB additional electronics information specific to the ALTRO electronics Prea...
bool GetPreampEnable() const
Single element Getters.
ExtendedAltroData GetData() const
Retrieves all the data in a single structure.
static std::string getRevision()
Retrieves the version of this condition object.
const std::string getTypeName() const
Defines the type name used for the Condition Database.
static const int EXTENDEDALTROPARSNDOUBLE
static const int EXTENDEDALTROPARSNFLOAT