1 #ifndef PedestalCalculator_h
2 #define PedestalCalculator_h 1
14 #include "marlin/Processor.h"
21 #include <lccd/DBInterface.hh>
79 virtual void check( lcio::LCEvent * evt ) ;
155 thisChannelPedestalCollection);
159 thisChannelPedestalCollection);
163 thisChannelPedestalCollection);
206 lcio::long64 _validFromInt;
207 lcio::long64 _validTillInt;
208 lcio::long64 _lastSinceTime;
209 lcio::long64 _lastEventTime;
213 void writePedestals();
216 int _writingIteration;
217 std::string _detectorName;
218 std::string _folderName;
219 IMPL::LCCollectionVec* _outputCollection;
std::string _simpleFileName
Name of the simple file where the pedestal collection should be stored (optional) ...
Definition: PedestalCalculator.h:177
virtual void processEvent(lcio::LCEvent *evt)
Called for every event - the working horse.
Definition: PedestalCalculator.cc:162
virtual void processRunHeader(lcio::LCRunHeader *run)
Called for every run.
Definition: PedestalCalculator.cc:136
int ReadoutGroup
Hardware readout Group ID.
Definition: PedestalCalculator.h:108
int ChannelID
Hardware channel ID.
Definition: PedestalCalculator.h:106
PedestalMap_t * _PedestalMap
Map to store the pedestals internally during the calculation.
Definition: PedestalCalculator.h:132
virtual void calcAverage(ChannelPedestal *thisChannelPedestal)
Calculates average of pedestals of different events of a channel.
Definition: PedestalCalculator.cc:355
PedestalVector_t * PedestalCol
Vector to store calculated pedestal information in StcPedestal structs (contains value and width)...
Definition: PedestalCalculator.h:113
int _writeEveryNEvents
Calculate and write the calculated pedestals after this number of events.
Definition: PedestalCalculator.h:185
float _initCalcWidth
Start value for the pedestal width for the calculation.
Definition: PedestalCalculator.h:195
virtual void CreatePedestalCollection(PedestalMap_t *thisChannelPedestalCollection)
Creates an LCCollectionVector of Pedestals and fills it with the calculated pedestals.
Definition: PedestalCalculator.cc:409
std::pair< int, int > _ChannelPair
Channel identifier, pair of two integers (first one for the pad and second one for the readout group)...
Definition: PedestalCalculator.h:135
virtual void printPedestalShort(PedestalMap_t *thisChannelPedestalCollection)
Writes a summery of the pedestals to the std output.
Definition: PedestalCalculator.cc:481
StcPedestal * Average
Average of the PedestalCol vector.
Definition: PedestalCalculator.h:115
double _signalThreshold
Data time slice is considered a signal during calculation iteration, if is bigger than signalThreshol...
Definition: PedestalCalculator.h:199
virtual void printPedestal(PedestalMap_t *thisChannelPedestalCollection)
Write the pedestal to the std output.
Definition: PedestalCalculator.cc:456
Calculates the pedestals out of raw data.
Definition: PedestalCalculator.h:53
int _calculationIterations
How many times the calculation iterates over the raw data vector.
Definition: PedestalCalculator.h:191
std::map< std::pair< int, int >, ChannelPedestal * > PedestalMap_t
Typedef: Map to store the pedestal data during calculation.
Definition: PedestalCalculator.h:128
std::string _pedestalColName
Name of the pedestal collection.
Definition: PedestalCalculator.h:175
StcPedestal * AverageError
Average error of the PedestalCol vector.
Definition: PedestalCalculator.h:117
float Mean
Pedestal Value.
Definition: PedestalCalculator.h:91
float Width
Pedestal Width.
Definition: PedestalCalculator.h:93
bool _makeRunNumberFolder
parameter if sub-folder named by run number should be automatically added to the database folder ...
Definition: PedestalCalculator.h:201
virtual void makeLCCDData()
Converts the pedestal information to Pedestal objects and stores them into an LCCollection Vector...
Definition: PedestalCalculator.cc:429
std::string _validFrom
Time from when the calculated pedestals will be valid (is stored in the database).
Definition: PedestalCalculator.h:187
double _precision
Precision of pedestal calculation.
Definition: PedestalCalculator.h:197
virtual void init()
Called at the begin of the job before anything is read.
Definition: PedestalCalculator.cc:118
Structure to store the pedestal of a channel and other needed informations during internal calculatio...
Definition: PedestalCalculator.h:103
int _ignoreSurrounding
time slices before and after the currend slice must not be a signal.
Definition: PedestalCalculator.h:193
std::string _validTill
Time till when the calculated pedestals will be valid (is stored in the database).
Definition: PedestalCalculator.h:189
std::string _conditionsTag
Tag of the conditions data that should be stored.
Definition: PedestalCalculator.h:183
StcPedestal * calcPedestal(FloatVec *Data)
Claculates the pedestal mean and width from raw data.
Definition: PedestalCalculator.cc:261
std::string _dbFolder
Name of the folder, where the pedestal collection should be stored in the database (optional) ...
Definition: PedestalCalculator.h:179
std::string _dbInitString
DBInit String (optional, can also be provided by evironment varibale)
Definition: PedestalCalculator.h:181
std::string _inputColName
Name of the input collection.
Definition: PedestalCalculator.h:173
FloatVec * Data
Vector of raw ADC data.
Definition: PedestalCalculator.h:110
Structure to store pedestal value and width.
Definition: PedestalCalculator.h:88
std::vector< StcPedestal * > PedestalVector_t
Typedef: vector to store pedestal data.
Definition: PedestalCalculator.h:100
virtual void end()
Called after data processing for clean up.
Definition: PedestalCalculator.cc:250