|
| | RecompressRawDigits (Parameters const &config) |
| | Constructor; see module documentation for configuration directions. More...
|
| |
| virtual void | produce (art::Event &event) override |
| |
| template<typename PROD , BranchType B = InEvent> |
| ProductID | getProductID (std::string const &instanceName={}) const |
| |
| template<typename PROD , BranchType B> |
| ProductID | getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const |
| |
| bool | modifiesEvent () const |
| |
| template<typename T , BranchType = InEvent> |
| ProductToken< T > | consumes (InputTag const &) |
| |
| template<typename T , art::BranchType BT> |
| art::ProductToken< T > | consumes (InputTag const &it) |
| |
| template<typename T , BranchType = InEvent> |
| void | consumesMany () |
| |
| template<typename Element , BranchType = InEvent> |
| ViewToken< Element > | consumesView (InputTag const &) |
| |
| template<typename T , art::BranchType BT> |
| art::ViewToken< T > | consumesView (InputTag const &it) |
| |
| template<typename T , BranchType = InEvent> |
| ProductToken< T > | mayConsume (InputTag const &) |
| |
| template<typename T , art::BranchType BT> |
| art::ProductToken< T > | mayConsume (InputTag const &it) |
| |
| template<typename T , BranchType = InEvent> |
| void | mayConsumeMany () |
| |
| template<typename Element , BranchType = InEvent> |
| ViewToken< Element > | mayConsumeView (InputTag const &) |
| |
| template<typename T , art::BranchType BT> |
| art::ViewToken< T > | mayConsumeView (InputTag const &it) |
| |
| base_engine_t & | createEngine (seed_t seed) |
| |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make) |
| |
| base_engine_t & | createEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label) |
| |
| seed_t | get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1) |
| |
Writes the input raw::RawDigit with a different compression.
This module writes a collection of raw::RawDigit in a new data product, using the specified compression mode.
Input
A single collection of raw::RawDigit objects.
Output
A single collection of raw::RawDigit objects.
Configuration
- rawDigitLabel (input tag, mandatory): the input tag for the original
raw::RawDigit collection
- compressionType (string, mandatory): the compression mode code (use names as in the enumerator
raw::Compress_t)
- instanceName (string, optional): if specified, the output collection is saved with the specified product instance name (by default, none is used)
Definition at line 69 of file RecompressRawDigits_module.cc.
| raw::Compress_t raw::RecompressRawDigits::parseCompressionType |
( |
std::string |
spec | ) |
|
|
static |
Returns the compression mode corresponding to the specified string.
- Parameters
-
- Returns
- the compression mode spec describes
- Exceptions
-
This method returns the compression type described by the specification. Specification is not case sensitive and can omit the trailing letter k. Therefore, for example to specify kNone all the following specifications are valid: "kNone", "kNONE", "none".
Definition at line 238 of file RecompressRawDigits_module.cc.
References art::errors::Configuration, DEFINE_ART_MODULE, raw::kDynamicDec, raw::kHuffman, raw::kNone, raw::kZeroHuffman, and raw::kZeroSuppression.
Referenced by RecompressRawDigits().
240 std::string SPEC(toupper(spec));
242 if ((SPEC ==
"NONE" ) || (SPEC ==
"KNONE" ))
return raw::kNone ;
243 if ((SPEC ==
"HUFFMAN" ) || (SPEC ==
"KHUFFMAN" ))
return raw::kHuffman ;
245 if ((SPEC ==
"ZEROHUFFMAN" ) || (SPEC ==
"KZEROHUFFMAN" ))
return raw::kZeroHuffman ;
246 if ((SPEC ==
"DYNAMICDEC" ) || (SPEC ==
"KDYNAMICDEC" ))
return raw::kDynamicDec ;
250 <<
"Unrecognized compression type: '" << spec <<
"'\n";
Zero Suppression followed by Huffman Encoding.
Zero Suppression algorithm.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Returns a RawDigit with its waveform compressed in newFormat
- Parameters
-
| digit | RawDigit to be recompressed |
| newFormat | compression format for the returned RawDigit |
| force | run even if input and target compression formats match |
- Returns
RawDigit with the waveform in a new compression format
A copy of RawDigit is always returned, with the waveform stored in the newFormat compression format. If the input RawDigit is already in that format, the waveform is simply copied, unless force is specified true, in which case data is uncompressed and compressed back.
Definition at line 208 of file RecompressRawDigits_module.cc.
References raw::RawDigit::ADCs(), raw::RawDigit::Channel(), raw::Compress(), raw::RawDigit::Compression(), raw::RawDigit::Samples(), and raw::Uncompress().
Referenced by produce(), and RecompressRawDigits().
211 if ((newFormat == digit.Compression()) && !force)
224 ADCs.shrink_to_fit();
Collection of charge vs time digitized from a single readout channel.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
void Compress(std::vector< short > &adc, raw::Compress_t compress)
Compresses a raw data buffer.
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.