AdvancedAltroConverter
The AdvancedAltroConverter is a standalone program distributed with MarlinTPC in /bin/AdvancedAltroConverter. The source code is located in tools/DataConversionUtils/. This utility converts raw data taken with the ALTRO electronics into lcio format containing a collection of TrackerRawData. After taking the raw data this is the first step in the reconstruction chain. The AdvancedAltroConverter also fills electronics information and the channel mapping into the database according to the timestamp of the run start and run end.
More information is available by calling the program without any option.
Documentation of the different DAQ versions of the Altro eletronics:
* Version 4.2 to 4.5: dataformat-v4.2-4.5.pdf
* Version 4.6: dataformat-v4.6.pdf
* Version 4.7: dataformat-v4.7.pdf
Examples
Simple call, no database, no channelmapping
AdvancedAltroConverter -I raw/readout-17946_0.dat -O LCIOrawdata/readout-17946.slcio
Call used for test beam with Desy module in September 2012
AdvancedAltroConverter |
-I /scratch/TB2012/raw/readout-17946_0.dat |
|
-O /scratch/TB2012/LCIOrawdata/readout-17946.slcio |
|
-C AltroRawData |
|
-N LPTPC |
|
-T Test_beam_run |
|
-D lctpcconddb01.desy.de:lctpc:lctpcwriter:cptw123W |
|
-G /LP1/T24_1/DESY/Grid_GEM_Module_V.2/ADCElectronicsParameters |
|
-E /LP1/T24_1/DESY/Grid_GEM_Module_V.2/AltroExtElectronicsParameters |
|
-M /scratch/TB2012/ChannelMapping.slcio |
|
-m /LP1/T24_1/DESY/Grid_GEM_Module_V.2/channelmapping |
|
-R |
|
-P /scratch/TB2012/pedstore/pedestals-0-17946.ldat |
|
-P /scratch/TB2012/pedstore/pedestals-1-17946.ldat |
Description
- This program converts altro raw data to LCIO data in the slcio format and feeds the relevant data for the first steps of the reconstruction to the condition database. This data are the Electronics data, the Pedestals and the channel mappings. The minimal requirement of the program is one input file name. If the -I option is not set the program assumes the last argument is the input file name The input file must be the first of the data files produced by the DAQ, which contains the start of run data block.
If the input file name has the format <prefix>_0.dat, the program will attempt to load all the other files with the same prefix increasing the counter located in the same folder. Files that are not named sequentially as described above are considered as single data files. If the option -O is not specified the output data will be written to an slcio file whose name is obtained substituting the input file extension or adding the .slcio extension in case of no extension in the input file By default the program will only convert the raw data to a file. If the user specifies the -D option it will also write the electronics data to the database using the default collection names and folder unless otherwise specified with the corresponding options. All the data for the condition database will be stored with a validity going from the run start to run end, as decoded from the raw data To additionally store the channel mapping information the user shall provide the path to an lcio file containing the channel mapping information for the run and the name of the collection where the data are stored. The user can also specify the database folder where to store the data. Otherwise the default folder will be used. Finally is also possible to store the pedestal data for the run with a validity interval going between the run start and run end as retrieved from the raw data file. It's also possible to store both the pedestal data with the standard hardware mapping or the same data remapped by GEAR to the geometric identifiers. If the user doesn't specify the folder and collection names the default ones will be used.
Options
- -I --in
- Input file name. See the description above for more information
- Output file name. If it's not provided it will be created using a standard scheme.
Name of the collection where to store the raw data. Default is "AltroRawData"
- Value of the detector name to be set in the run header. Default is "LPTPC"
- Run description to be set in the run header. Default is "Test beam run"
- Overrides the value for the zero suppression threshold to be written in the condition data. It's necessary to cope with the data format prior of 4.6 when this value was not retrievable from the data
- Enables the program to upload the electronics information to the database.It REQUIRES the CondDB initialization string as argument in the form host:databasename:login:password[:port].
Defines the path to the folder where to store the GenericElectronic Condition Data.Default: "/LP1/T24_1/DESY/Grid_GEM_Module_V.2/ADCElectronicsParameters", Path format: /database/folder
Defines the path to the folder where to store the ExtendedElectronic Condition Data.Default: "/LP1/T24_1/DESY/Grid_GEM_Module_V.2/AltroExtElectronicsParameters", Path format: /database/folder
- Defines the path to an lcio file containing the channel mapping information.If no collection name is provided the default one for the ADCChannelMapping type will be used to load the data
- Defines the path to the folder where to store the Channel Mapping information. If no argument is provided to this option it will simply activate the database storage using the default folderDefault: "/LP1/T24_1/DESY/Grid_GEM_Module_V.2/channelmapping", Path format: /database/folder
- Defines the name of the collection containing the channel mapping data in the lcio file.Default: TPCChannelMapping
- Defines the path to a data file containing the pedestal information. The text file should be formatted as: hwChannel intPedestal floatPedestal floatPedestalWidth integerIf no folder name is provided the default one will be used
- Defines the DB folder where to store the Pedestal information using the hardware mapping. Default: "/LP1/T24_1/DESY/Grid_GEM_Module_V.2/pedestal_readout", Path format: /database/folder
- Additionally remaps the pedestal data from the input files to the gear mapping. For this function to work a valid channel mapping file should be provided as well. The optional argument defines the DB folder where to store the dataDefault: "/LP1/T24_1/DESY/Grid_GEM_Module_V.2/pedestal_gear", Path format: /database/folder