82 obj()->setIntVal(0, Enable);
88 obj()->setIntVal(1, Gain);
94 obj()->setIntVal(2, ShapingTime);
100 obj()->setIntVal(3, Shutdown);
108 std::stringstream message;
109 message <<
"The Zero Suppression Threshold for the ALTRO electronics has to be between "
110 <<
"0 and 1023 and is being set at " << Threshold << std::endl;
114 obj()->setIntVal(4, Threshold);
120 if( (MinSamples < 0) | (MinSamples > 3))
122 std::stringstream message;
123 message <<
"The Glith Filter minimum samples for the ALTRO electronics has to be between "
124 <<
"0 and 3 and is being set at " << MinSamples << std::endl;
128 obj()->setIntVal(5, MinSamples);
134 if( (PreSamples < 0) | (PreSamples > 3) )
136 std::stringstream message;
137 message <<
"The Number of PreSamples for the ALTRO electronics has to be between "
138 <<
"0 and 3 and is being set at " << PreSamples << std::endl;
142 obj()->setIntVal(6, PreSamples);
148 if( (PostSamples < 0) | (PostSamples > 7) )
150 std::stringstream message;
151 message <<
"The Number of PostSamples for the ALTRO electronics has to be between "
152 <<
"0 and 7 and is being set at " << PostSamples << std::endl;
156 obj()->setIntVal(7, PostSamples);
162 if( (PreTriggerSamples < 0) | (PreTriggerSamples > 15) )
164 std::stringstream message;
165 message <<
"The Number of PostSamples for the ALTRO electronics has to be between "
166 <<
"0 and 15 and is being set at " << PreTriggerSamples << std::endl;
170 obj()->setIntVal(8, PreTriggerSamples);
176 obj()->setIntVal(9, RCUAddress);
182 obj()->setIntVal(10, RCUFWVersion);
188 obj()->setIntVal(11, RCUActiveFECA);
194 obj()->setIntVal(12, RCUActiveFECB);
200 obj()->setIntVal(13, RCUConfigRegister1);
206 obj()->setIntVal(14, RCUConfigRegister2);
212 obj()->setIntVal(15, RCUStatusErrors);
218 return static_cast<bool>(getIntVal(0));
236 return static_cast<bool>(getIntVal(3));
278 return getIntVal(10);
284 return getIntVal(11);
290 return getIntVal(12);
296 return getIntVal(13);
302 return getIntVal(14);
308 return getIntVal(15);
314 return std::string(
"$Rev: 3117 $");
320 return std::string(
"ExtendedAltroElectronicsParameters");
326 std::streamsize PrecisionBefore = os.precision();
327 std::streamsize WidthBefore = os.width();
329 os.setf(std::ios_base::fixed);
330 os <<
"Extended Electronics Parameters: " << std::endl
340 os.precision( PrecisionBefore );
341 os.width( WidthBefore );
347 return std::string(
"ExtendedAltroParameters");
353 std::string Description =
"i:PreampEnable,Gain,ShapingTime,Shutdown,ZSThreshold,PreSamples,";
354 Description +=
"PostSamples,PreTriggerSamples,RCUAddress,RCUFWVersion,RCUActiveFECA,";
355 Description +=
"RCUActiveFECB,RCUConfigRegister1,RCUConfigRegister2,RCUStatusErrors";
387 return !(first == second);
void SetPreTriggerSamples(int &PreTriggerSamples)
void SetRCUStatusErrors(int &RCUStatusErrors)
int GetZSGlitchFilter() const
int GetRCUFWVersion() const
bool operator==(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second)
Comparison operator that compares 1-1 all the internal data.
int GetRCUConfigRegister1() const
bool operator!=(const ExtendedAltroParameters &first, const ExtendedAltroParameters &second)
ShapingSettings ShapingTime
int GetRCUConfigRegister2() const
int GetRCUAddress() const
void SetRCUFWVersion(int &RCUFWVersion)
void SetShapingTime(ShapingSettings &ShapingTime)
static std::string getDefaultColName()
Default name for the collection of this type.
void SetGainSettings(GainSettings &Gain)
ShapingSettings
Enumerator to store the available settings of the Shaping Time and match them with an human readable ...
void SetRCUAddress(int &RCUAddress)
~ExtendedAltroParameters()
Destructor.
int GetPreSamples() const
void SetRCUActiveFECA(int &RCUActiveFECA)
int GetRCUActiveFECA() const
void SetZSThreshold(int &Threshold)
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
int GetZSThreshold() const
Base exception for error involving some data having an invalid value.
void SetRCUActiveFECB(int &RCUActiveFECB)
void SetZSGlitchFilter(int &MinSamples)
void SetData(ExtendedAltroData &Data)
Sets all the data at the same time.
void SetRCUConfigRegister2(int &RCUConfigRegister2)
void SetPreSamples(int &PreSamples)
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)
int GetPreTriggerSamples() const
GainSettings GetGainSettings() const
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.
int GetPostSamples() const
static const int EXTENDEDALTROPARSNINT
Class storing to the condDB additional electronics information specific to the ALTRO electronics Prea...
bool GetPreampEnable() const
Single element Getters.
void SetPostSamples(int &PostSamples)
ExtendedAltroData GetData() const
Retrieves all the data in a single structure.
static std::string getRevision()
Retrieves the version of this condition object.
ShapingSettings GetShapingTime() const
int GetRCUActiveFECB() const
const std::string getTypeName() const
Defines the type name used for the Condition Database.
static const int EXTENDEDALTROPARSNDOUBLE
int GetRCUStatusErrors() const
static const int EXTENDEDALTROPARSNFLOAT
void SetShutdown(bool &Shutdown)