Skip to content

Commit a9be4c7

Browse files
committed
Fix SIS3301 and SIS3316 merging
Fixed merging of SIS3301 and SIS3316 modules from the FRIB DAQ.
1 parent a475e2b commit a9be4c7

3 files changed

Lines changed: 10757 additions & 9 deletions

File tree

libattpc_merger/src/config.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,9 @@ impl Config {
7272

7373
/// Get the path to the online data, assuming the standard AT-TPC Server configuration
7474
pub fn get_online_directory(&self, run_number: i32, cobo: &u8) -> Result<PathBuf, ConfigError> {
75-
<<<<<<< Updated upstream
7675
let mut online_dir: PathBuf = PathBuf::new().join(format!(
7776
"/Network/Servers/mm{cobo}.local/Users/attpc/Data/mm{cobo}"
7877
));
79-
=======
80-
let mut online_dir: PathBuf = PathBuf::new().join(format!("/Network/Servers/mm{}.local/Users/attpc/Data/mm{}", cobo, cobo));
81-
>>>>>>> Stashed changes
8278
online_dir = online_dir.join(&self.experiment);
8379
online_dir = online_dir.join(self.get_run_str(run_number));
8480
if online_dir.exists() {
@@ -90,8 +86,8 @@ impl Config {
9086

9187
/// Get the path to the FRIBDAQ directory, assuming the standard AT-TPC configuration
9288
pub fn get_evt_directory(&self, run_number: i32) -> Result<PathBuf, ConfigError> {
93-
// let run_dir: PathBuf = self.evt_path.join(format!("run{run_number}"));
94-
let run_dir: PathBuf = self.evt_path.join("");
89+
let run_dir: PathBuf = self.evt_path.join(format!("run{run_number}"));
90+
// let run_dir: PathBuf = self.evt_path.clone();
9591
if run_dir.exists() {
9692
Ok(run_dir)
9793
} else {

libattpc_merger/src/ring_item.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::error::EvtItemError;
22
use byteorder::{LittleEndian, ReadBytesExt};
3-
use std::{fmt::UpperHex, io::{Cursor, Read}};
3+
use std::io::{Cursor, Read};
44

55
//These are the literal values for the different ring item type fields
66
const BEGIN_RUN_VAL: u8 = 1;
@@ -317,7 +317,6 @@ impl TryFrom<RingItem> for PhysicsItem {
317317
} else if tag == 0x977 {
318318
info.coinc.extract_data(&mut cursor)?;
319319
} else if tag == 0xFFFF {
320-
cursor.set_position(cursor.position() - 2);
321320
break;
322321
}
323322
else {
@@ -393,7 +392,7 @@ impl SIS3300Item {
393392
&mut self,
394393
cursor: &mut std::io::Cursor<Vec<u8>>,
395394
) -> Result<(), EvtItemError> {
396-
let group_enable_flags = cursor.read_u16::<LittleEndian>()?;
395+
let _group_enable_flags = cursor.read_u16::<LittleEndian>()?;
397396
let _daq_register = cursor.read_u32::<LittleEndian>()?; //Never used, but must be read
398397

399398
//Important buffer elements

0 commit comments

Comments
 (0)