-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Mu2e/pasha
add TrkDtc fragment and the corresponding type
- Loading branch information
Showing
3 changed files
with
40 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
#ifndef ARTDAQ_CORE_MU2E_DATA_TRKDTC_HH | ||
#define ARTDAQ_CORE_MU2E_DATA_TRKDTC_HH | ||
|
||
#include "artdaq-core-mu2e/Data/ArtFragment.hh" | ||
|
||
namespace mu2e { | ||
class TrkDtcFragment : public ArtFragment { | ||
|
||
public: | ||
|
||
TrkDtcFragment() : ArtFragment() {} | ||
TrkDtcFragment(const std::vector<uint8_t>& Data) : ArtFragment(Data) {} | ||
|
||
//----------------------------------------------------------------------------- | ||
// the first integer word - version | ||
//----------------------------------------------------------------------------- | ||
int nReg () { return (data_.size()/4-1)/2; } | ||
|
||
int version () { return ((int*) data_.data())[0 ]; } | ||
uint32_t reg(int i) { return ((int*) data_.data())[2*i+1]; } | ||
uint32_t val(int i) { return ((int*) data_.data())[2*i+2]; } | ||
}; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters